Skip to main content
GET
Twitter place search API: find X place IDs by name
1 credit per place returned · All plans from $0.00012/credit
Use GET /x/places/search to find places on X by name. Each place carries the id that Search tweets takes as place. Each returned place costs 1 credit. limit lowers the cost. An empty result costs nothing.

Search tweets from a place

Search for the place by name, then read id from the place you want. Send that id as place to GET /x/tweets/search to get posts tagged there. fullName, country, and placeType tell places with the same name apart. containedWithin lists the larger places around each place. X ranks the places. Their order can differ between requests.

Query parameters

string
required
Place name to search for, such as istanbul. Alias: query.
integer
Maximum places to return, starting at 1. Omit it for every place X finds. Your credit balance can return fewer. Aliases: pageSize, count, max_results, maxItems, max_items & per_page.

Headers

string
Send a full Xquik account API key.
string
Bearer xq_your_guest_key_here for paid_reads.

Response

200 OK

object[]
Places X found for the name, in X’s order. Place object fields.
string
Place ID. Pass it as place to GET /x/tweets/search.
string
Short name of the place.
string | null
Name with the region or country around the place.
string | null
Country the place lies in.
string | null
2-letter code of that country.
string | null
X’s kind of place, such as city, admin, neighborhood, poi, or country.
string | null
X’s own reference URL for the place.
number[] | null
Center of the place. Longitude, then latitude.
object | null
Outline of the place as GeoJSON, with type and coordinates. Each point holds longitude, then latitude.
object
Extra details X attaches to some places. Often empty.
object[]
Larger places this place lies in. Each has the same fields, without containedWithin.
number
Places returned and charged.
number
Places X found, before limit.
string
What to send instead. Present only when X finds no place.
A name X finds no place for returns an empty list and a message:

400 Missing query

Send the place name as q.

401 Unauthenticated

Anonymous requests get WWW-Authenticate: Bearer and a guest wallet checkout action. This is not a Payment challenge.

402 Payment required

Account keys get account options. Guest keys get guest top-up only. No checkout starts automatically. Confirm any payment action.

502 X API unavailable

The read service returned an error. Retry after a short delay.

503 Service busy

Xquik is busy. Wait for Retry-After, then retry.

429 Rate limit exceeded

The Xquik tier limit blocked the request. Use Retry-After when present. Otherwise, use the JSON retryAfter field.

424 Dependency failed

The opt-in normalized contract returns 424 when the read service fails. Send xquik-api-contract: 2026-04-29 to opt in. Default v1 returns 502.

Twitter place search API questions

How do I find a Twitter place ID?

Call GET /x/places/search with the place name as q. Read id from the place you want.

How do I search tweets from a place?

Send the place id as place to GET /x/tweets/search. Add q to keep only posts that match your words.

How much does a place search cost?

Each returned place costs 1 credit. An empty result costs nothing. Add limit to return fewer places.

Why does the order of places change?

X ranks the places for each request. Match on id, not on position.

Does this replace X’s official API?

No. This page documents Xquik, an independent third-party service. It does not document X’s official API.
Next steps. Search tweets takes a place id as place.