Skip to main content

Overview

The tweet command fetches a specific tweet by ID or URL and displays it along with its replies. This is useful for viewing tweet threads, reading conversations, and analyzing engagement.

Syntax

twitter tweet TWEET_ID [OPTIONS]

Arguments

TWEET_ID
string
required
The tweet identifier. Can be either:
  • Numeric tweet ID: 1234567890123456789
  • Full tweet URL: https://twitter.com/user/status/1234567890123456789
  • Shortened URL: The ID will be extracted automatically

Options

--max
integer
default:"20"
Maximum number of replies to fetch. The original tweet is always included.Alias: -n
--json
boolean
Output tweet and replies as JSON instead of formatted display.

Examples

# View a tweet using its numeric ID
twitter tweet 1234567890123456789

Output

The command displays:
  1. Main tweet - Detailed view with full text, author info, and engagement metrics
  2. Replies section - A formatted table of replies (if any)

Example Output

πŸ” Getting Twitter cookies...
🐦 Fetching tweet 1234567890123456789...

βœ… Fetched 21 tweets in 1.2s

╔══════════════════════════════════════════════════════════╗
β•‘  @elonmusk β€’ Elon Musk                                   β•‘
β•‘  βœ“ Verified                                              β•‘
╠══════════════════════════════════════════════════════════╣
β•‘  Excited to announce a major update to our platform!     β•‘
β•‘  Check out the latest feature updates.                   β•‘
β•‘                                                          β•‘
β•‘  πŸ”— https://example.com                                  β•‘
╠══════════════════════════════════════════════════════════╣
β•‘  ❀️  12.3K    πŸ”„ 2.1K    πŸ’¬ 456    πŸ“Š 1.2M views         β•‘
β•‘  πŸ• 2024-03-09 14:32:00 UTC                             β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

πŸ’¬ Replies:

πŸ’¬ Replies β€” 20
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━┳━━━━━━┓
┃ Author      ┃ Reply                  ┃ ❀️    ┃ πŸ”„   ┃ πŸ’¬   ┃
┑━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━╇━━━━━━┩
β”‚ @sama       β”‚ This is amazing!...    β”‚ 234  β”‚ 12   β”‚ 8    β”‚
β”‚ @karpathy   β”‚ Looking forward to...  β”‚ 567  β”‚ 34   β”‚ 15   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜

JSON Output Structure

[
  {
    "id": "1234567890123456789",
    "text": "Excited to announce a major update...",
    "author": "elonmusk",
    "author_name": "Elon Musk",
    "created_at": "2024-03-09T14:32:00.000Z",
    "likes": 12300,
    "retweets": 2100,
    "replies": 456,
    "views": 1200000,
    "url": "https://twitter.com/elonmusk/status/1234567890123456789"
  },
  {
    "id": "1234567890123456790",
    "text": "This is amazing!",
    "author": "sama",
    "is_reply": true,
    "reply_to": "1234567890123456789"
  }
]
The first element in the JSON output is always the main tweet. Subsequent elements are replies, ordered by relevance or recency.
You can extract tweet IDs from URLs easily. The command automatically handles both formats:
# These are equivalent:
twitter tweet 1234567890123456789
twitter tweet https://twitter.com/user/status/1234567890123456789

Use Cases

  • Read threads - View entire conversation threads and replies
  • Analyze engagement - See which replies got the most engagement
  • Content research - Gather tweet data including replies for analysis
  • Monitor discussions - Track conversations around important tweets
  • Quote extraction - Export tweet text and replies for documentation

Finding Tweet IDs

There are several ways to get a tweet ID:
  1. From the URL - Click β€œShare” β†’ β€œCopy link”, the ID is in the URL
  2. From search results - Use twitter search --json and extract IDs
  3. From timeline - Use twitter feed --json and find the tweet ID

Example: Finding and viewing a tweet

# Search for a tweet and extract its ID
twitter search "from:elonmusk latest announcement" --json | jq '.[0].id'

# Then view it with replies
twitter tweet <id_from_above>
  • search - Search for tweets by keyword
  • feed - View your timeline
  • user - View a user’s profile

Build docs developers (and LLMs) love