{"openapi":"3.1.0","info":{"title":"API.SH: X (Twitter)","version":"1.0.0","description":"The X (Twitter) API from API.SH: public X (Twitter) data as clean JSON. Every endpoint is a GET with query parameters and your key in the x-api-key header. Calls that run cost the credits shown (x-credits): successes, and lookups that found nothing (404). Refused calls and errors on our side are free. Docs: https://api.sh/docs · Every platform: https://api.sh/openapi.json","contact":{"name":"API.SH support","email":"support@api.sh","url":"https://api.sh/contact"},"termsOfService":"https://api.sh/legal/terms"},"servers":[{"url":"https://api.api.sh"}],"security":[{"apiKey":[]}],"tags":[{"name":"Account","description":"Your balance, usage, logs and past responses. Free."},{"name":"X (Twitter)","description":"7 endpoints (social)","x-slug":"x","x-domains":["x.com","twitter.com"]}],"paths":{"/v1/account":{"get":{"operationId":"getAccount","tags":["Account"],"summary":"Balance, plan, spend and spend limits","description":"Credits by bucket (free monthly, plan, pay-as-you-go), the plan, credits spent today and this month (UTC), your spend limits and the key used. Free: costs no credits.","responses":{"200":{"description":"Account","content":{"application/json":{"example":{"success":true,"account":{"id":"8f0c…","status":"active","unlimited":false},"credits":{"total":41250,"free":100,"plan":0,"payg":41150,"free_resets_at":"2026-11-01T00:00:00Z"},"plan":null,"spend":{"today":120,"this_month":3400,"daily_limit":5000,"monthly_limit":null,"period":"UTC"},"key":{"id":"…","name":"production","prefix":"ash_li","created_at":"2026-10-01T00:00:00Z"}}}}},"401":{"description":"Missing, invalid, revoked or expired API key. Not charged. See https://api.sh/docs/errors#401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/usage":{"get":{"operationId":"getAccountUsage","tags":["Account"],"summary":"Usage per day and per endpoint","description":"Calls, errors and credits per UTC day, and the top endpoints by credits. Free. Add output=csv for the daily rows as CSV.","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":90,"default":30}},{"$ref":"#/components/parameters/output"}],"responses":{"200":{"description":"Usage","content":{"application/json":{"schema":{"type":"object"}},"text/csv":{"schema":{"type":"string"}}}},"401":{"description":"Missing, invalid, revoked or expired API key. Not charged. See https://api.sh/docs/errors#401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/logs":{"get":{"operationId":"listAccountLogs","tags":["Account"],"summary":"Your calls of the last 30 days","description":"Newest first. Filter by status, route prefix, key or time; page with `before` (the `next` value). Add output=csv|ndjson to download (up to 5,000 rows per request; the next cursor is in the x-next-cursor header). Free.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":50}},{"name":"status","in":"query","required":false,"description":"ok, error, or an HTTP status like 502.","schema":{"type":"string"}},{"name":"route","in":"query","required":false,"description":"Route prefix, e.g. /tiktok/v1","schema":{"type":"string"}},{"name":"key","in":"query","required":false,"description":"Only calls made with this key id.","schema":{"type":"string","format":"uuid"}},{"name":"since","in":"query","required":false,"description":"ISO time.","schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","required":false,"description":"Cursor from `next`.","schema":{"type":"string"}},{"$ref":"#/components/parameters/output"}],"responses":{"200":{"description":"Calls","content":{"application/json":{"schema":{"type":"object"}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"401":{"description":"Missing, invalid, revoked or expired API key. Not charged. See https://api.sh/docs/errors#401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/results/{request_id}":{"get":{"operationId":"getResult","tags":["Account"],"summary":"Fetch a past response again, free","description":"The exact response a call returned, for 30 days after the call, at no cost. Use the call's x-request-id. Supports output=csv|ndjson.","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The stored response (headers: x-refetch: 1, x-original-time, x-original-route).","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Not found, or not public. A lookup that ran costs the endpoint's price (credits_used says); an unknown route is free.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Older than 30 days.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/twitter/v1/community":{"get":{"operationId":"twitterCommunity","summary":"X community","description":"Every response includes `credits_used`: the credits this call cost.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/twitter-community","tags":["X (Twitter)"],"x-credits":1,"parameters":[{"name":"id","in":"query","required":true,"description":"Community ID or URL.","schema":{"type":"string"},"example":"1926186499399139650"},{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"1926186499399139650","url":"https://x.com/i/communities/1926186499399139650","name":"The First Thousand","description":"This community is for creators and builders who are growing to their first 1,000 followers. Give insights, build your brand, and grow a loya…","topic":null,"members":5629,"created_at":"2025-05-24T08:00:22.931Z","join_policy":"Open","nsfw":false,"banner":"https://pbs.twimg.com/community_banner_img/1930048753223745537/Ua814CNc?format=jpg&name=orig","creator":{"username":"carsonrmccann"},"rules":[{"name":"No Empty Platitudes","description":"This isn’t the space to drop ChatGPT engineered empty platitudes"},{"name":"Post What’s Working","description":"Show how you’re cracking the algorithm"},"… 4 more"],"trending_hashtags":[],"graphql_id":"Q29tbXVuaXR5OjE5MjYxODY0OTkzOTkxMzk2NTA=","role":"NonMember","is_member":false,"question":null,"search_tags":[],"banner_width":1250,"banner_height":500,"banner_colors":[{"percentage":85.22,"rgb":{"blue":17,"green":0,"red":217}},{"percentage":4.23,"rgb":{"blue":35,"green":15,"red":32}},"… 3 more"],"default_banner":"https://pbs.twimg.com/media/FECS7TfVcAcCrj2.jpg","creator_verified":true,"members_facepile":["https://pbs.twimg.com/profile_images/1963429128402501632/J9C5efvR_normal.jpg","https://pbs.twimg.com/profile_images/2011557694264479744/xS6eyqBz_normal.jpg","… 3 more"],"moderators":null,"rule_ids":["1926189963793609186","1926190339016048686","… 4 more"],"credits_used":1,"cached":false}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/twitter/v1/community/tweets":{"get":{"operationId":"twitterCommunityTweets","summary":"X community tweets","description":"Every response includes `credits_used`: the credits this call cost.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/twitter-community-tweets","tags":["X (Twitter)"],"x-credits":1,"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string"},"example":"1926186499399139650"},{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"1926186499399139650","sort":"top","count":20,"next_cursor":null,"tweets":[{"id":"2106954044686397612","url":"https://x.com/jasonjias/status/2106954044686397612","text":"I’m a solo founder in Palo Alto\n\nif you’re a founder, builder, or working on ai, tech, or cool stuff let’s connect!\n\nLet’s grow together!","created_at":"2026-10-05T03:46:04.000Z","lang":"en","likes":14,"retweets":0,"replies":12,"quotes":0,"bookmarks":0,"views":289,"author":{"id":"1354812288637624325","username":"jasonjias","name":"Jason","verified":false},"reply_to":null,"conversation_id":null,"hashtags":[],"mentions":[],"links":[],"media":[],"retweet_of":null,"quote_of":null,"author_details":{"avatar":"https://pbs.twimg.com/profile_images/2041658850236125184/5LMT-JmL_400x400.jpg","followers":1361,"following":1906,"verified_type":null,"protected":false,"created_at":null,"bio":"building @dotsathome | ex-@Apple","location":"Palo Alto, CA"},"user_id":"1354812288637624325","reply_to_user":null,"reply_to_user_id":null,"quoted_tweet_id":null,"is_quote":null,"is_retweet":false,"possibly_sensitive":null,"source":null,"display_text_range":[0,137],"is_long":false,"views_state":null,"is_translatable":null,"edit":{"edit_tweet_ids":["2106954044686397612"],"editable_until":null,"edits_remaining":null,"is_edit_eligible":null},"entities":{"hashtags":[],"mentions":[],"urls":[],"symbols":[]},"card":null,"place":null,"community_id":null,"birdwatch_note":null},{"id":"2107788935745441861","url":"https://x.com/Top_Things_/status/2107788935745441861","text":"looking for more people into tech, startups, AI, careers & marketing.\n\nif that’s your side of x,  let’s connect 👋","created_at":"2026-10-07T11:03:37.000Z","lang":"en","likes":8,"retweets":0,"replies":5,"quotes":0,"bookmarks":0,"views":133,"author":{"id":"1298298807147302912","username":"Top_Things_","name":"Velora","verified":false},"reply_to":null,"conversation_id":null,"hashtags":[],"mentions":[],"links":[],"media":[],"retweet_of":null,"quote_of":null,"author_details":{"avatar":"https://pbs.twimg.com/profile_images/2077356217522065408/i-f_VmSH_400x400.jpg","followers":317,"following":245,"verified_type":null,"protected":false,"created_at":null,"bio":"Tech || SaaS || X || AI\nSoftware engineer & idk I'm just figuring out  🤧\n| Open for collabs |\n\nTweeting thoughts that should’ve stayed in my…","location":""},"user_id":"1298298807147302912","reply_to_user":null,"reply_to_user_id":null,"quoted_tweet_id":null,"is_quote":null,"is_retweet":false,"possibly_sensitive":null,"source":null,"display_text_range":[0,117],"is_long":false,"views_state":null,"is_translatable":null,"edit":{"edit_tweet_ids":["2107788935745441861"],"editable_until":null,"edits_remaining":null,"is_edit_eligible":null},"entities":{"hashtags":[],"mentions":[],"urls":[],"symbols":[]},"card":null,"place":null,"community_id":null,"birdwatch_note":null},"… 18 more"],"credits_used":1,"cached":false}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/twitter/v1/profile":{"get":{"operationId":"twitterProfile","summary":"X profile","description":"Every response includes `credits_used`: the credits this call cost.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/twitter-profile","tags":["X (Twitter)"],"x-credits":1,"parameters":[{"name":"username","in":"query","required":true,"schema":{"type":"string"},"example":"nasa"},{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"11348282","username":"NASA","name":"NASA","url":"https://x.com/NASA","bio":"Making the seemingly impossible, possible. ✨","location":"Pale Blue Dot","website":"http://www.nasa.gov/","created_at":"Wed Dec 19 20:20:32 +0000 2007","followers":92290430,"following":115,"tweets":74490,"likes":17060,"media":28224,"listed":null,"verified":true,"verified_type":"Government","avatar":"https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg","banner":"https://pbs.twimg.com/profile_banners/11348282/1788992290","protected":false,"pinned_tweet_ids":[],"birthdate":"1958-10-1","avatar_original":"https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB.jpg","bio_urls":[],"website_display":"nasa.gov","website_short_url":"https://t.co/9NkQJKAnuU","media_tweets":28224,"graphql_id":"VXNlcjoxMTM0ODI4Mg==","profile_image_shape":"Square","bio_language":"en","verified_legacy":false,"identity_verified":false,"verified_since":"2009-08-07T19:53:50.941Z","verification_reason":"This account is verified because it is a government or multilateral organization account.  Learn more","affiliate_label":null,"business_affiliates":85,"highlighted_tweets":289,"creator_subscriptions":0,"parody_label":null,"possibly_sensitive":false,"professional":null,"…":"6 more fields","cached":false,"credits_used":1}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/twitter/v1/tweet":{"get":{"operationId":"twitterTweet","summary":"One tweet","description":"Every response includes `credits_used`: the credits this call cost.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/twitter-tweet","tags":["X (Twitter)"],"x-credits":1,"parameters":[{"name":"url","in":"query","required":true,"description":"Post URL or numeric id.","schema":{"type":"string"},"example":"20"},{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"20","text":"just setting up my twttr","created_at":"2006-03-21T20:50:14.000Z","likes":309922,"replies":18108,"lang":"en","author":"jack","author_name":"jack","author_verified":false,"author_avatar":"https://pbs.twimg.com/profile_images/1661201415899951105/azNjKOSH_normal.jpg","url":"https://x.com/jack/status/20","type":"Tweet","author_id":"12","author_avatar_large":"https://pbs.twimg.com/profile_images/1661201415899951105/azNjKOSH_400x400.jpg","author_blue_verified":true,"author_verified_type":null,"author_label":{"description":"Square","badge":"https://pbs.twimg.com/profile_images/1285655593592791040/HtwPZgej_bigger.jpg","url":"https://twitter.com/Square","type":"BusinessLabel"},"possibly_sensitive":null,"display_text_range":[0,24],"reply_to":null,"reply_to_user":null,"reply_to_user_id":null,"conversation_count":18108,"news_action_type":"conversation","is_edited":false,"is_stale_edit":false,"edit":{"edit_tweet_ids":["20"],"editable_until":"2006-03-21T21:20:14.000Z","edits_remaining":5,"is_edit_eligible":true},"hashtags":[],"mentions":[],"links":[],"symbols":[],"media":[],"photos":[],"video":null,"card":null,"quoted_tweet":null,"parent_tweet":null,"…":"1 more fields","cached":false,"credits_used":1}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/twitter/v1/tweet/transcript":{"get":{"operationId":"twitterTweetTranscript","summary":"X video transcript","description":"Every response includes `credits_used`: the credits this call cost.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/twitter-tweet-transcript","tags":["X (Twitter)"],"x-credits":1,"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"},"example":"https://x.com/NASA/status/2111180963661435219"},{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"2111180963661435219","url":"https://x.com/i/status/2111180963661435219","tweet_text":"The aircraft lineup just keeps getting bigger. ✈️\n\nMAX POWER, a new aerospace expo, is set for Nov. 7-8 @NASAKennedy — featuring flyovers an…","video":"https://video.twimg.com/amplify_video/2111180787802370048/vid/avc1/320x568/ARyMrUiwUNJCT_91.mp4","author":"NASA","author_name":"NASA","created_at":"2026-10-16T19:42:20.000Z","likes":1684,"replies":192,"duration_ms":17751,"poster":"https://pbs.twimg.com/amplify_video_thumb/2111180787802370048/img/0nbyTdS0MRg5JqXk.jpg","video_variants":[{"content_type":"application/x-mpegURL","bitrate":null,"url":"https://video.twimg.com/amplify_video/2111180787802370048/pl/HWvzEhcDZtXVLLp5.m3u8?v=aac"},{"content_type":"video/mp4","bitrate":632000,"url":"https://video.twimg.com/amplify_video/2111180787802370048/vid/avc1/320x568/ARyMrUiwUNJCT_91.mp4"},"… 3 more"],"tweet":{"__typename":"Tweet","favorite_count":1684,"lang":"en","possibly_sensitive":false,"created_at":"2026-10-16T19:42:20.000Z","display_text_range":[0,264],"entities":{"media":[{"display_url":"pic.x.com/pXYGxy6ZbE","expanded_url":"https://x.com/NASA/status/2111180963661435219/video/1","indices":[265,288],"url":"https://t.co/pXYGxy6ZbE"}],"urls":[{"display_url":"nasa.gov/maxpower/","expanded_url":"https://www.nasa.gov/maxpower/","indices":[241,264],"url":"https://t.co/SPHni2YCxO"}],"user_mentions":[{"id_str":"16580226","indices":[104,116],"name":"NASA's Kennedy Space Center","screen_name":"NASAKennedy"}]},"id_str":"2111180963661435219","text":"The aircraft lineup just keeps getting bigger. ✈️\n\nMAX POWER, a new aerospace expo, is set for Nov. 7-8 @NASAKennedy — featuring flyovers an…","user":{"id_str":"11348282","name":"NASA","screen_name":"NASA","is_blue_verified":true,"profile_image_shape":"Square","verified":false,"verified_type":"Government","profile_image_url_https":"https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg"},"edit_control":{"edit_tweet_ids":["2111180963661435219"],"editable_until_msecs":"1792183340000","edits_remaining":"5","is_edit_eligible":true},"mediaDetails":[{"additional_media_info":{},"display_url":"pic.x.com/pXYGxy6ZbE","expanded_url":"https://x.com/NASA/status/2111180963661435219/video/1","ext_media_availability":{"status":"Available"},"indices":[265,288],"media_url_https":"https://pbs.twimg.com/amplify_video_thumb/2111180787802370048/img/0nbyTdS0MRg5JqXk.jpg","original_info":{"focus_rects":[],"height":1920,"width":1080},"sizes":{"large":{"…":"3 fields"},"medium":{"…":"3 fields"},"small":{"…":"3 fields"},"thumb":{"…":"3 fields"}},"type":"video","url":"https://t.co/pXYGxy6ZbE","video_info":{"aspect_ratio":[9,16],"duration_millis":17751,"variants":[{"…":"2 fields"},{"…":"3 fields"},"… 3 more"]}}],"photos":[],"video":{"aspectRatio":[9,16],"contentType":"media_entity","durationMs":17751,"mediaAvailability":{"status":"available"},"poster":"https://pbs.twimg.com/amplify_video_thumb/2111180787802370048/img/0nbyTdS0MRg5JqXk.jpg","variants":[{"type":"application/x-mpegURL","src":"https://video.twimg.com/amplify_video/2111180787802370048/pl/HWvzEhcDZtXVLLp5.m3u8?v=aac"},{"type":"video/mp4","src":"https://video.twimg.com/amplify_video/2111180787802370048/vid/avc1/320x568/ARyMrUiwUNJCT_91.mp4"},"… 3 more"],"videoId":{"type":"tweet","id":"2111180963661435219"},"viewCount":0},"conversation_count":192,"news_action_type":"conversation","isEdited":false,"isStaleEdit":false},"source":"ai","model":"@cf/openai/whisper-large-v3-turbo","language":"en","duration_s":17.8133125,"text":"","segments":[],"credits_used":1,"cached":false}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/twitter/v1/user/highlights":{"get":{"operationId":"twitterUserHighlights","summary":"X user highlights","description":"The tweets an account highlighted on its profile (what x.com shows logged out), with the same fields as user tweets. Pass `next_cursor` back as `cursor`; it is null on the last page. Every response includes `credits_used`: the credits this call cost.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/twitter-user-highlights","tags":["X (Twitter)"],"x-credits":1,"parameters":[{"name":"username","in":"query","required":true,"schema":{"type":"string"},"example":"NASA"},{"name":"count","in":"query","required":false,"description":"Tweets per page, 1-100 (default 20).","schema":{"type":"integer"}},{"name":"cursor","in":"query","required":false,"description":"`next_cursor` from the previous page.","schema":{"type":"string"}},{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"username":"NASA","user_id":"11348282","count":20,"next_cursor":"DAAHCgABHWQhgHQ__-wLAAIAAAATMTg3MzUyNDg4OTkyNjIwMzcwMwgAAwAAAAIAAA","previous_cursor":"DAAHCgABHWQhgHRAJxELAAIAAAATMTg4MDUwNzUxNzAyODU4OTI1MggAAwAAAAEAAA","instruction_types":["TimelineClearCache","TimelineAddEntries"],"entry_ids":["tweet-2116263878807998722","tweet-2115753332958433574","… 20 more"],"tweets":[{"id":"2116263878807998722","url":"https://x.com/NASA/status/2116263878807998722","text":"MAX POWER, America’s newest aerospace expo and air show, is just a week away!\n\nThis showcase will be packed with events—from aircraft flyove…","created_at":"Fri Oct 30 20:20:01 +0000 2026","lang":"en","likes":1722,"retweets":217,"replies":123,"quotes":18,"bookmarks":69,"views":405200,"author":{"id":"11348282","username":"NASA","name":"NASA","verified":true},"reply_to":null,"conversation_id":"2116263878807998722","hashtags":[],"mentions":[],"links":["https://go.nasa.gov/4zjj9BD"],"media":[{"type":"photo","url":"https://pbs.twimg.com/media/HV56yHnXcAAwYJ2.jpg","expanded_url":"https://x.com/NASA/status/2116263878807998722/photo/1","id":"2116263876366921728","media_key":"3_2116263876366921728","display_url":"pic.x.com/P18NboXze3","short_url":"https://t.co/P18NboXze3","alt_text":"Three jet aircraft, each with a white nose and blue body, fly in a triangle formation against a clear blue sky. White trails follow each jet…","image_original":"https://pbs.twimg.com/media/HV56yHnXcAAwYJ2?format=jpg&name=orig","width":1920,"height":1280,"sizes":{"…":"4 fields"},"aspect_ratio":null,"hls":null,"variants":[],"availability":"Available","allow_download":null,"monetizable":null,"source_user_id":null,"view_count":null,"tagged_users":[]}],"retweet_of":null,"quote_of":null,"author_details":{"avatar":"https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg","followers":92290418,"following":115,"verified_type":"Government","protected":false,"created_at":"Wed Dec 19 20:20:32 +0000 2007","bio":"Making the seemingly impossible, possible. ✨","location":"Pale Blue Dot"},"user_id":"11348282","reply_to_user":null,"reply_to_user_id":null,"quoted_tweet_id":null,"is_quote":false,"is_retweet":false,"possibly_sensitive":false,"source":null,"display_text_range":[0,243],"is_long":false,"views_state":"EnabledWithCount","is_translatable":false,"edit":{"edit_tweet_ids":["2116263878807998722"],"editable_until":"2026-10-30T21:20:01.000Z","edits_remaining":5,"is_edit_eligible":true},"entities":{"hashtags":[],"mentions":[],"urls":[{"…":"4 fields"}],"symbols":[]},"card":null,"place":null,"community_id":null,"birdwatch_note":null,"pinned":false},{"id":"2115753332958433574","url":"https://x.com/NASA/status/2115753332958433574","text":"LIVE: NASA's Anil Menon and @csa_asc's Joshua Kutryk are setting up a new solar array outside the @Space_Station. Today's spacewalk is sched…","created_at":"Thu Oct 29 10:31:18 +0000 2026","lang":"en","likes":3460,"retweets":585,"replies":256,"quotes":86,"bookmarks":188,"views":1305286,"author":{"id":"11348282","username":"NASA","name":"NASA","verified":true},"reply_to":null,"conversation_id":"2115753332958433574","hashtags":[],"mentions":["csa_asc","Space_Station"],"links":["https://x.com/i/broadcasts/1rxmqpBDDpWxy"],"media":[],"retweet_of":null,"quote_of":null,"author_details":{"avatar":"https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg","followers":92290418,"following":115,"verified_type":"Government","protected":false,"created_at":"Wed Dec 19 20:20:32 +0000 2007","bio":"Making the seemingly impossible, possible. ✨","location":"Pale Blue Dot"},"user_id":"11348282","reply_to_user":null,"reply_to_user_id":null,"quoted_tweet_id":null,"is_quote":false,"is_retweet":false,"possibly_sensitive":false,"source":null,"display_text_range":[0,242],"is_long":false,"views_state":"EnabledWithCount","is_translatable":false,"edit":{"edit_tweet_ids":["2115753332958433574"],"editable_until":"2026-10-29T11:31:18.000Z","edits_remaining":5,"is_edit_eligible":false},"entities":{"hashtags":[],"mentions":[{"…":"4 fields"},{"…":"4 fields"}],"urls":[{"…":"4 fields"}],"symbols":[]},"card":{"name":"745291183405076480:broadcast","url":"https://t.co/xoJPYWty9Z","values":{"broadcast_url":"https://x.com/i/broadcasts/1rxmqpBDDpWxy","broadcast_width":"3840","broadcast_state":"ENDED","site":"11348282","broadcast_title":"U.S. Spacewalk 100","broadcast_source":"LiveCms","broadcast_orientation":"0","broadcast_id":"1rxmqpBDDpWxy","broadcaster_twitter_id":"11348282","broadcast_height":"2160","broadcaster_username":"NASA","broadcast_media_key":"28_2115749239775272960","broadcaster_display_name":"NASA","broadcast_is_high_latency":true,"broadcast_media_id":"2115749239775272960","card_url":"https://t.co/xoJPYWty9Z"}},"place":null,"community_id":null,"birdwatch_note":null,"pinned":false},"… 18 more"],"cached":false,"credits_used":1}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/twitter/v1/user/tweets":{"get":{"operationId":"twitterUserTweets","summary":"X user tweets","description":"An account's tweets, newest first (pinned first on page 1), with its own threads: text, time, likes, reposts, replies, quotes, bookmarks, views, media, links, quoted and reposted tweets. Filters: `since` and `until` (dates) and `media_only`; they are applied to the timeline as it is read (up to 3 timeline pages per call), so a page can hold fewer tweets than `count`; keep paging with `next_cursor` (null once the timeline passes `since`). Replies to other accounts are not shown to logged-out visitors, so they are not included.\n\nEvery response includes `credits_used`: the credits this call cost.\n\nX serves about 100 recent tweets to logged-out clients.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/twitter-user-tweets","tags":["X (Twitter)"],"x-credits":1,"parameters":[{"name":"username","in":"query","required":true,"schema":{"type":"string"},"example":"nasa"},{"name":"count","in":"query","required":false,"description":"Tweets per page, 1-100 (default 20).","schema":{"type":"integer"}},{"name":"cursor","in":"query","required":false,"description":"Value of `next_cursor` from the previous page.","schema":{"type":"string"}},{"name":"since","in":"query","required":false,"description":"Only tweets posted on or after this date (YYYY-MM-DD).","schema":{"type":"string"}},{"name":"until","in":"query","required":false,"description":"Only tweets posted on or before this date (YYYY-MM-DD).","schema":{"type":"string"}},{"name":"media_only","in":"query","required":false,"description":"true for tweets with photos, videos or GIFs only.","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"username":"nasa","user_id":"11348282","count":22,"next_cursor":"DAAHCgABHWQkrqk__-0LAAIAAAATMjExNTg4NjA4NjEwNzE0ODcxOQgAAwAAAAIAAA","previous_cursor":"DAAHCgABHWQkrqlAJxELAAIAAAATMjExNzY5MDQxNTYxNjg2ODQ4MQgAAwAAAAEAAA","instruction_types":["TimelineClearCache","TimelineAddEntries","… 1 more"],"entry_ids":["tweet-2117690415616868481","tweet-2117646637132849276","… 19 more"],"tweets":[{"id":"2117690415616868481","url":"https://x.com/NASA/status/2117690415616868481","text":"RT @LearnWithNASA: Ready for a special National STEM Day Q&A? \n\nTune in tomorrow as students across the country connect live with @NASA ast…","created_at":"Tue Nov 03 18:48:34 +0000 2026","lang":"en","likes":0,"retweets":37,"replies":0,"quotes":0,"bookmarks":0,"views":47176,"author":{"id":"11348282","username":"NASA","name":"NASA","verified":true},"reply_to":null,"conversation_id":"2117690415616868481","hashtags":[],"mentions":["LearnWithNASA","NASA"],"links":[],"media":[],"retweet_of":{"id":"2117641114106609894","url":"https://x.com/LearnWithNASA/status/2117641114106609894","text":"Ready for a special National STEM Day Q&A? \n\nTune in tomorrow as students across the country connect live with @NASA astronaut @astro_anil a…","created_at":"Tue Nov 03 15:32:40 +0000 2026","lang":"en","likes":268,"retweets":37,"replies":5,"quotes":0,"bookmarks":13,"views":118590,"author":{"id":"238285207","username":"LearnWithNASA","name":"Learn With NASA","verified":true},"reply_to":null,"conversation_id":"2117641114106609894","hashtags":[],"mentions":["NASA","astro_anil","… 2 more"],"links":["https://www.nasa.gov/learning-resources/nasa-astronaut-stem-creator-connect-with-students-for-stem-day/"],"media":[{"…":"21 fields"}],"retweet_of":null,"quote_of":null,"author_details":{"avatar":"https://pbs.twimg.com/profile_images/1940110194161180672/7zC75Wri_400x400.jpg","followers":404928,"following":141,"verified_type":"Government","protected":false,"created_at":"Fri Jan 14 20:26:23 +0000 2011","bio":"We are engaging students in NASA’s exciting missions, broad range of careers, and unique opportunities.","location":""},"user_id":"238285207","reply_to_user":null,"reply_to_user_id":null,"quoted_tweet_id":null,"is_quote":false,"is_retweet":false,"possibly_sensitive":false,"source":null,"display_text_range":[0,221],"is_long":false,"views_state":"EnabledWithCount","is_translatable":false,"edit":{"edit_tweet_ids":["2117641114106609894"],"editable_until":"2026-11-03T16:32:40.000Z","edits_remaining":5,"is_edit_eligible":true},"entities":{"hashtags":[],"mentions":[{"…":"4 fields"},{"…":"4 fields"},"… 2 more"],"urls":[{"…":"4 fields"}],"symbols":[]},"card":null,"place":null,"community_id":null,"birdwatch_note":null},"quote_of":null,"author_details":{"avatar":"https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg","followers":92290451,"following":115,"verified_type":"Government","protected":false,"created_at":"Wed Dec 19 20:20:32 +0000 2007","bio":"Making the seemingly impossible, possible. ✨","location":"Pale Blue Dot"},"user_id":"11348282","reply_to_user":null,"reply_to_user_id":null,"quoted_tweet_id":null,"is_quote":false,"is_retweet":true,"possibly_sensitive":null,"source":"Twitter Web App","display_text_range":[0,144],"is_long":false,"views_state":"EnabledWithCount","is_translatable":false,"edit":{"edit_tweet_ids":["2117690415616868481"],"editable_until":"2026-11-03T19:48:34.525Z","edits_remaining":5,"is_edit_eligible":false},"entities":{"hashtags":[],"mentions":[{"…":"4 fields"},{"…":"4 fields"}],"urls":[],"symbols":[]},"card":null,"place":null,"community_id":null,"birdwatch_note":null,"pinned":false},{"id":"2117646637132849276","url":"https://x.com/NASA/status/2117646637132849276","text":"RT @astro_anil: Yes, you can even vote from space!  All three US crew members had the privilege of voting from space station.  We filled ou…","created_at":"Tue Nov 03 15:54:36 +0000 2026","lang":"en","likes":0,"retweets":657,"replies":0,"quotes":0,"bookmarks":0,"views":53203,"author":{"id":"11348282","username":"NASA","name":"NASA","verified":true},"reply_to":null,"conversation_id":"2117646637132849276","hashtags":[],"mentions":["astro_anil"],"links":[],"media":[],"retweet_of":{"id":"2117625618200219782","url":"https://x.com/astro_anil/status/2117625618200219782","text":"Yes, you can even vote from space!  All three US crew members had the privilege of voting from space station.  We filled out an electronic b…","created_at":"Tue Nov 03 14:31:05 +0000 2026","lang":"en","likes":4859,"retweets":657,"replies":67,"quotes":102,"bookmarks":206,"views":356403,"author":{"id":"1456357980216066048","username":"astro_anil","name":"Anil Menon","verified":true},"reply_to":null,"conversation_id":"2117625618200219782","hashtags":[],"mentions":[],"links":[],"media":[{"…":"23 fields"}],"retweet_of":null,"quote_of":null,"author_details":{"avatar":"https://pbs.twimg.com/profile_images/2052785413719212034/9NTTJaza_400x400.jpg","followers":22541,"following":111,"verified_type":"Government","protected":false,"created_at":"Thu Nov 04 20:38:58 +0000 2021","bio":"👩🏽‍🚀 NASA Astronaut aboard the ISS | 🚀Soyuz launch from Kazakhstan 14 July 2026 | 🎖️Colonel United States Space Force | ⚕️Emergency doctor a…","location":"International Space Station"},"user_id":"1456357980216066048","reply_to_user":null,"reply_to_user_id":null,"quoted_tweet_id":null,"is_quote":false,"is_retweet":false,"possibly_sensitive":false,"source":null,"display_text_range":[0,193],"is_long":false,"views_state":"EnabledWithCount","is_translatable":false,"edit":{"edit_tweet_ids":["2117625618200219782"],"editable_until":"2026-11-03T15:31:05.000Z","edits_remaining":5,"is_edit_eligible":true},"entities":{"hashtags":[],"mentions":[],"urls":[],"symbols":[]},"card":null,"place":null,"community_id":null,"birdwatch_note":null},"quote_of":null,"author_details":{"avatar":"https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg","followers":92290451,"following":115,"verified_type":"Government","protected":false,"created_at":"Wed Dec 19 20:20:32 +0000 2007","bio":"Making the seemingly impossible, possible. ✨","location":"Pale Blue Dot"},"user_id":"11348282","reply_to_user":null,"reply_to_user_id":null,"quoted_tweet_id":null,"is_quote":false,"is_retweet":true,"possibly_sensitive":null,"source":"Twitter Web App","display_text_range":[0,140],"is_long":false,"views_state":"EnabledWithCount","is_translatable":false,"edit":{"edit_tweet_ids":["2117646637132849276"],"editable_until":"2026-11-03T16:54:36.921Z","edits_remaining":5,"is_edit_eligible":false},"entities":{"hashtags":[],"mentions":[{"…":"4 fields"}],"urls":[],"symbols":[]},"card":null,"place":null,"community_id":null,"birdwatch_note":null,"pinned":false},"… 20 more"],"cached":false,"credits_used":1}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Create keys at https://app.api.sh/keys. Authorization: Bearer <key> also works."}},"parameters":{"raw":{"name":"raw","in":"query","required":false,"description":"0 leaves out the bulky `raw` source blocks (often 10-30x smaller).","schema":{"type":"string","enum":["0","1"]}},"fields":{"name":"fields","in":"query","required":false,"description":"Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.","schema":{"type":"string"}},"fresh":{"name":"fresh","in":"query","required":false,"description":"1 skips the 24-hour cache and fetches live.","schema":{"type":"string","enum":["1"]}},"output":{"name":"output","in":"query","required":false,"description":"csv or ndjson returns the response's records (its main list, or the object as one row) as CSV or NDJSON instead of JSON.","schema":{"type":"string","enum":["json","csv","ndjson"]}},"records":{"name":"records","in":"query","required":false,"description":"With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row.","schema":{"type":"string"}}},"schemas":{"Error":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["success","error"]}},"responses":{"E400":{"description":"A parameter is missing or invalid. Not charged (unless the call ran and the source rejected the value; credits_used says).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E401":{"description":"Missing, invalid, revoked or expired API key. Not charged. See https://api.sh/docs/errors#401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E402":{"description":"Not enough credits, a spend limit you set was reached (`spend_limit`), or the key's monthly credit cap was reached (`key_cap`). Not charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E404":{"description":"Not found, or not public. A lookup that ran costs the endpoint's price (credits_used says); an unknown route is free.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E502":{"description":"The source site failed this time; retry. Not charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E503":{"description":"Endpoint paused or temporarily unavailable; may include retry-after. Not charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"headers":{"x-request-id":{"description":"The call's id (logs, re-fetch with /v1/results/{id}).","schema":{"type":"string","format":"uuid"}},"x-credits-used":{"description":"Credits charged for this call.","schema":{"type":"integer"}},"x-credits-remaining":{"description":"Balance after the call.","schema":{"type":"integer"}}}},"externalDocs":{"url":"https://api.sh/docs"}}