Skip to content

How to search Twitter by location

To search Twitter by location, use the Near you filter in X search, type near:"city" within:15km, or type geocode:lat,long,radius; all three find only posts X can tie to a place, and under 1 in 100 posts carry a geotag.

Short answer: X matches a location query against the place an author tags on a post and, for about the last week, the city in the author's profile; the operators are undocumented and were reported failing in 2026. Sorsa API's POST /search-tweets runs the same queries in code and returns each author's location, from $0.07 per 1,000 posts, with 100 free requests.

Endpoint
POST /search-tweets
Page size
about 20 posts per request
Price
from $0.07 per 1,000

#How to search Twitter by location

You can search X by location in three ways, all from the ordinary search box on x.com or in the X app, and each one works best next to a keyword such as "power outage" or "concert". If what you need is where one account is based rather than what people post from a place, that is a different question: the free Twitter Account Location Finder reads X's "Account based in" label for any public account.

To find posts from a place:

  1. Turn on Near you. Search a keyword, open Search filters (the right column on desktop, the filter icon next to the search bar in the app) and pick Near you. X then uses your device's location, per X's Help Center (opens in a new tab).

  2. Type near: with a radius. "street food" near:"Mexico City" within:10km asks for posts tied to that place. Put quotes around a name of two or more words, and give within: in km or mi.

  3. Type geocode: with coordinates. "power outage" geocode:30.2672,-97.7431,25km draws a 25 km circle around central Austin. Latitude comes first, then longitude, then the radius, with no spaces.

Then open the Latest tab. X's Search Recommendations (opens in a new tab) page says Latest returns matching posts in time order without ranking, while Top picks candidates by your own location and interests. A developer on X's forum found geocode: filtering in Latest but not in Top in 2025.

X's Advanced search form at x.com/search-advanced also has a Places field that adds the place to your query.

#What X counts as a post's location

X ties a post to a place in two ways: the place tag its author adds, and the location typed in the author's profile. Both are optional, so a location search covers only the part of the conversation that carries one of them.

What an X location search matches: the place tag on a post, the author's profile location for about the last 7 days, never the Account based in label, and a city name in the text only as a keyword A location query on x.com, in the X app or through an API that runs X search "power outage" near:"Austin, TX" within:25km Place tag on the post Added by the author per post; under 1 in 100 posts carry one Matched Author's profile location Free text such as "Austin, TX"; X never checks it Last ~7 days only "Account based in" label The country X infers from IP addresses Not used A city name in the text Found only when the query contains the word Keyword only
Two of the four places X keeps location feed a location search, and one of them only for about a week.

Two things never make a post match. The "Account based in" country on a profile, which X infers from IP addresses, plays no part in location search, according to Bellingcat's investigation toolkit (opens in a new tab). A city named in the text matches only as a keyword: near:"Austin, TX" finds no post that merely says "Austin".

The 7-day window

Profile locations count only for recent posts. In Bellingcat's tests (opens in a new tab), X used profile locations for about the last 7 to 8 days; older results held place-tagged posts only, so recent volume looked much larger.

An X location search over the last 7 to 8 days matches place-tagged posts and posts by authors whose profile location fits; older dates match place-tagged posts only Posts with a place tag Matched on every date Posts by authors whose profile location fits Not matched for older dates Matched 4 weeks ago 2 weeks ago 7 to 8 days ago Today A search over older dates returns fewer posts because the profile-location matches drop out.
Compare location-search volumes only within the last week or only before it, never across the line.

#Location search operators, with examples

X search reads five location operators. Each one sits next to your keywords with no space after the colon, and you can combine it with every other operator, dates included.

OperatorWhat it findsExample
near:Posts tied to a named place; quotes for two wordsjazz near:"New Orleans"
within:A radius for near:, in km or mijazz near:"New Orleans" within:5mi
geocode:Posts within a radius of a point: latitude, longitude, radius"heat wave" geocode:51.5072,-0.1276,20km
near:mePosts near your own location; signed-in x.com and the app only"lost dog" near:me
place:Posts tagged with one X place, by its IDplace:96683cc9126741d1 (the United States)
  • near:

    What it finds
    Posts tied to a named place; quotes for two words
    Example
    jazz near:"New Orleans"
  • within:

    What it finds
    A radius for near:, in km or mi
    Example
    jazz near:"New Orleans" within:5mi
  • geocode:

    What it finds
    Posts within a radius of a point: latitude, longitude, radius
    Example
    "heat wave" geocode:51.5072,-0.1276,20km
  • near:me

    What it finds
    Posts near your own location; signed-in x.com and the app only
    Example
    "lost dog" near:me
  • place:

    What it finds
    Posts tagged with one X place, by its ID
    Example
    place:96683cc9126741d1 (the United States)

The official X API doesn't accept these: it answers near: with an invalid-operator error and lists its own location operators in the search operator reference (opens in a new tab). They are place: with a name or place ID, place_country: with a two-letter code, point_radius: and bounding_box: with coordinates, and has:geo for any post with geodata. All of them match only posts that carry a place tag or coordinates.

