Skip to content

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:

  1. The follower list. Any public account's followers can be read page by page, newest first.

  2. 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.

A 1M-follower account, 1,000 followers checked, at $1.40 per 1,000 requests 1 List followers GET /followers 200 per request $7.00 every follower ID 2 Draw a sample 1,000 random IDs from the full list $0 runs in your code 3 Look up countries GET /about 1 account per request $1.40 1,000 lookups 4 Count shares each country, within ±3.1 points $8.40 in total
Four stages turn a follower list into country shares. Listing is cheap at 200 followers per request; the country lookups are what you size.
  1. Get a key. Sign up and copy your API key from the dashboard. New accounts get 100 free requests with no card.

  2. Check one account. Send a username to GET /about. The country field 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
    }
    
  3. List the followers. Page through GET /followers and send each next_cursor back until none returns. Keep every follower's id: a 1M-follower account takes 5K requests.

  4. 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.

  5. Look up each country. Call GET /about with user_id for every sampled follower, at up to 20 requests per second.

  6. 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.

Only "Account based in" comes from X. The bio location and post places are whatever their owners chose to add.

The table shows who sets each signal and where an API reads it.

SignalWho sets itWhat it holdsWhere an API reads it
Account based inX, from aggregated IP addressesA country, or a region the owner chose to showcountry from GET /about on Sorsa API; absent from the official X API
Bio locationThe owner, as free textA city, a joke or nothinglocation on every profile, in both APIs
Place on a postThe author, post by postA named area or venueOnly 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
    country from GET /about on 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
    location on 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.

Margin on a country's share at 95% confidence, by followers checked 400 followers ±4.9 points 1,000 followers ±3.1 points 2,000 followers ±2.2 points 5,000 followers ±1.4 points 10K followers ±1.0 point
Checking 1,000 followers instead of 400 cuts the margin from 4.9 to 3.1 points. Past 5,000, each extra follower buys very little.

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 checkedMargin on a 50% shareMargin 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 followernonenone
  • 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.

Followers of the account
Followers you check
$10,000
Official X API
The follower list alone, at $0.010 per follower. Its data has no country field, only the typed bio location.
from $8.40
Sorsa API
Every follower listed, then 1,000 countries from X's "Account based in". Each share within ±3.1 points.

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.

FollowersSorsa API, 1,000 checkedSorsa API, every followerOfficial X API, list only
10Kfrom $1.47from $14.07$100
100Kfrom $2.10from $140.70$1,000
1Mfrom $8.40from $1,407$10,000
10Mfrom $71.40from $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.

By the Sorsa API team. We build and run Sorsa API, the read-only Twitter/X API and scraper, in production since 2022 (formerly TweetScout API) with 6B+ requests served. About Sorsa API

What changed
  • Rewritten from scratch: sampling with margins of error, a cost planner against the official X API, a new Python and Node.js pipeline, and facts checked against X's Help Center and docs.x.com.
  • First published.