---
title: "GET /api/v1/x/places/search"
method: GET
path: "/api/v1/x/places/search"
tags: ["Tweets"]
---

# GET /api/v1/x/places/search

`GET /api/v1/x/places/search`

## Request

- Base URL: `https://xquik.com`
- URL: `https://xquik.com/api/v1/x/places/search`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
  - none

Finds places on X by name. Pass a place's id as place to /x/tweets/search to read posts tagged there. X ranks the places, so their order can differ between requests. Each returned place costs 1 credit.

## Query parameters

- `q` string, required
- `limit` integer
- `fields` string
- `omit` string

## Response `200`

Places X found for the name

- object
  - `places` PlaceSearchResult[], required
    - `id` string, required: Place ID. Pass it as place to /x/tweets/search.
    - `name` string, required: Short name of the place.
    - `fullName` string, nullable, required: Name with the region or country around the place.
    - `country` string, nullable, required: Country the place lies in.
    - `countryCode` string, nullable, required: 2-letter code of the country the place lies in.
    - `placeType` string, nullable, required: X's kind of place, such as city, admin, neighborhood, poi or country.
    - `url` string, nullable, required: X's own reference URL for the place.
    - `centroid` number[], nullable, required: Center of the place. Longitude, then latitude.
    - `boundingBox` object, nullable, required: Outline of the place as GeoJSON. Each point holds longitude, then latitude.
      - `type` string, required: GeoJSON shape of the outline.
      - `coordinates` array[], required: Rings of points that draw the outline.
        - array[]
          - number[]
    - `attributes` PublicMetadata, required: Public metadata whose fields X defines.
    - `containedWithin` Place[], required: Larger places this place lies in. Often 1.
      - `id` string, required: Place ID. Pass it as place to /x/tweets/search.
      - `name` string, required: Short name of the place.
      - `fullName` string, nullable, required: Name with the region or country around the place.
      - `country` string, nullable, required: Country the place lies in.
      - `countryCode` string, nullable, required: 2-letter code of the country the place lies in.
      - `placeType` string, nullable, required: X's kind of place, such as city, admin, neighborhood, poi or country.
      - `url` string, nullable, required: X's own reference URL for the place.
      - `centroid` number[], nullable, required: Center of the place. Longitude, then latitude.
      - `boundingBox` object, nullable, required: Outline of the place as GeoJSON. Each point holds longitude, then latitude.
        - `type` string, required: GeoJSON shape of the outline.
        - `coordinates` array[], required: Rings of points that draw the outline.
          - array[]
            - number[]
      - `attributes` PublicMetadata, required: Public metadata whose fields X defines.
  - `count` integer, required: Places returned & charged.
  - `total` integer, required: Places X found, before limit.
  - `message` string: What to send instead. Present only when X finds no place.

## Other responses

- `400`: Missing place search text
- `401`: Non-MPP paid reads require Bearer authentication. Without credentials, the answer offers a guest checkout but does not create it. Invalid credentials return a plain error. Confirm before using any offered action.
- `402`: Payment required. MPP reads include `WWW-Authenticate`. Authenticated reads include balances, plus checkout when the key can open it. A key that reads only gets the account page instead. A failed request never creates checkout. A caller on a plan gets top-up only, plus `credits_renew_at` when the plan renews. Guest keys offer top-up.
- `424`: Dependency unavailable, unauthorized, or limited. Default v1 uses 502. Best-practice responses use 424 for transparent dependency failures. Search answers 424 `search_unavailable` when X fails the query itself, or when its filters matched none of the last 3,000 posts read. The message says how far back the search read.
- `429`: Too many requests right now. Each user gets 500 reads a second. Each minute allows 120 writes & 60 deletes. `x_api_rate_limited` means X limits this read for now. Neither answer costs anything. Wait for the seconds in `Retry-After`, then retry.
- `500`: Unexpected error.
- `502`: Dependency unavailable, unauthorized, or limited. Default v1 uses 502. Best-practice responses use 424 for transparent dependency failures. Search answers 424 `search_unavailable` when X fails the query itself, or when its filters matched none of the last 3,000 posts read. The message says how far back the search read.
- `503`: Retry x_api_unavailable after Retry-After. With X-Xquik-Busy, retry until your deadline.
- `default`: Unexpected error.

## Changes

- **2026-10-20** `45942c75fdc2`: 18 warning
  - added the new `topup_in_progress` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `429`
  - added the new `topup_in_progress` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `429`
  - added the new `topup_in_progress` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `400`
  - added the new `topup_in_progress` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `424`
  - …14 more

[Operation history](https://skmtc.dev/xquik-dev/apis/xquik-api/changes/api/v1/x/places/search/get.md)

---

[API](https://skmtc.dev/xquik-dev/apis/xquik-api.md) · [All operations](https://skmtc.dev/xquik-dev/apis/xquik-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xquik-dev/apis/xquik-api/revisions/45942c75fdc2?raw)
