Core APIs
Locations API

Parameters

1min

Parameters

GET /locations

The following parameters can be used to refine the results from the Locations API.

Parameter

Required

Description

api_key

required

The API key for your account.

q

optional

The query to use to search for locations, i.e. new york or mumbai .

id

optional

The id of a specific location (location ids are returned with all results from the Locations API).

parent_id

optional

Limits the search to child locations of the given parent_id . Useful for retrieving all sub-locations of a given location (all cities within a country, for example).

type

optional

Limits the results to a specific type of location. Valid values are city , country , county , dma_region , municipality , neighborhood , state , postal_code or province . Multiple location types should be presented as a comma seperated list (i.e. type=state,city to include Location results that are of type state or city ).

country_code

optional

Limits the results to locations in specific countries. See supported countries for a full list of all supported values. Multiple countries should be presented as a comma seperated list (i.e. country_code=de,fr,us for Germany, France and the United States).

limit

optional

Limits the number of search results returned per page. Defaults to 10 . The maximum number of location results returned per page is 100 . Use in conjunction with the the page parameter to implement pagination.

page

optional

Specifies the page of results to retrieve from 0 (first page) to a maximum page number of 100 (Scale SERP does not support paging beyond the 100th page). Defaults to 0 . Use in conjunction with the limit parameter to limit the number of results returned per page.



Updated 13 Aug 2024
Did this page help you?