The order of the numbers flips between the two families. geocode: takes latitude first (geocode:40.7128,-74.0060,10km), while point_radius: takes longitude first (point_radius:[-74.0060 40.7128 10km]). Swap them and New York becomes a point in Antarctica, with zero results and no error.

The builder below writes every form from one place, checks the coordinates and gives you the request body for code.

A 25 km circle around Austin, TX covers about 1,963 km². geocode: takes latitude first; point_radius: takes longitude first.

By place name: x.com, X app, Sorsa API
"power outage" near:"Austin, TX" within:25km
By coordinates: x.com, X app, Sorsa API
"power outage" geocode:30.2672,-97.7431,25km
Sorsa API request body for POST /search-tweets
{"query": "\"power outage\" geocode:30.2672,-97.7431,25km", "order": "latest"}
Official X API: place-tagged posts only, longitude first
"power outage" point_radius:[-97.7431 30.2672 25km]

Pick a city or type coordinates: the queries and the Sorsa API request update as you type.

For the dates, engagement and media filters that combine with these, see the full list of Twitter search operators. To build a query by clicking, the free Twitter Advanced Search tool writes near: and within: from its Near city and Within radius fields.

#Do near: and geocode: still work in 2026?

X still accepts near:, within: and geocode:, but it documents none of them, and their results changed during 2026. Test each query before you build a report or a dashboard on it.

What was reported this year:

  • March 3, 2026. An OSINT researcher's post, seen 13.5K times, said geocode: searches had stopped working since February 25 (opens in a new tab).
  • May 23, 2026. A Reddit user worked around the broken Near you filter with geocode:, writing that it works with plain decimal coordinates and a radius, without N, S, E or W.
  • June 1, 2026. A developer on X's forum (opens in a new tab) called the geocode filter "currently dead".

To check whether a location query works today, run two searches in the Latest tab: your keyword with the location operator and the same keyword without it. If both return the same posts, X ignored the operator. If the operator search returns posts, open a few authors' profiles to see whether their place tag or profile location fits.

Good to know

An empty location search doesn't mean nobody posted from that place. It means no post carried a place tag in your circle and no recent author listed a matching city, or X skipped the operator. Search the place's names next, as the section after the code shows.

#Search posts by location with Sorsa API

For location searches in code, use Sorsa API's POST /search-tweets (opens in a new tab): it takes the same near:, within: and geocode: queries as x.com, returns about 20 posts per request, and puts each author's full profile, location included, inside every post. It costs from $0.07 per 1,000 posts, and Sorsa API never asks for your X login, so your own account is never at risk.

  1. Get a key. Sign up and copy your API key from the dashboard. The first 100 requests are free.

  2. Send the query. Put the location query in query and ask for latest, the order with no ranking.

    Terminal
    curl -X POST "https://api.sorsa.io/v3/search-tweets" \
      -H "ApiKey: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "query": "\"power outage\" near:\"Austin, TX\" within:25km",
        "order": "latest"
      }'
    
    Response200 OK
    {
      "tweets": [
        {
          "id": "1985120440187539712",
          "full_text": "Whole block on South Congress is dark again",
          "created_at": "2026-11-01T22:14:09Z",
          "lang": "en",
          "likes_count": 14,
          "reply_count": 3,
          "retweet_count": 2,
          "view_count": 1820,
          "user": {
            "id": "1630221874001645568",
            "username": "southcongress_grid_log",
            "display_name": "SoCo Grid Log",
            "location": "Austin, TX",
            "followers_count": 412
          }
        }
      ],
      "next_cursor": "DAADDAABCgABG4z1bJ9W0DsKAAIbjPVs"
    }
    
  3. Page through the results. Send next_cursor back in the body until the response returns none.

  4. Check each author's location. Keep the posts whose user.location names your place, and keep the raw text so you can see what matched.

    import re
    import requests
    
    URL = "https://api.sorsa.io/v3/search-tweets"
    HEADERS = {"ApiKey": "YOUR_API_KEY"}
    QUERY = '"power outage" near:"Austin, TX" within:25km'
    PLACE = re.compile(r"\b(austin|atx|travis county)\b", re.I)
    
    
    def search(query, max_pages=10):
        body = {"query": query, "order": "latest"}
        for _ in range(max_pages):
            r = requests.post(URL, headers=HEADERS, json=body, timeout=30)
            r.raise_for_status()
            page = r.json()
            yield from page.get("tweets", [])
            cursor = page.get("next_cursor")
            if not cursor:
                break
            body["next_cursor"] = cursor
    
    
    for t in search(QUERY):
        where = t["user"].get("location") or ""
        tag = "profile" if PLACE.search(where) else "other"
        print(tag, t["created_at"], t["user"]["username"], repr(where))
    

A 403 means the key is missing or out of requests; a 429 means more than 20 requests in one second, so wait a second and retry. Failed requests are never charged. For every other search parameter and for runs of thousands of pages, see the Twitter search API guide.

