Skip to main content
GET
/
states
/
search
Search States
curl --request GET \
  --url https://api.shovels.ai/v2/states/search \
  --header 'X-API-Key: <api-key>'
{
  "items": [
    {
      "geo_id": "CA",
      "name": "CALIFORNIA"
    },
    {
      "geo_id": "TX",
      "name": "TEXAS"
    },
    {
      "geo_id": "MT",
      "name": "MONTANA"
    }
  ],
  "size": 3
}

Authorizations

X-API-Key
string
header
required

Query Parameters

q
string
required

The name to search for in the state fields.

cursor
string | null

Cursor for pagination

size
integer
default:50
Required range: 1 <= x <= 100

Response

A list of states that match the search term.

Paginated response for states.

items
States · object[]
required

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

size
integer
required

The number of items returned in the response.

next_cursor
string | null
required

The cursor for retrieving the next page of results.