--- title: "Twitter Follow API: Follow and Unfollow for $0.0008" description: "Follow and unfollow from code on the X account you authorise, for $0.0008 a call, and check who follows whom in both directions before you write." canonical: https://www.twitterapis.com/twitter-follow-api generator: md-live-route generated: 2026-11-06T08:43:56.871Z --- # Twitter Follow API: Follow and Unfollow for $0.0008 1. [Home](https://www.twitterapis.com/) 2. / Twitter Follow API FOLLOW AND UNFOLLOW # Twitter Follow API: Follow and Unfollow for $0.0008 Updated July 2026 Can you follow a user through the Twitter API? Yes. `POST /twitter/user/follow` follows an account from the X account you registered, and `POST /twitter/user/unfollow` reverses it. Each call takes a user ID or a handle and costs $0.0008. X removed follows from its self-serve API tiers in April 2026, so this is one of the few pay-as-you-go routes left for the action. Flat $0.0008 per call, the same rate as a read. Registering the X session is free. Per our own API records, 125 endpoints share this one Bearer key and one prepaid balance. Start with the [quickstart](https://www.twitterapis.com/quickstart), compare [every price](https://www.twitterapis.com/pricing), or connect an agent through the [MCP server](https://www.twitterapis.com/mcp). [Start Free](https://www.twitterapis.com/signup)[Read the docs](https://docs.twitterapis.com/docs/reference/write-actions/user-follow) By the numbers ## Where the follow action stands in 2026 The official route changed this year, which is why this page exists. - X removed following, likes and quote-posts via API writes from all self-serve tiers, effective April 20, 2026. [(X Developer Community, 2026)](https://devcommunity.x.com/t/x-api-pricing-update-owned-reads-now-0-001-other-changes-effective-april-20-2026/263025) - A follow or an unfollow on TwitterAPIs bills $0.0008, which is $0.80 per 1,000 actions. [(TwitterAPIs pricing, 2026)](https://www.twitterapis.com/pricing) - The relationship check reads both directions plus block, mute and DM flags in one response. [(TwitterAPIs API reference, 2026)](https://docs.twitterapis.com/docs/reference/user-reads/user-check-follow-relationship) - Per our billing data, paying customers made 484,424 tweet-returning read calls over October 22 to 28, 2026 (UTC), on the same keys and the same per-call billing as this endpoint. [(TwitterAPIs measured yield, 2026)](https://www.twitterapis.com/twitter-api-pricing) ## The three endpoints behind the Twitter follow API Two writes and one read make up the full loop: check, act, confirm. All three accept handles as well as numeric IDs, so you do not need a lookup step first. Handles are resolved for you, and the optional `proxy` parameter on the writes lets you send the action through an IP you control. ### POST /twitter/user/follow Follow a user as the authenticated account. Requires a logged-in session for the acting account. Billed at $0.0008 per call, the same as a standard read. | Parameter | Where | Required | Purpose | | --- | --- | --- | --- | | user\_id | query | No | Numeric ID of the user to follow. Send this or username; user\_id wins when both are present. | | username | query | No | Handle of the user to follow, with or without the leading @. Resolved to its numeric ID for you through the same cached lookup as Check Follow Relationship; an unknown handle returns 404 and no follow is issued. | | proxy | query | No | Optional. Pass your own proxy (http(s)/socks URL) to egress the write through your clean IP for best success; if omitted, we use the session's proxy / our default. | ### POST /twitter/user/unfollow Unfollow a user as the authenticated account. Requires a logged-in session for the acting account. Billed at $0.0008 per call, the same as a standard read. | Parameter | Where | Required | Purpose | | --- | --- | --- | --- | | user\_id | query | No | Numeric ID of the user to unfollow. Send this or username; user\_id wins when both are present. | | username | query | No | Handle of the user to unfollow, with or without the leading @. Resolved to its numeric ID for you through the same cached lookup as Check Follow Relationship; an unknown handle returns 404 and no unfollow is issued. | | proxy | query | No | Optional. Pass your own proxy (http(s)/socks URL) to egress the write through your clean IP for best success; if omitted, we use the session's proxy / our default. | ### GET /twitter/user/check\_follow\_relationship Return the directional relationship between a source and target user: whether source follows target (following) and target follows source (followed\_by), plus block, mute, and DM-eligibility flags. An account that does not exist returns a 404 with error not\_found; the relationship object is null when X returns none. | Parameter | Where | Required | Purpose | | --- | --- | --- | --- | | source\_user\_id | query | No | Numeric ID of the account whose following is checked. Send this or source\_username. | | source\_username | query | No | Handle of the source account, as an alternative to source\_user\_id. Resolved to its ID first; an unknown handle returns a 404 and nothing is billed. | | target\_user\_id | query | No | Numeric ID of the account being checked against. Send this or target\_username. | | target\_username | query | No | Handle of the target account, as an alternative to target\_user\_id. Resolved to its ID first; an unknown handle returns a 404 and nothing is billed. | ## Sample responses from the follow endpoints The writes answer with a single `ok` field, so the informative response is the relationship check. It is directional, which trips people up: `following` means the source follows the target, and `followed_by` means the target follows the source. Read both before you decide what to do. Follow User Unfollow User Check Follow Relationship Copy ``` { "ok": true } ``` ``` { "ok": true } ``` ``` { "relationship": { "source_id": "745273", "target_id": "2178758961", "following": true, "followed_by": false, "blocking": null, "blocked_by": null, "muting": null, "can_dm": true } } ``` | Field | What it tells you | | --- | --- | | ok | True when X accepted the follow or unfollow. | | relationship.following | The source account follows the target. | | relationship.followed\_by | The target account follows the source, which is what a follow-back check needs. | | relationship.blocking | The source has blocked the target. Null means X did not report it for this pair. | | relationship.muting | The source has muted the target. | | relationship.can\_dm | Whether the source can send the target a direct message right now. | ## Quickstart: follow an account from code A follow has to come from a real account, so a write needs the one-time session step. Reads do not, which means the relationship check works on a key alone. Once the session is stored, the call below is the whole integration. 1. Create a key at [signup](https://www.twitterapis.com/signup). 2. Register the acting account with `POST /twitter/customer/session`, sending its `auth_token` and `ct0`. This is free and only happens once per account. 3. Send the request below with `username` set to the handle you want to follow. 4. Call `GET /twitter/user/check_follow_relationship` if you want to confirm the result. cURL Python JavaScript Copy ``` curl -X POST "https://api.twitterapis.com/twitter/user/follow?user_id=44196397" \ -H "Authorization: Bearer $TWITTERAPIS_KEY" # Add &proxy=http://user:pass@host:port to route through your own clean IP. ``` ``` import os import requests resp = requests.post( "https://api.twitterapis.com/twitter/user/follow", headers={"Authorization": f"Bearer {os.environ['TWITTERAPIS_KEY']}"}, params={ "user_id": "44196397" }, # add "proxy": "http://user:pass@host:port" to use your own IP ) resp.raise_for_status() data = resp.json() print(data) ``` ``` const url = new URL("https://api.twitterapis.com/twitter/user/follow"); url.search = new URLSearchParams({ "user_id": "44196397" }).toString(); // Add proxy: "http://user:pass@host:port" above to route through your own clean IP. const resp = await fetch(url, { method: "POST", headers: { Authorization: `Bearer ${process.env.TWITTERAPIS_KEY}` }, }); const data = await resp.json(); console.log(data); ``` ## What the follow endpoints cost per 1,000 Every action here is one call that does one thing, so the fill is exactly 1 and the arithmetic is simple. The relationship check bills like a read, and the batch version bills per pair, so a 100-target sweep costs the same as 100 single checks with fewer round trips. | Action | Per call | Per 1,000 | | --- | --- | --- | | Follow an account | $0.0008 | $0.80 | | Unfollow an account | $0.0008 | $0.80 | | Check one relationship | $0.0008 | $0.80 | | Check, then follow | $0.0016 | $1.60 | An unknown handle returns a 404 and no follow is issued. The signup credit of $0.50 covers 625 calls. See [all endpoint prices](https://www.twitterapis.com/pricing). ## Follow automation options compared Follow automation sits in an awkward spot, because the first-party route closed to most budgets and the rest of the market varies a lot. These are the routes teams use today, compared on whether the action is available at all and what each one asks you to run. | Option | Follow action | Cost | What you run | | --- | --- | --- | --- | | TwitterAPIs | Available | $0.0008 per call | A key plus one registered session | | Official X API, self-serve | Removed April 20, 2026 | No self-serve price | Not available on these tiers | | Official X API, enterprise | By contract | Negotiated | A sales process | | Browser automation | Available | Proxy and compute costs | A browser per account and selectors that change | ## What changed on the official API in 2026 In the announcement covering changes effective April 20, 2026, X withdrew following, likes and quote-posts via API writes from every self-serve tier. These actions were not repriced upward, they were removed, so there is no line item to budget for on those plans. Any guide still quoting a per-request cost for an API follow is describing something that no longer exists. That matters most for products built on the old `POST /2/users/:id/following` call, such as community tools that follow new members back. Those integrations stopped working without a code change on their side. Our [X API pricing breakdown](https://www.twitterapis.com/twitter-api-pricing) covers the rest of that announcement, and the [Twitter engagement API](https://www.twitterapis.com/twitter-engagement-api) handles the like and repost side of the same gap. ## Reading a relationship before you act A check before each write keeps your data honest and saves you sending actions that do nothing. If you only need the answer for a few accounts, the free [follow checker](https://www.twitterapis.com/tools/twitter-follow-checker) gives it to you in a browser, and our answer on [checking whether one account follows another](https://www.twitterapis.com/answers/how-to-check-if-one-account-follows-another) explains the response in more detail. For volume, `GET /twitter/user/check_follow_relationship/batch` compares one account against up to 100 others in a single request. That is how you find who has not followed back across a whole list without making 100 round trips. To get the list itself, use the [Twitter followers API](https://www.twitterapis.com/twitter-followers-api), which pages through follower and following lists. - Follow-back checks. Read `followed_by` for each account you follow, then decide who to keep. - Partner verification. Confirm a campaign partner follows the account they said they would. - DM eligibility. Read `can_dm` before you queue a message, so a send does not fail later. ## Using follow automation without losing the account An API call does not change what X allows. Following on behalf of an account a real person controls is ordinary use, and aggressive follow and unfollow cycling is exactly the pattern X's automation rules target, whichever tool sent it. X enforces daily follow limits on every account, and a new account will hit them sooner than an established one. Pace actions the way a person would, spread them through the day, and stop on a 403 or a 429 instead of retrying in a tight loop. A 403 from X usually means the account or session has a problem, and hammering it makes that worse. Check the session with `GET /twitter/customer/session/status` before you resume. ## A follow-back job in a few lines The example below shows the check-then-act pattern with real parameter names. It reads the relationship between your account and each candidate, follows only the accounts that already follow you and that you do not follow yet, and waits between writes. The check is a read that uses your key alone, while the follow runs as the session you registered. Keep the list short and the wait long. A job like this is meant to run a few times a day on a handful of accounts, not to sweep thousands of handles in a loop. To get the candidates in the first place, read your newest followers with the [Twitter followers API](https://www.twitterapis.com/twitter-followers-api), and use [the guide to who an account follows](https://www.twitterapis.com/answers/how-to-get-who-a-twitter-account-follows) for the other direction. Python Copy ``` import os import time import requests BASE = "https://api.twitterapis.com/twitter/user" HEADERS = {"Authorization": f"Bearer {os.environ['TWITTERAPIS_KEY']}"} me = "your_handle" candidates = ["naval", "openai"] for handle in candidates: check = requests.get( f"{BASE}/check_follow_relationship", headers=HEADERS, params={"source_username": me, "target_username": handle}, timeout=30, ) check.raise_for_status() relationship = check.json()["relationship"] if relationship and relationship["followed_by"] and not relationship["following"]: follow = requests.post( f"{BASE}/follow", headers=HEADERS, params={"username": handle}, timeout=30, ) follow.raise_for_status() time.sleep(60) ``` ## Moving off POST /2/users/:id/following If your product called the first-party route, the move is mostly a matter of auth. There is no OAuth 2.0 user token and no refresh cycle to keep alive. You register the account's session once, then call one URL with your Bearer key. The target can be a handle as well as an ID, which removes the lookup step many integrations carried only to satisfy the old path. The response is simpler too. You get `ok` rather than a `following` and `pending_follow` pair, so read the [relationship check](https://www.twitterapis.com/tools/twitter-follow-checker) if your logic depends on whether a request to a protected account is pending. Run the two paths side by side on one account first, and compare the results before you switch everything over. The [API alternatives comparison](https://www.twitterapis.com/twitter-api-alternatives) covers other vendors if you want to weigh more than one route. - Auth. Replace the user token with a Bearer key plus a registered session. The [API key page](https://www.twitterapis.com/twitter-api-key) covers the key, and our answer on [logging in to X with an API](https://www.twitterapis.com/answers/how-to-log-in-to-x-with-an-api) covers the session options. - Identifiers. Send `user_id` to keep your stored IDs working, or `username` to drop your lookup call. The [user API](https://www.twitterapis.com/twitter-user-api) resolves one to the other if you need it elsewhere. - Several accounts. One key can act for many accounts, and our answer on [multiple X accounts](https://www.twitterapis.com/answers/how-to-use-multiple-x-accounts-with-one-api-key) shows how to pass the session on each call. - Knowing who followed you. Follow events are a read problem, covered by the [account activity API](https://www.twitterapis.com/twitter-account-activity-api) page. ## Follow accounts from an AI agent All three actions are tools in the MCP server, so an agent can check a relationship and act on it on the account you registered. Keep a person in the loop for writes, since the follow happens as soon as the tool runs. The [MCP page](https://www.twitterapis.com/mcp) has the client setup. - `twitter_follow_user` calls POST /twitter/user/follow - `twitter_unfollow_user` calls POST /twitter/user/unfollow - `twitter_check_follow_relationship` calls GET /twitter/user/check\_follow\_relationship Install the MCP server Copy ``` npx -y @twitterapis/mcp@latest ``` ## Twitter follow API questions ### Can you follow someone with the Twitter API? On TwitterAPIs, yes: POST /twitter/user/follow costs $0.0008 and runs on the X account you registered. On the official X API, following via API writes was removed from all self-serve tiers effective April 20, 2026. ### How do I unfollow a user? Send POST /twitter/user/unfollow with the same user\_id or username parameters. It costs $0.0008, the same as a follow. ### Do I need an X account to use the follow endpoints? For the writes, yes: a follow has to come from an account, so you register that account's session once. The relationship check is a read and needs only your Bearer key. ### Can I check many accounts in one request? Yes. GET /twitter/user/check\_follow\_relationship/batch compares one account against up to 100 others in one request, billed per pair. ### How do I follow a user by handle instead of ID? Pass username with or without the leading @. The handle is resolved to its numeric ID for you. If you send both, user\_id wins. An unknown handle returns a 404 and no follow is issued. ### How do I check if one account follows another? Call GET /twitter/user/check\_follow\_relationship with a source and a target. following tells you whether the source follows the target, and followed\_by tells you the reverse. It works on a key alone with no session. ### What is the proxy parameter for? It is optional. Pass your own http, https or socks URL to send the write through an IP you control. If you leave it out, the session's proxy or our default is used. ### Will automated following get my account suspended? It can if you follow and unfollow aggressively. X enforces daily follow limits and rules against bulk cycling regardless of the tool. Pace actions like a person would, and stop on a 403 or a 429. ### Send your first follow from code Create a key, register one X session for free and make the call. The signup credit covers 625 follow calls. [Start free](https://www.twitterapis.com/signup)[See every price](https://www.twitterapis.com/pricing) ## Next read Continue exploring related pages: [ Twitter API use cases 14 use cases from sentiment analysis to lead generation. ](https://www.twitterapis.com/twitter-api-usecases)[ Twitter API answers Short, sourced answers to the most common Twitter and X API questions. ](https://www.twitterapis.com/answers)[ Twitter timeline API Pull an account's full posting history over one REST endpoint. ](https://www.twitterapis.com/twitter-timeline-api)[ Twitter list API Read list members and list timelines with the same Bearer key. ](https://www.twitterapis.com/twitter-list-api) [ TwitterAPIs ](https://www.twitterapis.com/) The cheapest pay-as-you-go Twitter and X API. $0.0008 per call, which works out to $0.04 per 1,000 tweets on a full 20-tweet page. No subscriptions and no developer account. ## Product / API - [Pricing](https://www.twitterapis.com/pricing) - [Cost Calculator](https://www.twitterapis.com/twitter-api-cost-calculator) - [Rate Limits](https://www.twitterapis.com/twitter-api-rate-limits) - [MCP Server](https://www.twitterapis.com/mcp) - [Integrations](https://www.twitterapis.com/integrations) - [Language Clients](https://www.twitterapis.com/sdk) - [Changelog](https://www.twitterapis.com/changelog) - [Status](https://www.twitterapis.com/status) ## Developers - [Documentation](https://docs.twitterapis.com/docs) - [API Reference](https://docs.twitterapis.com/docs/reference/search/tweet-advanced-search) - [User Info](https://docs.twitterapis.com/docs/reference/user-reads/user-info) - [User Tweets](https://docs.twitterapis.com/docs/reference/user-reads/user-tweets) - [Advanced Search](https://docs.twitterapis.com/docs/reference/search/tweet-advanced-search) - [Verified Followers](https://docs.twitterapis.com/docs/reference/follower-graph/user-verified-followers) ## Resources / Compare - [Answers](https://www.twitterapis.com/answers) - [Reviews](https://www.twitterapis.com/reviews) - [Free Tools](https://www.twitterapis.com/tools) - [Twitter ID Finder](https://www.twitterapis.com/tools/twitter-id-finder) - [Get a Twitter API Key](https://www.twitterapis.com/twitter-api-key) - [Official X API Comparison](https://www.twitterapis.com/twitter-api-pricing) - [Twitter API Use Cases](https://www.twitterapis.com/twitter-api-usecases) - [Twitter API Alternatives](https://www.twitterapis.com/twitter-api-alternatives) - [Twitter Unofficial API](https://www.twitterapis.com/twitter-unofficial-api) - [Twitter Free API](https://www.twitterapis.com/twitter-free-api) - [TwitterAPIs vs twitterapi.io](https://www.twitterapis.com/twitterapis-vs-twitterapi-io) - [TwitterAPIs vs GetXAPI](https://www.twitterapis.com/twitterapis-vs-getxapi) - [TwitterAPIs vs TweetAPI](https://www.twitterapis.com/twitterapis-vs-tweetapi) - [TwitterAPIs vs TwexAPI](https://www.twitterapis.com/twitterapis-vs-twexapi) - [TwitterAPIs vs RapidAPI](https://www.twitterapis.com/twitterapis-vs-rapidapi) ## Legal - [About](https://www.twitterapis.com/about) - [Security](https://www.twitterapis.com/security) - [Trust](https://www.twitterapis.com/privacy-and-data-handling) - [Terms of Service](https://www.twitterapis.com/terms-of-service) - [Affiliates](https://www.twitterapis.com/affiliates) - [Contact](https://www.twitterapis.com/contact) - [Jobs](https://www.twitterapis.com/jobs) © 2026 TwitterAPIs. All rights reserved. TwitterAPIs is an independent third-party API for developers and researchers. Not affiliated with, endorsed by, or sponsored by X Corp. All systems operational