GET
/
cities
/
search
curl --request GET \
  --url https://api.shovels.ai/v2/cities/search \
  --header 'X-API-Key: <api-key>'
{
  "items": [
    {
      "geo_id": "1",
      "name": "SAN FRANCISCO, SAN FRANCISCO, CA",
      "state": "CA"
    },
    {
      "geo_id": "2",
      "name": "SAN RAMON, CONTRA COSTA COUNTY, CA",
      "state": "CA"
    },
    {
      "geo_id": "3",
      "name": "SAN DIEGO, SAN DIEGO COUNTY, CA",
      "state": "CA"
    }
  ],
  "page": 1,
  "size": 3
}

Authorizations

X-API-Key
string
header
required

Query Parameters

q
string
required

The name to search for in the city fields.

Response

200
application/json
A list of cities that match the search text.
items
object[]
required

The list of items returned in the response following given criteria.

page
integer
required

The page number of the response.

size
integer
required

The number of items returned in the response.

next_page
integer | null
required

The next page number of the response.