Twitter / X · Guide

How to get Twitter / X user tweets

TL;DR
To get Twitter / X user tweets, sign up for a free Captapi key, then send one GET request to /v1/twitter/user-tweets with your input. You get clean JSON back in seconds for 2 credits per call — no OAuth, scraping or platform SDKs. List recent tweets from a Twitter/X profile — text, author, likes, reposts, hashtags, and media. Flat 2 credits per call.

How to get Twitter / X user tweets (step by step)

  1. 1

    Get a free API key

    Create a free Captapi account (100 credits, no card) and generate an API key from the dashboard.

  2. 2

    Call the Twitter/X User Tweets API

    Send an authenticated GET request to /v1/twitter/user-tweets with your input. No OAuth, no scraping setup.

  3. 3

    Read the JSON response

    Parse the clean JSON response. Pass cache=true for a free 24h cache hit; default is always fresh.

Code example

curl "https://api.captapi.com/v1/twitter/user-tweets?url=https%3A%2F%2Fx.com%2FNASA" \
  -H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."

What the response looks like

{
  "success": true,
  "data": {
    "handle": "elonmusk",
    "totalReturned": 5,
    "tweets": [
      {
        "platform": "twitter",
        "url": "https://x.com/elonmusk/status/1519480761749016577",
        "id": "1519480761749016577",
        "text": "Next I’m buying Coca-Cola to put the cocaine back in",
        "lang": "en",
        "publishedAt": "Thu Apr 28 00:56:58 +0000 2022",
        "author": {
          "username": "elonmusk",
          "displayName": "Elon Musk",
          "url": "https://x.com/elonmusk",
          "followers": 241067682,
          "verified": true,
          "profileImage": "https://pbs.twimg.com/profile_images/2053244804520427520/m8mdWZCG_normal.jpg"
        },
        "engagement": {
          "likes": 4212271,
          "replies": 168116,
          "retweets": 580111,
          "quotes": 168166
        },
        "isReply": false,
        "isRetweet": false
      },
      {
        "platform": "twitter",
        "url": "https://x.com/elonmusk/status/1812258574049157405",
        "id": "1812258574049157405",
        "text": "https://t.co/6eOgN9UdOy",
        "lang": "zxx",
        "publishedAt": "Sat Jul 13 22:51:28 +0000 2024",
        "author": {
          "username": "elonmusk",
          "displayName": "Elon Musk",
          "url": "https://x.com/elonmusk",
          "followers": 241067682,
          "verified": true,
          "profileImage": "https://pbs.twimg.com/profile_images/2053244804520427520/m8mdWZCG_normal.jpg"
        },
        "engagement": {
          "likes": 3186497,
          "replies": 69142,
          "retweets": 373339,
          "quotes": 40417
        },
        "isReply": false,
        "isRetweet": false,
        "media": [
          "https://pbs.twimg.com/media/GSZvkScbIAAwHQi.jpg"
        ]
      },
      {
        "platform": "twitter",
        "url": "https://x.com/elonmusk/status/1518623997054918657",
        "id": "1518623997054918657",
        "text": "I hope that even my worst critics remain on Twitter, because that is what free speech means",
        "lang": "en",
        "publishedAt": "Mon Apr 25 16:12:30 +0000 2022",
        "author": {
          "username": "elonmusk",
          "displayName": "Elon Musk",
          "url": "https://x.com/elonmusk",
          "followers": 241067682,
          "verified": true,
          "profileImage": "https://pbs.twimg.com/profile_images/2053244804520427520/m8mdWZCG_normal.jpg"
        },
        "engagement": {
          "likes": 2852112,
          "replies": 153311,
          "retweets": 315117,
          "quotes": 68462
        },
        "isReply": false,
        "isRetweet": false
      },
      {
        "platform": "twitter",
        "url": "https://x.com/elonmusk/status/1854026234339938528",
        "id": "1854026234339938528",
        "text": "🇺🇸🇺🇸The future is gonna be so 🔥 🇺🇸🇺🇸 https://t.co/x56cqb6oT5",
        "lang": "en",
        "publishedAt": "Wed Nov 06 05:01:15 +0000 2024",
        "author": {
          "username": "elonmusk",
          "displayName": "Elon Musk",
          "url": "https://x.com/elonmusk",
          "followers": 241067682,
          "verified": true,
          "profileImage": "https://pbs.twimg.com/profile_images/2053244804520427520/m8mdWZCG_normal.jpg"
        },
        "engagement": {
          "likes": 2494169,
          "replies": 56899,
          "retweets": 194031,
          "quotes": 12167
        },
        "isReply": false,
        "isRetweet": false,
        "media": [
          "https://pbs.twimg.com/media/GbrTB8GXEAYrk2N.jpg"
        ]
      },
      {
        "platform": "twitter",
        "url": "https://x.com/elonmusk/status/1519495072802390016",
        "id": "1519495072802390016",
        "text": "Let’s make Twitter maximum fun!",
        "lang": "en",
        "publishedAt": "Thu Apr 28 01:53:50 +0000 2022",
        "author": {
          "username": "elonmusk",
          "displayName": "Elon Musk",
          "url": "https://x.com/elonmusk",
          "followers": 241067682,
          "verified": true,
          "profileImage": "https://pbs.twimg.com/profile_images/2053244804520427520/m8mdWZCG_normal.jpg"
        },
        "engagement": {
          "likes": 2331941,
          "replies": 99683,
          "retweets": 164577,
          "quotes": 33693
        },
        "isReply": false,
        "isRetweet": false
      }
    ]
  }
}

Billing metadata (credits charged, cache hit/miss) is returned in the X-Captapi-Credits and X-Captapi-Cache response headers.

Request parameters

NameTypeRequiredDescription
urlstring YesTwitter/X profile URL or @handle. The URL platform must match this endpoint's platform. Do not pass cross-platform URLs, e.g. YouTube to TikTok, Instagram to Facebook, LinkedIn to X/Twitter, or Pinterest to Rumble.
limitintegerNoMax items to return (default 20, max 200). Billed per result.
cachebooleanNoSet true to serve from the 24h response cache. Default false — always fetch fresh data.

Frequently asked questions

What does the Twitter/X User Tweets API do?

The Twitter/X User Tweets API lets you list items in bulk with metadata from a public Twitter / X tweet using one GET request to /v1/twitter/user-tweets. It returns clean JSON — no OAuth or infrastructure setup required.

How many credits does the Twitter/X User Tweets API cost?

Each successful call costs 2 credits. Pass cache=true to serve from the 24h shared cache (0 credits on hit); default is always fresh. Failed or empty results are never charged.

Do I need a Twitter / X API key or OAuth?

No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle proxies, rate limits, retries, and authentication for you.

Is the Twitter/X User Tweets API suitable for production use?

Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h shared cache (0 credits on hit); default is always fresh. Use it for analytics, monitoring, and content automation.

Ready to get Twitter / X user tweets?

Start free with 100 credits — no credit card required.

Get your free API key