{"openapi":"3.1.0","info":{"title":"xscraper API","version":"1.0.0","description":"X (Twitter) data over REST: profiles, tweets, search, followers, lists and trends. Every call costs a fixed number of tokens (see `x-token-price` on each operation); failed calls are refunded, a 404 is charged. New accounts get 1,000 free tokens."},"servers":[{"url":"https://api.xscraper.online"}],"security":[{"apiKey":[]}],"paths":{"/api/v1/twitter/users/profile_by_username/{username}":{"get":{"operationId":"profile_by_username","tags":["Profiles"],"summary":"Profile by username","description":"Full public profile: bio, counts, avatar, banner, verification. Costs 1 token per successful call.","parameters":[{"name":"username","in":"path","required":true,"description":"Screen name without the @.","schema":{"type":"string"},"example":"elonmusk"}],"x-token-price":{"base":1,"perPage":0,"pageSize":1,"min":1,"max":1},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":{"userId":"2244994945","username":"XDevelopers","name":"Developers","url":"https://x.com/XDevelopers","biography":"The voice of the X Dev team and your official source for updates, news, and events, related to the X API.","bioLinks":[],"location":"127.0.0.1","website":"https://docs.x.com/","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","banner":"https://pbs.twimg.com/profile_banners/2244994945/1690213128","joined":"2013-12-14T04:35:55.000Z","followersCount":698112,"followingCount":765,"friendsCount":765,"tweetsCount":4349,"likesCount":2685,"mediaCount":830,"listedCount":2978,"pinnedTweetIds":["2019881223666233717"],"isPrivate":false,"isVerified":false,"isBlueVerified":true,"verifiedType":"Business","canDm":true,"professional":{"type":"Business","categories":["Community"]},"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg"},"parodyLabel":null,"defaultProfile":false,"defaultProfileImage":false,"possiblySensitive":false},"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/users/profile_by_userid/{userId}":{"get":{"operationId":"profile_by_userid","tags":["Profiles"],"summary":"Profile by user ID","description":"Profile for a numeric user ID. Resolves the username first, up to 4 upstream calls. Costs 3 tokens per successful call.","parameters":[{"name":"userId","in":"path","required":true,"description":"Numeric user ID.","schema":{"type":"string"},"example":"44196397"}],"x-token-price":{"base":3,"perPage":0,"pageSize":1,"min":3,"max":3},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":{"userId":"2244994945","username":"XDevelopers","name":"Developers","url":"https://x.com/XDevelopers","biography":"The voice of the X Dev team and your official source for updates, news, and events, related to the X API.","bioLinks":[],"location":"127.0.0.1","website":"https://docs.x.com/","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","banner":"https://pbs.twimg.com/profile_banners/2244994945/1690213128","joined":"2013-12-14T04:35:55.000Z","followersCount":698112,"followingCount":765,"friendsCount":765,"tweetsCount":4349,"likesCount":2685,"mediaCount":830,"listedCount":2978,"pinnedTweetIds":["2019881223666233717"],"isPrivate":false,"isVerified":false,"isBlueVerified":true,"verifiedType":"Business","canDm":true,"professional":{"type":"Business","categories":["Community"]},"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg"},"parodyLabel":null,"defaultProfile":false,"defaultProfileImage":false,"possiblySensitive":false},"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/users/user_id/{username}":{"get":{"operationId":"user_id","tags":["Profiles"],"summary":"Username to user ID","description":"Resolve a screen name to its numeric user ID. Costs 1 token per successful call.","parameters":[{"name":"username","in":"path","required":true,"description":"Screen name without the @.","schema":{"type":"string"},"example":"elonmusk"}],"x-token-price":{"base":1,"perPage":0,"pageSize":1,"min":1,"max":1},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":{"userId":"2244994945","username":"XDevelopers","name":"Developers","url":"https://x.com/XDevelopers","biography":"The voice of the X Dev team and your official source for updates, news, and events, related to the X API.","bioLinks":[],"location":"127.0.0.1","website":"https://docs.x.com/","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","banner":"https://pbs.twimg.com/profile_banners/2244994945/1690213128","joined":"2013-12-14T04:35:55.000Z","followersCount":698112,"followingCount":765,"friendsCount":765,"tweetsCount":4349,"likesCount":2685,"mediaCount":830,"listedCount":2978,"pinnedTweetIds":["2019881223666233717"],"isPrivate":false,"isVerified":false,"isBlueVerified":true,"verifiedType":"Business","canDm":true,"professional":{"type":"Business","categories":["Community"]},"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg"},"parodyLabel":null,"defaultProfile":false,"defaultProfileImage":false,"possiblySensitive":false},"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/users/search_profiles":{"get":{"operationId":"search_profiles","tags":["Search"],"summary":"Search profiles","description":"Find accounts matching a query, with cursor pagination. Costs 4–6 tokens per successful call.","parameters":[{"name":"query","in":"query","required":true,"description":"Search query. `q` is accepted as an alias.","schema":{"type":"string"},"example":"elon"},{"name":"count","in":"query","required":false,"description":"Items to return, 1–50. Default 20.","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"cursor","in":"query","required":false,"description":"Cursor from a previous response's `next` field.","schema":{"type":"string"}}],"x-token-price":{"base":3,"perPage":1,"pageSize":20,"min":4,"max":6},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":{"tweets":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"next":"DAADDAABCgAB…"},"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/users/tweets/{username}":{"get":{"operationId":"user_tweets","tags":["Tweets"],"summary":"User tweets","description":"Most recent tweets from a user, newest first. Costs 3–7 tokens per successful call.","parameters":[{"name":"username","in":"path","required":true,"description":"Screen name without the @.","schema":{"type":"string"},"example":"elonmusk"},{"name":"count","in":"query","required":false,"description":"Items to return, 1–100. Default 5.","schema":{"type":"integer","minimum":1,"maximum":100,"default":5}}],"x-token-price":{"base":2,"perPage":1,"pageSize":20,"min":3,"max":7},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/users/latest_tweet/{username}":{"get":{"operationId":"latest_tweet","tags":["Tweets"],"summary":"Latest tweet","description":"The single most recent tweet from a user. Costs 1 token per successful call.","parameters":[{"name":"username","in":"path","required":true,"description":"Screen name without the @.","schema":{"type":"string"},"example":"elonmusk"}],"x-token-price":{"base":1,"perPage":0,"pageSize":1,"min":1,"max":1},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/users/replies/{username}":{"get":{"operationId":"user_replies","tags":["Tweets"],"summary":"User tweets and replies","description":"Tweets and replies from a user, newest first. Costs 3–7 tokens per successful call.","parameters":[{"name":"username","in":"path","required":true,"description":"Screen name without the @.","schema":{"type":"string"},"example":"elonmusk"},{"name":"count","in":"query","required":false,"description":"Items to return, 1–100. Default 5.","schema":{"type":"integer","minimum":1,"maximum":100,"default":5}}],"x-token-price":{"base":2,"perPage":1,"pageSize":20,"min":3,"max":7},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/users/tweets_by_user_id/{userId}":{"get":{"operationId":"tweets_by_user_id","tags":["Tweets"],"summary":"User tweets by ID","description":"Most recent tweets for a numeric user ID. Costs 3–7 tokens per successful call.","parameters":[{"name":"userId","in":"path","required":true,"description":"Numeric user ID.","schema":{"type":"string"},"example":"44196397"},{"name":"count","in":"query","required":false,"description":"Items to return, 1–100. Default 5.","schema":{"type":"integer","minimum":1,"maximum":100,"default":5}}],"x-token-price":{"base":2,"perPage":1,"pageSize":20,"min":3,"max":7},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/users/replies_by_user_id/{userId}":{"get":{"operationId":"replies_by_user_id","tags":["Tweets"],"summary":"User tweets and replies by ID","description":"Tweets and replies for a numeric user ID. Costs 3–7 tokens per successful call.","parameters":[{"name":"userId","in":"path","required":true,"description":"Numeric user ID.","schema":{"type":"string"},"example":"44196397"},{"name":"count","in":"query","required":false,"description":"Items to return, 1–100. Default 5.","schema":{"type":"integer","minimum":1,"maximum":100,"default":5}}],"x-token-price":{"base":2,"perPage":1,"pageSize":20,"min":3,"max":7},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/users/likes/{username}":{"get":{"operationId":"user_likes","tags":["Tweets"],"summary":"Liked tweets","description":"Tweets a user liked, with cursor pagination. Costs 4–8 tokens per successful call.","parameters":[{"name":"username","in":"path","required":true,"description":"Screen name without the @.","schema":{"type":"string"},"example":"elonmusk"},{"name":"count","in":"query","required":false,"description":"Items to return, 1–100. Default 20.","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","required":false,"description":"Cursor from a previous response's `next` field.","schema":{"type":"string"}}],"x-token-price":{"base":3,"perPage":1,"pageSize":20,"min":4,"max":8},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/tweets/{tweetId}":{"get":{"operationId":"tweet","tags":["Tweets"],"summary":"Tweet by ID","description":"A single tweet with media, counts and author. Costs 1 token per successful call.","parameters":[{"name":"tweetId","in":"path","required":true,"description":"Tweet ID.","schema":{"type":"string"},"example":"1722715025402413077"}],"x-token-price":{"base":1,"perPage":0,"pageSize":1,"min":1,"max":1},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/tweets/{tweetId}/replies":{"get":{"operationId":"tweet_replies","tags":["Tweets"],"summary":"Tweet replies","description":"Replies in a tweet's conversation, 20 per page. Costs 4 tokens per successful call.","parameters":[{"name":"tweetId","in":"path","required":true,"description":"Tweet ID.","schema":{"type":"string"},"example":"1722715025402413077"},{"name":"cursor","in":"query","required":false,"description":"Cursor from a previous response's `next` field.","schema":{"type":"string"}}],"x-token-price":{"base":4,"perPage":0,"pageSize":1,"min":4,"max":4},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/tweets/{tweetId}/quotes":{"get":{"operationId":"tweet_quotes","tags":["Tweets"],"summary":"Tweet quotes","description":"Quote tweets of a tweet, 20 per page. Costs 4 tokens per successful call.","parameters":[{"name":"tweetId","in":"path","required":true,"description":"Tweet ID.","schema":{"type":"string"},"example":"1722715025402413077"},{"name":"cursor","in":"query","required":false,"description":"Cursor from a previous response's `next` field.","schema":{"type":"string"}}],"x-token-price":{"base":4,"perPage":0,"pageSize":1,"min":4,"max":4},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/tweets/search":{"get":{"operationId":"search","tags":["Search"],"summary":"Search tweets","description":"Search tweets with X search operators. Returns up to `count` results. Costs 6–14 tokens per successful call.","parameters":[{"name":"query","in":"query","required":true,"description":"Search query. `q` is accepted as an alias.","schema":{"type":"string"},"example":"bitcoin"},{"name":"count","in":"query","required":false,"description":"Items to return, 1–100. Default 20.","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"mode","in":"query","required":false,"description":"latest (default), top, photos, videos, or users. 1 = latest, 0 = top.","schema":{"type":"string"},"example":"latest"},{"name":"cursor","in":"query","required":false,"description":"Cursor from a previous response's `next` field.","schema":{"type":"string"}}],"x-token-price":{"base":4,"perPage":2,"pageSize":20,"min":6,"max":14},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":{"tweets":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"next":"DAADDAABCgAB…"},"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/tweets/advanced_search":{"get":{"operationId":"advanced_search","tags":["Search"],"summary":"Advanced search","description":"Search tweets page by page. Pass `next` back as `cursor` for the next page. Costs 8–12 tokens per successful call.","parameters":[{"name":"query","in":"query","required":true,"description":"Search query. `q` is accepted as an alias.","schema":{"type":"string"},"example":"from:elonmusk"},{"name":"count","in":"query","required":false,"description":"Items to return, 1–50. Default 20.","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"mode","in":"query","required":false,"description":"latest (default), top, photos, videos, or users. 1 = latest, 0 = top.","schema":{"type":"string"},"example":"latest"},{"name":"cursor","in":"query","required":false,"description":"Cursor from a previous response's `next` field.","schema":{"type":"string"}}],"x-token-price":{"base":6,"perPage":2,"pageSize":20,"min":8,"max":12},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":{"tweets":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"next":"DAADDAABCgAB…"},"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/users/followers/{userId}":{"get":{"operationId":"followers","tags":["Social graph"],"summary":"Followers","description":"Accounts following a user, up to 50 per page. Pass `next` back as `cursor` for more. Costs 4 tokens per successful call.","parameters":[{"name":"userId","in":"path","required":true,"description":"Numeric user ID.","schema":{"type":"string"},"example":"44196397"},{"name":"count","in":"query","required":false,"description":"Items to return, 1–50. Default 50.","schema":{"type":"integer","minimum":1,"maximum":50,"default":50}},{"name":"cursor","in":"query","required":false,"description":"Cursor from a previous response's `next` field.","schema":{"type":"string"}}],"x-token-price":{"base":3,"perPage":1,"pageSize":50,"min":4,"max":4},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":{"profiles":[{"userId":"2244994945","username":"XDevelopers","name":"Developers","url":"https://x.com/XDevelopers","biography":"The voice of the X Dev team and your official source for updates, news, and events, related to the X API.","bioLinks":[],"location":"127.0.0.1","website":"https://docs.x.com/","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","banner":"https://pbs.twimg.com/profile_banners/2244994945/1690213128","joined":"2013-12-14T04:35:55.000Z","followersCount":698112,"followingCount":765,"friendsCount":765,"tweetsCount":4349,"likesCount":2685,"mediaCount":830,"listedCount":2978,"pinnedTweetIds":["2019881223666233717"],"isPrivate":false,"isVerified":false,"isBlueVerified":true,"verifiedType":"Business","canDm":true,"professional":{"type":"Business","categories":["Community"]},"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg"},"parodyLabel":null,"defaultProfile":false,"defaultProfileImage":false,"possiblySensitive":false}],"next":"1846419170546342870|2102219347227549663"},"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/users/following/{userId}":{"get":{"operationId":"following","tags":["Social graph"],"summary":"Following","description":"Accounts a user follows, up to 50 per page. Pass `next` back as `cursor` for more. Costs 4 tokens per successful call.","parameters":[{"name":"userId","in":"path","required":true,"description":"Numeric user ID.","schema":{"type":"string"},"example":"44196397"},{"name":"count","in":"query","required":false,"description":"Items to return, 1–50. Default 50.","schema":{"type":"integer","minimum":1,"maximum":50,"default":50}},{"name":"cursor","in":"query","required":false,"description":"Cursor from a previous response's `next` field.","schema":{"type":"string"}}],"x-token-price":{"base":3,"perPage":1,"pageSize":50,"min":4,"max":4},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":{"profiles":[{"userId":"2244994945","username":"XDevelopers","name":"Developers","url":"https://x.com/XDevelopers","biography":"The voice of the X Dev team and your official source for updates, news, and events, related to the X API.","bioLinks":[],"location":"127.0.0.1","website":"https://docs.x.com/","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","banner":"https://pbs.twimg.com/profile_banners/2244994945/1690213128","joined":"2013-12-14T04:35:55.000Z","followersCount":698112,"followingCount":765,"friendsCount":765,"tweetsCount":4349,"likesCount":2685,"mediaCount":830,"listedCount":2978,"pinnedTweetIds":["2019881223666233717"],"isPrivate":false,"isVerified":false,"isBlueVerified":true,"verifiedType":"Business","canDm":true,"professional":{"type":"Business","categories":["Community"]},"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg"},"parodyLabel":null,"defaultProfile":false,"defaultProfileImage":false,"possiblySensitive":false}],"next":"1846419170546342870|2102219347227549663"},"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/lists/{listId}/tweets":{"get":{"operationId":"list_tweets","tags":["Lists"],"summary":"List tweets","description":"Tweets from a list timeline, with cursor pagination. Costs 3–7 tokens per successful call.","parameters":[{"name":"listId","in":"path","required":true,"description":"List ID.","schema":{"type":"string"},"example":"1580661677227986944"},{"name":"count","in":"query","required":false,"description":"Items to return, 1–100. Default 20.","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","required":false,"description":"Cursor from a previous response's `next` field.","schema":{"type":"string"}}],"x-token-price":{"base":2,"perPage":1,"pageSize":20,"min":3,"max":7},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":{"tweets":[{"id":"2019881223666233717","text":"Officially launching X API Pay-Per-Use …","html":"Officially launching X API Pay-Per-Use …","userId":"2244994945","username":"XDevelopers","name":"Developers","permanentUrl":"https://x.com/XDevelopers/status/2019881223666233717","conversationId":"2019881223666233717","timeParsed":"2026-02-06T21:09:45.000Z","timestamp":1770412185,"likes":5589,"retweets":908,"replies":795,"quoteCount":593,"bookmarkCount":2804,"views":2544772,"lang":"en","source":"Twitter Web App","hashtags":[],"cashtags":[],"mentions":[],"urls":["http://developer.x.com"],"links":[{"url":"http://developer.x.com","displayUrl":"developer.x.com"}],"photos":[],"videos":[],"media":[{"id":"1585341912877146112","type":"video","url":"https://pbs.twimg.com/ext_tw_video_thumb/1585341912877146112/pu/img/DwJ7wlGIe9iryk6N.jpg","altText":null,"width":1920,"height":1080,"durationMs":9301,"variants":[{"url":"https://video.twimg.com/…/1920x1080/….mp4","contentType":"video/mp4","bitrate":10368000},{"url":"https://video.twimg.com/…/1280x720/….mp4","contentType":"video/mp4","bitrate":2176000},{"url":"https://video.twimg.com/…/pl/….m3u8","contentType":"application/x-mpegURL","bitrate":null}]}],"card":{"name":"summary_large_image","url":"https://t.co/FS66GuIYJD","title":"X Developer Platform","description":"Use the X API with an all-new Developer Console and consumption-based billing.","domain":"developer.x.com","image":"https://pbs.twimg.com/card_img/2100194922750230528/E7alxN6C?format=jpg&name=orig"},"author":{"userId":"2244994945","username":"XDevelopers","name":"Developers","avatar":"https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw.jpg","isBlueVerified":true,"verifiedType":"Business","isPrivate":false,"followersCount":698112,"followingCount":765,"affiliation":{"label":"X","url":"https://twitter.com/X","badgeUrl":"https://pbs.twimg.com/profile_images/…"}},"isQuoted":false,"isReply":false,"isRetweet":false,"isPin":true,"isEdited":false,"versions":["2019881223666233717"],"sensitiveContent":false,"inReplyToUserId":null,"inReplyToUsername":null,"thread":[]}],"next":"DAACCgACGZ…"},"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/twitter/trends":{"get":{"operationId":"trends","tags":["Trends"],"summary":"Trends","description":"Current trending topics. Costs 2 tokens per successful call.","parameters":[],"x-token-price":{"base":2,"perPage":0,"pageSize":1,"min":2,"max":2},"responses":{"200":{"description":"Success. The payload is in `data`.","headers":{"x-tokens-cost":{"description":"Tokens this call cost.","schema":{"type":"integer"}},"x-tokens-remaining":{"description":"Token balance after this call.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"},"example":{"success":true,"message":"…","data":["#example","Another trend"],"errors":null}}}},"400":{"description":"A parameter is missing or invalid. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing, unknown or revoked x-api-key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"Your balance is lower than the call's price. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"403":{"description":"The endpoint needs an admin key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"The user, tweet or list does not exist or is not visible. Charged: the lookup ran.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"More than 100 requests in a minute on one key. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"503":{"description":"The scraper pool is busy. Retry after the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"5XX":{"description":"Upstream failure. Safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"Envelope":{"type":"object","required":["success","message","data","errors"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{},"errors":{"type":["array","null"],"items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}}}}