#Search place names when near: fails

When near: or geocode: comes back empty, search for the place in words and check the authors' profiles yourself. Local posts often name their city, a neighborhood or a local hashtag, and every Sorsa API result carries the author's location, so the same filter from step 4 sorts out who is local.

A query built from names, for example "power outage" (Austin OR ATX OR #atxwx OR "South Congress") lang:en, reaches posts that carry no place tag at all. Run it through POST /search-tweets, then keep the posts whose user.location matches your alias list: the city, its nickname, its airport code and the county.

The two methods answer different questions, so record which one found each post:

  • A location operator finds posts X ties to the place: tagged there, or written recently by someone whose profile lists it.
  • Place names plus a profile filter find posts about the place by people who say they live there, on any date back to 2006.

To watch a place over days rather than search it once, rerun the query on a schedule and keep only posts newer than the last run; real-time Twitter monitoring covers the polling side. And to see what a whole city is talking about rather than one topic, the Twitter trends API returns X's trending list for that place.

#Find Twitter accounts in a city

To find accounts in a place, search profiles rather than posts. On x.com, run a location query and open the People tab, or search a city name together with your topic to find profiles that mention both.

In code, Sorsa API's POST /search-users (opens in a new tab) takes a keyword such as coffee roaster Austin and returns matching profiles, each with its location field, page by page with next_cursor. Filter those profiles with the same alias list as above.

A profile's location is what its owner typed. The country X itself places an account in is a different field: the "Account based in" line under About this account, which X infers from IP addresses. Sorsa API's GET /about (opens in a new tab) returns it as country, one account per request. See what "Account based in" means on X for how far to trust it, and the Twitter location API guide to map a whole follower list by country.

#What a location search costs

On Sorsa API, a location search costs from $0.07 per 1,000 posts, author profiles included. On the official X API, the same posts with their authors cost $15.00 per 1,000 from November 22, 2026, when X starts billing every user an expansion returns at $0.010 on top of $0.005 per post (X's notice (opens in a new tab)).

Posts found

Official X API

$1,500

for 100K posts with authors

$0.015 per post with its author

Sorsa API

from$7

for 100K posts with authors

from $0.07 per 1,000

214x cheaper

The official route adds more on top. A post's place object counts as one more $0.005 expansion, which brings a tagged post with its author and place to $0.020. Its location operators match only place-tagged posts, so the profile-location matches x.com shows for the last week never come back. And it stops at 3 million post reads a month on pay-per-use pricing (opens in a new tab), with an Enterprise contract from about $42,000 a month above that.

On Sorsa API you pay per request: one request returns up to about 20 posts, failed requests are free, and every plan runs at 20 requests per second. The 100 free requests cover about 2,000 posts.

#Start searching Twitter by location

A location search on X is a keyword plus near: or geocode:, read in the Latest tab and checked against the authors' profiles. To run it in code for one city or a hundred, use Sorsa API: POST /search-tweets takes the same queries with one API key, returns every author's location, and costs from $0.07 per 1,000 posts.

#FAQ

How do I see tweets near me on X?

Search a keyword on x.com or in the X app, open Search filters and choose Near you; X then uses your device's location. You can also type near:me into the search box. Both work only when you are signed in, and both show posts X ties to your area through a place tag or a recent author's profile location.

How do I filter Twitter search by country?

X search has no country-code operator. On x.com, use near: with the country's name, or place: with X's ID for the country (the United States is 96683cc9126741d1). The official X API's place_country:US matches only place-tagged posts. To group accounts by the country X assigns them, read the "Account based in" label: Sorsa API's GET /about returns it as country, one account per request.

Can someone find my location from my tweets?

Only what you share. A post carries a place only when you tag one, and precise GPS comes along only from the X app's camera with location on. Your profile location is whatever you type. X also shows a country under About this account, inferred from your IP addresses, which anyone can open on your profile.

Which API should I use to search tweets by location?

Use Sorsa API: POST /search-tweets takes the same near:, within: and geocode: queries as x.com, returns about 20 posts per request with each author's profile location, and costs from $0.07 per 1,000 posts against $15.00 on the official X API. One API key, no developer account, 20 requests per second on every plan.

Is there a free way to search Twitter by location?

Yes. On x.com and in the X app, Near you and the location operators are free with an X account. For code, every Sorsa API account starts with 100 free requests, about 2,000 posts from location searches, with no card and no expiry date.

#How we checked

On November 2, 2026, we read X's Help Center pages on search, Near you and post locations, its search operator reference, data dictionary and pricing, and the October 23 notice on expansion billing. We set the 2026 reports on geocode: from X's developer forum, an OSINT researcher and Reddit against Bellingcat's 2021 tests and its 2026 toolkit notes. Every endpoint, field and page size here comes from the live Sorsa API reference; we didn't run a live location query for this article, so the response above shows the documented fields with sample values.

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
  • First published.