How to get Twitter / X user tweets
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. Most popular public tweets from a Twitter/X profile (~100 cap) — not chronological. Text, author, engagement, hashtags, media. Flat 2 credits.How to get Twitter / X user tweets (step by step)
- 1
Get a free API key
Create a free Captapi account (100 credits, no card) and generate an API key from the dashboard.
- 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
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/2084274899065897011",
"id": "2084274899065897011",
"text": "Worth noting that any USAID funding that appeared to have the slightest merit whatsoever for helping people in need was moved to the State Department. \n\nOnly the funding where they provided no evidence at all for who would receive the money was stopped.\n\nhttps://t.co/qGUew8TyKD",
"lang": "en",
"publishedAt": "2026-08-03T13:47:14.000Z",
"author": {
"id": "44196397",
"username": "elonmusk",
"displayName": "Elon Musk",
"url": "https://x.com/elonmusk",
"followers": 241148496,
"verified": true,
"profileImage": "https://pbs.twimg.com/profile_images/2053244804520427520/m8mdWZCG_normal.jpg"
},
"isReply": false,
"isRetweet": false,
"possiblySensitive": false,
"conversationId": "2084274899065897011",
"engagement": {
"views": null,
"likes": 51392,
"replies": 2623,
"retweets": 6975,
"quotes": 344,
"bookmarks": null
},
"hashtags": [],
"media": []
},
{
"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": "2022-04-28T00:56:58.000Z",
"author": {
"id": "44196397",
"username": "elonmusk",
"displayName": "Elon Musk",
"url": "https://x.com/elonmusk",
"followers": 241148496,
"verified": true,
"profileImage": "https://pbs.twimg.com/profile_images/2053244804520427520/m8mdWZCG_normal.jpg"
},
"isReply": false,
"isRetweet": false,
"possiblySensitive": false,
"conversationId": "1519480761749016577",
"engagement": {
"views": null,
"likes": 4209989,
"replies": 168055,
"retweets": 579720,
"quotes": 168169,
"bookmarks": null
},
"hashtags": [],
"media": []
}
]
}
}Billing metadata (credits charged, cache hit/miss) is returned in the X-Captapi-Credits and X-Captapi-Cache response headers.
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Twitter/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. |
| limit | integer | No | Max tweets to return (default 20, max 200). Twitter's public surface usually caps around ~100 most popular posts — not chronological latest. Flat 2 credits per call. |
| cache | boolean | No | Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits. |
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 cache (0 credits on hit); default is always fresh. Hits include cached + cachedAt. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. 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 cache (0 credits on hit); default is always fresh. Hits include cached + cachedAt. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. 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