Latest tweets of several users
The newest tweets of up to 20 users in one request.
/user/tweets/for/usersParameters
userIdsquery · string (comma-separated) · requiredNumeric user IDs separated by commas. At most 20; duplicates count once.
countquery · integer · optional · default 20Number of tweets per user to ask X for, 1 to 100. Other values fall back to 20. X treats it as a hint.
includePromotedContentquery · boolean · optional · default falseAsk X to include promoted tweets. Accepts true/false, 1/0.
Notes
- Billed one call per user (duplicates count once), like calling /user/{userId}/tweets for each.
- Only the first page per user. For older tweets use /user/{userId}/tweets with its cursor.
Example request
curl 'https://api.twittrapi.com/user/tweets/for/users?userIds=2244994945,11348282&count=20' \
--header 'X-API-KEY: YOUR_API_KEY'import httpx
# No SDK method for this endpoint yet, so this is a plain HTTP call.
resp = httpx.get(
"https://api.twittrapi.com/user/tweets/for/users",
headers={"X-API-KEY": "YOUR_API_KEY"},
params={
"userIds": "2244994945,11348282",
"count": "20",
},
timeout=60,
)
data = resp.json()import { TwittrAPI } from "twittrapi";
const client = new TwittrAPI({ apiKey: process.env.TWITTRAPI_API_KEY });
// No wrapper method for this endpoint yet; client.get() sends the same authenticated GET.
const data = await client.get({
path: "/user/tweets/for/users",
query: {
userIds: "2244994945,11348282",
count: "20",
},
});curl 'https://twitter-aio.p.rapidapi.com/user/tweets/for/users?userIds=2244994945,11348282&count=20' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \
--header 'x-rapidapi-host: twitter-aio.p.rapidapi.com'Base URL https://api.twittrapi.com, key in the X-API-KEY header. Python and Node.js use the official SDKs.
Response
Built by the API: {"users": [{"userId": "...", "response": <first page of /user/{userId}/tweets>}], "errors": [{"userId": "...", "error": "upstream_error", "message": "..."}]}. users keeps the order of userIds; errors is left out when there are none.
Simple format (?format=simple or X-Response-Format: simple): Collection of Tweet objects of all users together, newest first, without cursors (hasNextPage false), plus errors for users without a page. Schema.
{
"users": [
{
"userId": "tweets",
"response": {
"data": {
"user": {
"result": {
"__typename": "User",
"timeline": {
"timeline": {
"instructions": [
{
"type": "TimelineClearCache"
},
{
"entry": {
"content": {
"__typename": "TimelineTimelineItem",
"clientEventInfo": {
"component": "pinned_tweets",
"element": "tweet"
},
"entryType": "TimelineTimelineItem",
"itemContent": {
"__typename": "TimelineTweet",
"itemType": "TimelineTweet",
"socialContext": {
"contextType": "Pin",
"text": "Example text.",
"type": "TimelineGeneralContext"
},
"tweetDisplayType": "Tweet",
"tweet_results": {
"result": {
"__typename": "Tweet",
"card": {
"legacy": {
"binding_values": [
{
"key": "photo_image_full_size_large",
"value": {
"image_value": {
"height": 419,
"url": "https://pbs.twimg.com/card_img/2107952823128182784/RyT0hE6P?format=jpg&name=800x419",
"width": 800
},
"type": "IMAGE"
}
},
{
"key": "thumbnail_image",
"value": {
"image_value": {
"height": 150,
"url": "https://pbs.twimg.com/card_img/2107952823128182784/RyT0hE6P?format=jpg&name=280x150",
"width": 218
},
"type": "IMAGE"
}
},
{
"key": "description",
"value": {
"string_value": "Use the X API with an all-new Developer Console and consumption-based billing. No fixed monthly costs, no monthly caps.",
"type": "STRING"
}
}
],
"card_platform": {
"platform": {
"audience": {
"name": "production"
},
"device": {
"name": "Swift",
"version": "12"
}
}
},
"name": "summary_large_image",
"url": "https://t.co/FS66GuIYJD",
"user_refs_results": []
},
"rest_id": "https://t.co/FS66GuIYJD"
},
"cashtag_attachments": [],
"core": {
"user_results": {
"result": {
"__typename": "User",
"action_counts": {
"favorites_count": 2758
},
"affiliates_highlighted_label": {
"label": {
"badge": {
"url": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg"
},
"description": "X",
"url": {
"url": "https://twitter.com/X",
"urlType": "DeepLink"
},
"userLabelDisplayType": "Badge",
"userLabelType": "BusinessLabel"
}
},
"avatar": {
"image_url": "https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw_normal.jpg"
},
"banner": {
"image_url": "https://pbs.twimg.com/profile_banners/2244994945/1690213128"
},
"core": {
"created_at": "Sat Dec 14 04:35:55 +0000 2013",
"name": "Developers",
"screen_name": "XDevelopers"
},
"dm_permissions": {
"can_dm": true
},
"follow_request_sent": false,
"has_graduated_access": true,
"id": "VXNlcjoyMjQ0OTk0OTQ1",
"is_blue_verified": true,
"location": {
"location": "127.0.0.1"
},
"media_permissions": {
"can_media_tag": true
},
"notifications_settings": {
"notifications_enabled": false
},
"parody_commentary_fan_label": "None",
"pinned_items": {
"tweet_ids_str": [
"2019881223666233717"
]
},
"possibly_sensitive": false,
"privacy": {
"protected": false
},
"professional": {
"category": [
{
"icon_name": "IconBriefcaseStroke",
"id": 1009,
"name": "Community"
}
],
"professional_type": "Business",
"rest_id": "1516891231749517312"
},
"profile_bio": {
"description": "The voice of the X Dev team and your official source for updates, news, and events, related to the X API.",
"entities": {
"description": {},
"url": {
"urls": [
{
"display_url": "docs.x.com",
"expanded_url": "https://docs.x.com/",
"indices": [
0,
23
],
"url": "https://t.co/NIwHVIVyrN"
}
]
}
}
},
"profile_description_language": "en",
"profile_image_shape": "Square",
"profile_metadata": {
"profile_interstitial_type": ""
},
"profile_translation": {
"translator_type": "regular"
},
"relationship_counts": {
"followers": 698074,
"following": 770
},
"relationship_perspectives": {
"blocked_by": false,
"blocking": false,
"followed_by": false,
"following": false,
"live_following": false,
"muting": false
},
"rest_id": "2244994945",
"super_follow_eligible": false,
"super_followed_by": false,
"super_following": false,
"tweet_counts": {
"media_tweets": 832,
"tweets": 4376
},
"verification": {
"verified": false,
"verified_type": "Business"
},
"website": {
"url": "https://t.co/NIwHVIVyrN"
}
}
}
},
"edit_control": {
"edit_tweet_ids": [
"2019881223666233717"
],
"editable_until_msecs": "1770415785000",
"edits_remaining": "5",
"is_edit_eligible": false
},
"grok_analysis_button": true,
"grok_annotations": {
"is_image_editable_by_grok": true
},
"grok_translated_post_with_availability": {
"is_available": false
},
"is_translatable": false,
"legacy": {
"bookmark_count": 2803,
"bookmarked": false,
"conversation_id_str": "2019881223666233717",
"created_at": "Fri Feb 06 21:09:45 +0000 2026",
"display_text_range": [
0,
261
],
"entities": {
"urls": [
{
"display_url": "developer.x.com",
"expanded_url": "http://developer.x.com",
"indices": [
238,
261
],
"url": "https://t.co/FS66GuIYJD"
}
]
},
"favorite_count": 5599,
"favorited": false,
"full_text": "Officially launching X API Pay-Per-Use\n\nThe core of X developers are indie builders, early stage products, startups, and hobbyists\n\nIt’s time to open up our X API ecosystem and instill a new wave of next generation X apps\n\nWe’re so back. https://t.co/FS66GuIYJD",
"id_str": "2019881223666233717",
"is_quote_status": false,
"lang": "en",
"possibly_sensitive": false,
"possibly_sensitive_editable": true,
"quote_count": 596,
"reply_count": 791,
"retweet_count": 896,
"retweeted": false,
"user_id_str": "2244994945"
},
"quick_promote_eligibility": {
"eligibility": "IneligibleNotVerified"
},
"rest_id": "2019881223666233717",
"unmention_data": {},
"views": {
"count": "2552260",
"state": "EnabledWithCount"
}
}
}
}
},
"entryId": "tweet-2019881223666233717",
"sortIndex": "2109014645799911424"
},
"type": "TimelinePinEntry"
},
{
"entries": [
{
"content": {
"__typename": "TimelineTimelineModule",
"clientEventInfo": {
"component": "suggest_who_to_follow",
"details": {
"timelinesDetails": {
"controllerData": "DAACDAACDAABCgABAAAAAAAAAAgAAAAA",
"injectionType": "WhoToFollow",
"sourceData": "DAABCgABHpf9hY+i4oYKAAIAAAAAAAAAAAAIAAIAAACDCAADAAAAAgwABQwAAgwAAgwAAQoAAQAAAAAAAAAIAAAAAAA="
}
}
},
"displayType": "Vertical",
"entryType": "TimelineTimelineModule",
"footer": {
"displayType": "Classic",
"landingUrl": {
"url": "twitter://connect_people?user_id=2244994945&display_location=profile_wtf_showmore",
"urlType": "DeepLink"
},
"text": "Example text."
},
"header": {
"displayType": "Classic",
"sticky": false,
"text": "Example text."
},
"items": [
{
"entryId": "who-to-follow-2109014645799911429-user-1000000000000000001",
"item": {
"clientEventInfo": {
"component": "suggest_who_to_follow",
"details": {
"timelinesDetails": {
"controllerData": "DAACDAACDAABCgABAAAAAAAAAAgAAAAA",
"injectionType": "WhoToFollow",
"sourceData": "DAABCgABHpf9hY+i4oYKAAIAAAAAAAAAAAAIAAIAAACDCAADAAAAAgwABQwAAgwAAgwAAQoAAQAAAAAAAAAIAAAAAAA="
}
},
"element": "user"
},
"itemContent": {
"__typename": "TimelineUser",
"itemType": "TimelineUser",
"userDisplayType": "User",
"user_results": {
"result": {
"__typename": "User",
"action_counts": {
"favorites_count": 3347
},
"affiliates_highlighted_label": {},
"avatar": {
"image_url": "https://pbs.twimg.com/profile_images/1000000000000000000/example_normal.jpg"
},
"banner": {
"image_url": "https://pbs.twimg.com/profile_banners/1000000000000000000/1700000000"
},
"core": {
"created_at": "Wed Apr 15 02:29:52 +0000 2009",
"name": "Example User 1",
"screen_name": "example_user_1"
},
"dm_permissions": {
"can_dm": true
},
"follow_request_sent": false,
"has_graduated_access": true,
"id": "VXNlcjoxMDAwMDAwMDAwMDAwMDAwMDAx",
"is_blue_verified": true,
"location": {
"location": ""
},
"media_permissions": {
"can_media_tag": true
},
"notifications_settings": {
"notifications_enabled": false
},
"parody_commentary_fan_label": "None",
"pinned_items": {
"tweet_ids_str": [
"2032073729539260818"
]
},
"possibly_sensitive": false,
"privacy": {
"protected": false
},
"profile_bio": {
"description": "Example",
"entities": {
"description": {},
"url": {
"urls": [
{
"display_url": "example.com",
"expanded_url": "https://example.com",
"indices": [
0,
23
],
"url": "https://t.co/example"
}
]
}
}
},
"profile_description_language": "en",
"profile_image_shape": "Square",
"profile_metadata": {
"profile_interstitial_type": ""
},{
"data": [
{
"id": "2127061613651915028",
"url": "https://x.com/NASA/status/2127061613651915028",
"text": "LIVE: We're sending science, supplies, holiday cookies, and much more to the @Space_Station. @NorthropGrumman's Cygnus XL cargo spacecraft is scheduled to lift off at 10:47am ET (1547 UTC). https://x.com/i/broadcasts/2ReRnqpjqpWXrW",
"createdAt": "2026-11-29T15:26:22Z",
"lang": "en",
"author": {
"id": "11348282",
"username": "NASA",
"name": "NASA",
"description": "Making the seemingly impossible, possible. ✨",
"location": "Pale Blue Dot",
"url": "http://www.nasa.gov/",
"createdAt": "2007-12-19T20:20:32Z",
"avatarUrl": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB.jpg",
"bannerUrl": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"verified": true,
"verifiedType": "Government",
"protected": false,
"counts": {
"followers": 92039920,
"following": 115,
"tweets": 74595,
"likes": 17128,
"media": 28269,
"listed": 0
},
"pinnedTweetIds": [],
"isAutomated": false
},
"counts": {
"likes": 1884,
"retweets": 295,
"replies": 155,
"quotes": 30,
"bookmarks": 87,
"views": 657203
},
"media": [],
"urls": [
"https://x.com/i/broadcasts/2ReRnqpjqpWXrW"
],
"hashtags": [],
"mentions": [
{
"id": "1451773004",
"username": "Space_Station"
},
{
"id": "15840909",
"username": "northropgrumman"
}
],
"replyTo": null,
"quoted": null,
"retweetOf": null,
"conversationId": "2127061613651915028",
"isPinned": false,
"source": null,
"article": null
},
{
"id": "2125167587264770208",
"url": "https://x.com/NASA/status/2125167587264770208",
"text": "LIVE: An uncrewed Progress cargo spacecraft carrying food, fuel, and supplies is about to lift off on a two-day journey to the @Space_Station. Launch is scheduled for 5:17am ET (1017 UTC). https://x.com/i/broadcasts/2OdRLXzWgOzBYK",
"createdAt": "2026-11-24T10:00:11Z",
"lang": "en",
"author": {
"id": "11348282",
"username": "NASA",
"name": "NASA",
"description": "Making the seemingly impossible, possible. ✨",
"location": "Pale Blue Dot",
"url": "http://www.nasa.gov/",
"createdAt": "2007-12-19T20:20:32Z",
"avatarUrl": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB.jpg",
"bannerUrl": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"verified": true,
"verifiedType": "Government",
"protected": false,
"counts": {
"followers": 92039920,
"following": 115,
"tweets": 74595,
"likes": 17128,
"media": 28269,
"listed": 0
},
"pinnedTweetIds": [],
"isAutomated": false
},
"counts": {
"likes": 1616,
"retweets": 238,
"replies": 120,
"quotes": 19,
"bookmarks": 72,
"views": 783154
},
"media": [],
"urls": [
"https://x.com/i/broadcasts/2OdRLXzWgOzBYK"
],
"hashtags": [],
"mentions": [
{
"id": "1451773004",
"username": "Space_Station"
}
],
"replyTo": null,
"quoted": null,
"retweetOf": null,
"conversationId": "2125167587264770208",
"isPinned": false,
"source": null,
"article": null
},
{
"id": "2019881223666233717",
"url": "https://x.com/XDevelopers/status/2019881223666233717",
"text": "Officially launching X API Pay-Per-Use\n\nThe core of X developers are indie builders, early stage products, startups, and hobbyists\n\nIt’s time to open up our X API ecosystem and instill a new wave of next generation X apps\n\nWe’re so back. http://developer.x.com",
"createdAt": "2026-02-06T21:09:45Z",
"lang": "en",
"author": {
"id": "2244994945",
"username": "XDevelopers",
"name": "Developers",
"description": "The voice of the X Dev team and your official source for updates, news, and events, related to the X API.",
"location": "127.0.0.1",
"url": "https://docs.x.com/",
"createdAt": "2013-12-14T04:35:55Z",
"avatarUrl": "https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg",
"bannerUrl": "https://pbs.twimg.com/profile_banners/2244994945/1690213128",
"verified": true,
"verifiedType": "Business",
"protected": false,
"counts": {
"followers": 698074,
"following": 770,
"tweets": 4376,
"likes": 2758,
"media": 832,
"listed": 0
},
"pinnedTweetIds": [
"2019881223666233717"
],
"isAutomated": false
},
"counts": {
"likes": 5599,
"retweets": 896,
"replies": 791,
"quotes": 596,
"bookmarks": 2803,
"views": 2552260
},
"media": [],
"urls": [
"http://developer.x.com"
],
"hashtags": [],
"mentions": [],
"replyTo": null,
"quoted": null,
"retweetOf": null,
"conversationId": "2019881223666233717",
"isPinned": true,
"source": null,
"article": null
}
],
"nextCursor": null,
"previousCursor": null,
"hasNextPage": false,
"errors": [
{
"userId": "999",
"error": "upstream_error",
"message": "rate limited after multiple attempts"
}
]
}In the raw format, field names and nesting come from X and can change without notice. See Response format; the simple format keeps a fixed schema.
Errors
- 400userIds is missing or has more than 20 IDs.
- 422One of the IDs is not numeric.
Errors every endpoint can return (401, 402, 403, 404, 408, 409, 429, 5xx), and which of them are charged, are on the Errors page. Calls that fail with 400, 407, 408, 409 or a 5xx error are refunded.