# twitterapi.io - [Introduction](https://docs.twitterapi.io/introduction.md): twitterapi.io docs.The best third-party Twitter API: reliable, high-performance, supports high QPS, and cost-effective. - [Quickstart](https://docs.twitterapi.io/quickstart.md): Make your first twitterapi.io call in about two minutes: get an API key, run one request, read the JSON. - [Authentication](https://docs.twitterapi.io/authentication.md): Authenticate every twitterapi.io request by sending your API key in the x-api-key header (or as Authorization: Bearer). Get your key from the dashboard after signing up. - [Pricing](https://docs.twitterapi.io/pricing.md): Pay-as-you-go credits: what each endpoint costs, how the minimum charge works, and how to keep costs down. - [Rate limits](https://docs.twitterapi.io/rate-limits.md): Requests-per-second limits by account type, and what happens when you exceed them. - [Pagination](https://docs.twitterapi.io/pagination.md): How cursor-based pagination works for search, timelines, followers and other list endpoints. - [Errors](https://docs.twitterapi.io/errors.md): HTTP status codes returned by twitterapi.io, what they mean, and how your code should react. - [Vercel AI SDK](https://docs.twitterapi.io/integrations/vercel-ai-sdk.md): Give AI SDK agents read-only X (Twitter) data with @twitterapi_io/ai-sdk: tweet search, profiles, timelines, mentions, threads and trends. - [CrewAI](https://docs.twitterapi.io/integrations/crewai.md): Give CrewAI agents read-only X (Twitter) data, either through the hosted twitterapi.io MCP server or the crewai-twitterapi-io tools package. - [Cursor](https://docs.twitterapi.io/integrations/cursor.md): Read X (Twitter) data from Cursor's agent with the twitterapi.io MCP server: install the plugin or add one entry to mcp.json. - [Batch Get User Info By UserIds](https://docs.twitterapi.io/api-reference/endpoint/batch_get_user_by_userids.md): Get X user profiles for many user IDs in one request. 1 credit per user when 100 or more users are returned, 18 credits per user below 100. - [Get User Info](https://docs.twitterapi.io/api-reference/endpoint/get_user_by_username.md): Get an X user's profile by username: followers, following, bio, verification, pinned tweet and more. Missing and suspended accounts are flagged. - [Get User TimeLine](https://docs.twitterapi.io/api-reference/endpoint/get_user_timeline.md): Get an X user's tweet timeline by user ID, in the same order as their profile in the X app, up to 20 tweets per page with cursor pagination. - [Get User Last Tweets](https://docs.twitterapi.io/api-reference/endpoint/get_user_last_tweets.md): Get an X user's latest tweets by username, newest first, up to 20 per page. For frequent checks of many accounts, use Twitter Stream instead. - [Get User Followers](https://docs.twitterapi.io/api-reference/endpoint/get_user_followers.md): Get an X user's followers with full profiles, newest first, up to 200 per page with cursor pagination. From $0.01 per 1,000 followers. - [Get User Followers IDs (Bulk)](https://docs.twitterapi.io/api-reference/endpoint/get_user_followers_ids.md): Get an X user's follower IDs in bulk, up to 5,000 per call with cursor pagination. IDs only, no profiles. From $4.50 per million IDs. - [Get User Followings](https://docs.twitterapi.io/api-reference/endpoint/get_user_followings.md): Get the accounts an X user follows, with full profiles, most recent first, up to 200 per page with cursor pagination. From $0.01 per 1,000. - [Get User Mentions](https://docs.twitterapi.io/api-reference/endpoint/get_user_mention.md): get tweet mentions by user screen name.Each page returns exactly 20 mentions. Use cursor for pagination. Order by mention time desc - [Check Follow Relationship](https://docs.twitterapi.io/api-reference/endpoint/check_follow_relationship.md): Check if the user is following/followed by the target user. Price: 100 credits ($0.001 per call). - [Search user by keyword](https://docs.twitterapi.io/api-reference/endpoint/search_user.md): Search X users by keyword and get matching accounts with full profiles: username, name, bio, followers and verification, with pagination. - [Get User Verified Followers](https://docs.twitterapi.io/api-reference/endpoint/get_user_verified_followers.md): Get an X user's verified followers, newest first, 20 per page with cursor pagination. 3 credits per follower ($0.03 per 1,000). - [Get User Profile About](https://docs.twitterapi.io/api-reference/endpoint/get_user_about.md): Get the About section of an X profile by username: account country, how it was created, username change history and verification details. - [Get Tweets by IDs](https://docs.twitterapi.io/api-reference/endpoint/get_tweet_by_ids.md): Get full data for one or more X tweets by tweet ID: text, author, media, metrics, quoted and retweeted tweets, in one request. - [Get Tweet Replies](https://docs.twitterapi.io/api-reference/endpoint/get_tweet_reply.md): Get replies to an X tweet by tweet ID, newest first, up to 20 per page with cursor pagination. Ads and non-tweet items are filtered out. - [Get Tweet Replies V2](https://docs.twitterapi.io/api-reference/endpoint/get_tweet_replies_v2.md): Get tweet replies by tweet id (V2). Each page returns up to 20 replies. Use cursor for pagination. Supports sorting by Relevance, Latest, or Likes. - [Get Tweet Quotations](https://docs.twitterapi.io/api-reference/endpoint/get_tweet_quote.md): get tweet quotes by tweet id.Each page returns exactly 20 quotes. Use cursor for pagination. Order by quote time desc - [Get Tweet Retweeters](https://docs.twitterapi.io/api-reference/endpoint/get_tweet_retweeter.md): get tweet retweeters by tweet id.Each page returns about 100 retweeters. Use cursor for pagination. Order by retweet time desc - [Get Tweet Thread Context](https://docs.twitterapi.io/api-reference/endpoint/get_tweet_thread_context.md): Get the full thread around a tweet: the tweets it replies to and the replies below it, with pagination. Page size is set by X and varies. - [Get Article](https://docs.twitterapi.io/api-reference/endpoint/get_article.md): Get the full content of an X Article (long-form post) by the tweet ID that shares it, including title and body. 100 credits per article. - [Advanced Search](https://docs.twitterapi.io/api-reference/endpoint/tweet_advanced_search.md): Advanced search for tweets.Each page returns up to 20 replies(Sometimes less than 20,because we will filter out ads or other not tweets). - [Get List Tweet TimeLine](https://docs.twitterapi.io/api-reference/endpoint/list_timeline.md): Get the tweet timeline of an X List by list ID: recent tweets from all list members, with cursor pagination through older tweets. - [Get List Followers](https://docs.twitterapi.io/api-reference/endpoint/get_list_followers.md): Get the followers of an X List by list ID, 20 per page with cursor pagination. Each follower comes with a full user profile. - [Get List Members](https://docs.twitterapi.io/api-reference/endpoint/get_list_members.md): Get the members of an X List by list ID, 20 per page with cursor pagination. Each member comes with a full user profile. - [Get Community Info By Id](https://docs.twitterapi.io/api-reference/endpoint/get_community_by_id.md): Get community info by community id. Price: 20 credits per call. Note: This API is a bit slow, we are still optimizing it. - [Get Community Members](https://docs.twitterapi.io/api-reference/endpoint/get_community_members.md): Get the members of an X Community by community ID, 20 per page with cursor pagination. Each member comes with a full user profile. - [Get Community Moderators](https://docs.twitterapi.io/api-reference/endpoint/get_community_moderators.md): Get the moderators of an X Community by community ID, 20 per page with cursor pagination. Each moderator comes with a full user profile. - [Get Community Tweets](https://docs.twitterapi.io/api-reference/endpoint/get_community_tweets.md): Get tweets posted in an X Community by community ID, newest first, 20 per page with cursor pagination. Includes full author and tweet data. - [Search Tweets From All Community ](https://docs.twitterapi.io/api-reference/endpoint/get_all_community_tweets.md): Search tweets across all X Communities, about 20 per page (varies) with cursor pagination. Useful for monitoring topics discussed inside communities. - [Get Trends](https://docs.twitterapi.io/api-reference/endpoint/get_trends.md): Get trending topics on X for a location by WOEID (worldwide, a country or a city), with an optional count of how many trends to return. - [Get Space Detail](https://docs.twitterapi.io/api-reference/endpoint/get_space_detail.md): Get details of an X Space by space ID: title, state, creator, participants, stats, and created and scheduled start times. - [Get My Account Info](https://docs.twitterapi.io/api-reference/endpoint/get_my_info.md): Get the remaining credit balance of the twitterapi.io account behind your API key. Useful for monitoring usage and topping up in time. - [Post & Action V2 overview](https://docs.twitterapi.io/api-reference/post-action-v2.md): Act as an X (Twitter) account through the API: post, like, retweet, follow, pin, mute, block, upload media and update the profile. - [Log in](https://docs.twitterapi.io/api-reference/endpoint/user_login_v2.md): Log in to an X account with email, username, password and 2FA secret to get login cookies for the v2 posting endpoints. 10,000 credits per login. - [Create/Reply tweet v2](https://docs.twitterapi.io/api-reference/endpoint/create_tweet_v2.md): Create a tweet.You must set the login_cookies.You can get the login_cookies from /twitter/user_login_v2.Price: 60 credits ($0.0006 per call). - [Delete Tweet](https://docs.twitterapi.io/api-reference/endpoint/delete_tweet_v2.md): Delete a tweet.You must set the login_cookies.You can get the login_cookies from /twitter/user_login_v2.Price: 60 credits ($0.0006 per call). - [Like Tweet](https://docs.twitterapi.io/api-reference/endpoint/like_tweet_v2.md): Like a tweet.You must set the login_cookies.You can get the login_cookies from /twitter/user_login_v2.Price: 60 credits ($0.0006 per call). Returns success if the tweet is already liked. If X rejects the like, status is "error" with X's reason. - [Unlike Tweet](https://docs.twitterapi.io/api-reference/endpoint/unlike_tweet_v2.md): Unlike a tweet.You must set the login_cookies.You can get the login_cookies from /twitter/user_login_v2.Price: 60 credits ($0.0006 per call). - [Retweet Tweet ](https://docs.twitterapi.io/api-reference/endpoint/retweet_tweet_v2.md): Retweet a tweet.You must set the login_cookies.You can get the login_cookies from /twitter/user_login_v2.Price: 60 credits ($0.0006 per call). Returns success if the tweet is already retweeted. If X rejects the retweet, status is "error" with X's reason. - [Unretweet Tweet](https://docs.twitterapi.io/api-reference/endpoint/unretweet_tweet_v2.md): Undo a retweet. If the account has not retweeted the tweet, X treats this as a no-op and the call still returns success. You must set the login_cookies. You can get the login_cookies from /twitter/user_login_v2. Price: 60 credits ($0.0006 per call). If the call fails, the response has status "error"… - [Pin Tweet](https://docs.twitterapi.io/api-reference/endpoint/pin_tweet_v2.md): Pin one of your own tweets to your profile. You can only pin tweets posted by the logged-in account. You must set the login_cookies. You can get the login_cookies from /twitter/user_login_v2. Price: 60 credits ($0.0006 per call). If the call fails, the response has status "error", a message with the… - [Unpin Tweet](https://docs.twitterapi.io/api-reference/endpoint/unpin_tweet_v2.md): Unpin a tweet from your profile. You must set the login_cookies. You can get the login_cookies from /twitter/user_login_v2. Price: 60 credits ($0.0006 per call). If the call fails, the response has status "error", a message with the reason returned by X, and when available x_status (the HTTP status… - [Bookmark Tweet](https://docs.twitterapi.io/api-reference/endpoint/bookmark_tweet_v2.md): Bookmark a tweet. You must set the login_cookie. You can get the login_cookie from /twitter/user_login_v2. Price: 60 credits ($0.0006 per call). - [Unbookmark Tweet](https://docs.twitterapi.io/api-reference/endpoint/unbookmark_tweet_v2.md): Remove a tweet from bookmarks. You must set the login_cookie. You can get the login_cookie from /twitter/user_login_v2. Price: 60 credits ($0.0006 per call). - [Get Bookmarks](https://docs.twitterapi.io/api-reference/endpoint/bookmarks_v2.md): Get the bookmarks of a logged-in X account with a login cookie from user_login_v2. Same tweet format as other endpoints, cursor pagination. - [Follow User](https://docs.twitterapi.io/api-reference/endpoint/follow_user_v2.md): Follow a user.You must set the login_cookies.You can get the login_cookies from /twitter/user_login_v2.Price: 60 credits ($0.0006 per call). Returns success if you already follow the user (or a follow request is pending). If X rejects the follow, status is "error" with X's reason. - [Unfollow User](https://docs.twitterapi.io/api-reference/endpoint/unfollow_user_v2.md): Unfollow a user.You must set the login_cookies.You can get the login_cookies from /twitter/user_login_v2.Price: 60 credits ($0.0006 per call). - [Mute User](https://docs.twitterapi.io/api-reference/endpoint/mute_user_v2.md): Mute a user. Their posts no longer appear in your timeline. You must set the login_cookies. You can get the login_cookies from /twitter/user_login_v2. Price: 60 credits ($0.0006 per call). If the call fails, the response has status "error", a message with the reason returned by X, and when available… - [Unmute User](https://docs.twitterapi.io/api-reference/endpoint/unmute_user_v2.md): Unmute a user. You must set the login_cookies. You can get the login_cookies from /twitter/user_login_v2. Price: 60 credits ($0.0006 per call). If the call fails, the response has status "error", a message with the reason returned by X, and when available x_status (the HTTP status from X) and code (… - [Block User](https://docs.twitterapi.io/api-reference/endpoint/block_user_v2.md): Block a user. X also removes the follow relationship in both directions. You must set the login_cookies. You can get the login_cookies from /twitter/user_login_v2. Price: 60 credits ($0.0006 per call). If the call fails, the response has status "error", a message with the reason returned by X, and w… - [Unblock User](https://docs.twitterapi.io/api-reference/endpoint/unblock_user_v2.md): Unblock a user. The follow relationship removed by the block is not restored. You must set the login_cookies. You can get the login_cookies from /twitter/user_login_v2. Price: 60 credits ($0.0006 per call). If the call fails, the response has status "error", a message with the reason returned by X,… - [Send DM V2](https://docs.twitterapi.io/api-reference/endpoint/send_dm_v2.md): Send a direct message to an X user who accepts DMs, using login cookies from user_login_v2. Retry on failure. 60 credits ($0.0006 per call) ($0.0006) per call. - [Upload media](https://docs.twitterapi.io/api-reference/endpoint/upload_media_v2.md): Upload media to twitter.You must set the login_cookies.You can get the login_cookies from /twitter/user_login_v2.Price: 60 credits ($0.0006 per call). Long videos: if X is still processing the video after about 90 seconds, the response has status 'success', the media_id and processing_state ('pendin… - [Update Avatar](https://docs.twitterapi.io/api-reference/endpoint/update_avatar_v2.md): Update the avatar (profile picture) of your X account with a login cookie from user_login_v2. 60 credits ($0.0006 per call) ($0.0006) per call. - [Update Banner](https://docs.twitterapi.io/api-reference/endpoint/update_banner_v2.md): Update the banner (header image) of your X account with a login cookie from user_login_v2. 60 credits ($0.0006 per call) ($0.0006) per call. - [Update Profile](https://docs.twitterapi.io/api-reference/endpoint/update_profile_v2.md): Update your X (Twitter) profile name, bio, location or website with a login cookie from user_login_v2. 60 credits ($0.0006 per call) ($0.0006) per call. - [Create Community V2](https://docs.twitterapi.io/api-reference/endpoint/create_community_v2.md): Create a community.You must set the login_cookies.You can get the login_cookies from /twitter/user_login_v2.Price: 60 credits ($0.0006 per call). - [Delete Community V2](https://docs.twitterapi.io/api-reference/endpoint/delete_community_v2.md): Delete a community.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Price: 60 credits ($0.0006 per call). - [Join Community v2](https://docs.twitterapi.io/api-reference/endpoint/join_community_v2.md): Join a community.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Price: 60 credits ($0.0006 per call). - [Leave Community V2 ](https://docs.twitterapi.io/api-reference/endpoint/leave_community_v2.md): Leave a community.You must set the login_cookie.You can get the login_cookie from /twitter/user_login_v2.Price: 60 credits ($0.0006 per call). - [Add Webhook/Websocket Tweet Filter Rule](https://docs.twitterapi.io/api-reference/endpoint/add_webhook_rule.md): Add a tweet filter rule. Default rule is not activated.You must call update_rule to activate the rule. - [Get ALL test Webhook/Websocket Tweet Filter Rules](https://docs.twitterapi.io/api-reference/endpoint/get_webhook_rules.md): Get all tweet filter rules.Rule can be used in webhook and websocket.You can also modify the rule in our web page. - [Update Webhook/Websocket Tweet Filter Rule](https://docs.twitterapi.io/api-reference/endpoint/update_webhook_rule.md): Update a tweet filter rule's tag, search query, polling interval or active status. Matching tweets are pushed to your webhook or WebSocket. - [Delete Webhook/Websocket Tweet Filter Rule](https://docs.twitterapi.io/api-reference/endpoint/delete_webhook_rule.md): Delete a tweet filter rule by rule ID so its matching tweets stop being delivered to your webhook or WebSocket. All parameters are required. - [Add a twitter user to monitor his tweets](https://docs.twitterapi.io/api-reference/endpoint/add_user_to_monitor_tweet.md): Add an X account to real-time monitoring (Twitter Stream) to receive its tweets, replies, quotes and retweets as they are posted. - [Remove a user from monitor list](https://docs.twitterapi.io/api-reference/endpoint/remove_user_to_monitor_tweet.md): Remove an X account from real-time tweet monitoring (Twitter Stream) so its new tweets are no longer delivered to you. - [Get Users to Monitor Tweet](https://docs.twitterapi.io/api-reference/endpoint/get_user_to_monitor_tweet.md): List every X account you have added to real-time tweet monitoring (Twitter Stream). Use it together with the add and remove endpoints. ## OpenAPI Specs - [openapi](/api-reference/openapi.json) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.