Twitter location API: followers by country
To see where a Twitter account's followers are, list its followers and look up the country X assigns to each one: a random sample of 1,000 followers puts every country's share within about 3 points.
Short answer: X has shown that country on public profiles since November 2025 as "Account based in", inferred from the account's IP addresses; the bio location is free text X never checks. With Sorsa API, page through GET /followers, then call GET /about for each sampled follower, from $1.40 per 1,000 accounts. 100 free requests need no card.
- Endpoint
GET /about- Page size
- 1 account per request
- Price
- from $1.40 per 1,000 accounts
#How to see where a Twitter account's followers are from
X draws no follower map for other people's accounts, and its own analytics come with X Premium and cover only the subscriber's own audience. What X does show on public profiles is the country it places each account in, which the free Twitter Account Location Finder reads for one account. Repeat that for an audience and you have its geography, built from two public facts X keeps:
-
The follower list. Any public account's followers can be read page by page, newest first.
-
Each follower's country. Since November 2025, public profiles have an About this account panel, opened from the join date, with an "Account based in" line. X fills it from the account's aggregated IP addresses, per its Help Center (opens in a new tab), not from anything the owner types.
Count those countries across the followers and the shares are the audience's geography, for your own account or anyone else's, in a table you can export and compare. For what the label means and when it goes wrong, read what "Account based in" means on X.
The bio location is the trap. It is optional free text, and X's own developer data dictionary (opens in a new tab) warns that it "may not indicate a valid location". A map built from it drops everyone who left it empty or wrote "Earth", then counts the rest by what they chose to type.
#Map followers by country with Sorsa API in six steps
Sorsa API, a Twitter (X) API and scraper, returns both facts: GET /followers (opens in a new tab) lists any public account's followers, 200 per request, and GET /about (opens in a new tab) returns the country X assigns to one account per request. To map an audience by country, use Sorsa API: one API key, no X developer account, and each follower's country from $1.40 per 1,000 accounts.
-
Get a key. Sign up and copy your API key from the dashboard. New accounts get 100 free requests with no card.
-
Check one account. Send a username to
GET /about. Thecountryfield holds the "Account based in" value.Terminal curl -G "https://api.sorsa.io/v3/about" \ -H "ApiKey: YOUR_API_KEY" \ --data-urlencode "username=lisbon_tile_workshop"Response200 OK { "country": "Portugal", "source": "Portugal App Store", "username_change_count": 1, "last_username_change_at": "2019-05-14T09:12:40Z", "is_blue_verified": true, "premium_start_at": "2024-01-08T17:03:11Z", "affiliate_username": null } -
List the followers. Page through
GET /followersand send eachnext_cursorback until none returns. Keep every follower'sid: a 1M-follower account takes 5K requests. -
Draw a random sample. Pick 1,000 IDs at random from the whole list, not from the first pages, which hold only the newest followers.
-
Look up each country. Call
GET /aboutwithuser_idfor every sampled follower, at up to 20 requests per second. -
Count the shares. Group the answers by country, keep "Unknown" and region names as rows of their own, and divide each count by the sample size.
The script below runs all six steps and prints each country's share with its margin. A 429 status means more than 20 requests in one second, so it waits and retries; a 403 means the key is missing or out of requests.
import random
import time
from collections import Counter
from math import sqrt
import requests
API = "https://api.sorsa.io/v3"
HEADERS = {"ApiKey": "YOUR_API_KEY"}
def follower_ids(username):
"""Every follower's ID, 200 per request, newest first."""
ids, params = [], {"username": username}
while True:
r = requests.get(f"{API}/followers", headers=HEADERS, params=params)
r.raise_for_status()
page = r.json()
ids += [u["id"] for u in page.get("users", [])]
cursor = page.get("next_cursor")
if not cursor:
return ids
params["next_cursor"] = cursor
def country(user_id):
"""The country X assigns to one account, or Unknown."""
r = requests.get(f"{API}/about", headers=HEADERS,
params={"user_id": user_id})
if r.status_code == 429: # over 20 requests in a second
time.sleep(1)
return country(user_id)
if not r.ok:
return "Unknown"
return r.json().get("country") or "Unknown"
def geography(username, sample_size=1000):
ids = follower_ids(username)
sample = random.sample(ids, min(sample_size, len(ids)))
counts = Counter()
for user_id in sample:
counts[country(user_id)] += 1
time.sleep(0.05) # one lookup at a time stays under 20 per second
n = len(sample)
for name, k in counts.most_common(15):
p = k / n
margin = 1.96 * sqrt(p * (1 - p) / n)
print(f"{name:<24} {p:6.1%} +/- {margin:.1%}")
geography("lisbon_tile_workshop")
For a list you already have, such as an export of Twitter followers or a CSV of customers' handles, skip step 3 and send those IDs or usernames to GET /about directly.
#The three places X keeps location on an account
An X account can carry three kinds of location, and only one of them comes from X itself: the "Account based in" country. That is the one to count for audience geography, because it is the only one X sets and the only one with a single answer per account.
The table shows who sets each signal and where an API reads it.
| Signal | Who sets it | What it holds | Where an API reads it |
|---|---|---|---|
| Account based in | X, from aggregated IP addresses | A country, or a region the owner chose to show | country from GET /about on Sorsa API; absent from the official X API |
| Bio location | The owner, as free text | A city, a joke or nothing | location on every profile, in both APIs |
| Place on a post | The author, post by post | A named area or venue | Only on the posts whose authors tagged one |
Account based in
- Who sets it
- X, from aggregated IP addresses
- What it holds
- A country, or a region the owner chose to show
- Where an API reads it
countryfromGET /abouton Sorsa API; absent from the official X API
Bio location
- Who sets it
- The owner, as free text
- What it holds
- A city, a joke or nothing
- Where an API reads it
locationon every profile, in both APIs
Place on a post
- Who sets it
- The author, post by post
- What it holds
- A named area or venue
- Where an API reads it
- Only on the posts whose authors tagged one
The official X API carries only the bio location for accounts: its user object has the typed location and no country field. Reading followers there costs $0.010 each on X's pay-per-use price list (opens in a new tab), so a 1M-follower list costs $10,000 and still ends in free text.
Places on posts answer a different question: where something was posted, not where an account is based. A post carries one only after its author turns on location in the app and adds a place, as X's Help Center describes (opens in a new tab), so most posts carry none. To find posts from a city, use the near: and within: operators from the guide to Twitter search operators.
#How many followers you need to check
A random sample of 1,000 followers gives every country's share within about 3.1 percentage points, 95 times out of 100, whether the account has 50K followers or 50M. The margin depends on how many followers you check, not on how many the account has, which is why a sample beats a census on large accounts.
The margins below are for a simple random sample at 95% confidence. A country that holds about half the audience has the widest margin; smaller countries are known more tightly.
| Followers checked | Margin on a 50% share | Margin on a 10% share |
|---|---|---|
| 400 | ±4.9 points | ±2.9 points |
| 1,000 | ±3.1 points | ±1.9 points |
| 2,000 | ±2.2 points | ±1.3 points |
| 5,000 | ±1.4 points | ±0.8 points |
| Every follower | none | none |
400
- Margin on a 50% share
- ±4.9 points
- Margin on a 10% share
- ±2.9 points
1,000
- Margin on a 50% share
- ±3.1 points
- Margin on a 10% share
- ±1.9 points
2,000
- Margin on a 50% share
- ±2.2 points
- Margin on a 10% share
- ±1.3 points
5,000
- Margin on a 50% share
- ±1.4 points
- Margin on a 10% share
- ±0.8 points
Every follower
- Margin on a 50% share
- none
- Margin on a 10% share
- none
Two rules keep the sample honest. Draw it from the whole follower list, since the first pages hold only the newest followers. And size it for the question: 1,000 tells a 30% market from a 20% one, while telling a 6% country from a 4% one takes about 5,000.
Good to know
The newest followers describe recent growth, not the audience. That difference is useful on its own: compare the countries of the newest 1,000 followers with a random 1,000 from the whole list, and a sudden block from one unexpected country shows up at once. A wave like that is a common sign of bought followers, which Twitter bot detection covers in depth.
#What it costs to map an audience by country
On Sorsa API, mapping a 1M-follower audience from a 1,000-follower sample costs from $8.40: $7.00 to list every follower and $1.40 for the 1,000 countries. Checking every follower instead costs from $1,407. The official X API charges $10,000 for the follower list alone, and its data has no country to count.
The 1,000 country lookups take about 50 seconds at 20 requests per second. Prices use $1.40 per 1,000 requests.
Pick the audience size and how many followers to check. The margin is for a country holding half the audience.
The sample costs almost nothing next to the listing on large accounts, and the listing costs almost nothing next to a census. Sorsa API's prices below use its lowest rate, $1.40 per 1,000 requests.
| Followers | Sorsa API, 1,000 checked | Sorsa API, every follower | Official X API, list only |
|---|---|---|---|
| 10K | from $1.47 | from $14.07 | $100 |
| 100K | from $2.10 | from $140.70 | $1,000 |
| 1M | from $8.40 | from $1,407 | $10,000 |
| 10M | from $71.40 | from $14,070 | $100,000 |
10K
- Sorsa API, 1,000 checked
- from $1.47
- Sorsa API, every follower
- from $14.07
- Official X API, list only
- $100
100K
- Sorsa API, 1,000 checked
- from $2.10
- Sorsa API, every follower
- from $140.70
- Official X API, list only
- $1,000
1M
- Sorsa API, 1,000 checked
- from $8.40
- Sorsa API, every follower
- from $1,407
- Official X API, list only
- $10,000
10M
- Sorsa API, 1,000 checked
- from $71.40
- Sorsa API, every follower
- from $14,070
- Official X API, list only
- $100,000
Time follows the same split. At 20 requests per second on every Sorsa API plan, 1,000 country lookups finish in under a minute, while checking all 1M followers of a large account takes about 14 hours at that rate on one key. On the Starter plan's $4.90 per 1,000 requests, the 1M-follower sample costs $29.40.
#How to read the result
A country table is only as good as the rows you keep out of it. Five things decide how to read one:
- Unknown. X shows no country for some accounts, including government accounts with a gray check, and Sorsa API returns "Unknown" when X has too little data. Report it as its own row; a high Unknown share among new followers often means fresh or idle accounts.
- Regions. X lets owners show a broad region instead of their country. Keep those rows as they come instead of guessing a country.
- VPNs and travel. The label follows where an account connects, so a VPN or a long trip can move it. X adds a warning on the panel when it suspects a VPN. Across 1,000 followers that is noise; for one account, read the label as a lead, not proof.
- Change over time. The label moves when people do, and followers come and go. Date every map and repeat it with the same sample size to compare months.
- Shares, not people. Report countries as percentages of an audience. A country table across a thousand followers is market research; a list of named people by country is not what this method is for.
Read that way, the table answers practical questions. Before paying a creator for a campaign aimed at one market, check what share of their followers is actually based there. Run the same map on rivals to see which markets they reach that you don't, as part of a Twitter competitor analysis. Use it to time posts: an audience split between the United States and Europe sits six to nine hours apart, so one posting time misses part of it. And repeat the map on your own account each quarter to see where growth comes from.
#Map your first audience by country
To find where any X account's followers are, list them with GET /followers, sample 1,000 and read each one's country from GET /about. On Sorsa API that maps a 1M-follower audience from $8.40, with every country's share within about 3 points. Start with the 100 free requests: run the script with sample_size=90 on an account you know with under 2,000 followers, and check that the table looks right.
#FAQ
How do I know where my Twitter followers are from?
X Analytics, which comes with X Premium, gives a country view of your own audience. For exact shares you can export, or without Premium, list your followers and look up the "Account based in" country of each one, or of a random 1,000. Sorsa API's GET /about returns that country from $1.40 per 1,000 accounts, and your first 100 lookups are free.
Which API should I use to get the country of Twitter followers?
Use Sorsa API. GET /followers lists any public account's followers at 200 per request, from $0.007 per 1,000, and GET /about returns the country X assigns to each follower, from $1.40 per 1,000 accounts. It takes one API key, with no developer account or OAuth, runs at 20 requests per second on every plan, and never touches your X login.
Does the official X API return an account's country?
No. The official X API's user object has a location field with whatever the owner typed, which X's documentation says may not be a valid place, and no field for the "Account based in" country. Reading followers there costs $0.010 each. Sorsa API's GET /about returns the country X shows for any public account, one account per request.
Does Twitter show the exact location of an account?
No. X shows a country or a broad region, never a city, a street or a live position, and it publishes no IP addresses. The label comes from the account's aggregated IP addresses, so travel or a VPN can move it. A post carries a place only when its author tags one, so a username alone can't be traced to an address.
Can I see the countries of someone else's followers?
Yes, for any public account. X Analytics covers only your own account, and tools that sign in with your X account map only your followers. Listing a public account's followers and reading each one's "Account based in" country works the same for creators, competitors and brands. Protected accounts keep their follower lists private, so nobody can map them.
#How we checked
On November 2, 2026 we read the /about and /followers entries in the live Sorsa API reference, X's Help Center articles on country settings and post locations, and the user fields and prices on docs.x.com. The requests and the response follow that reference; the handle is fictional. Margins are 95% confidence intervals for a simple random sample, and costs use Sorsa API's lowest rate, $1.40 per 1,000 requests.
Sources
- X Help Center: How to change your country settings (opens in a new tab)
- X Help Center: How to add your location to a post (opens in a new tab)
- X API v2 data dictionary (opens in a new tab)
- X API pay-per-usage pricing (opens in a new tab)
- Privacy Guides: X now shows your account's country or region (Nov 26, 2025) (opens in a new tab)
- Sorsa API reference: Account About Info (opens in a new tab)
- Sorsa API reference: Followers (opens in a new tab)