Amplify APIReference
Search GeoLocations
GET
/locations/searchAuthorization
obToken OB-TOKEN-V1<token>
Token obtained from the Obtain a token endpoint or the Amplify API token page. Valid for 30 days.
In: header
Query Parameters
term?string
The search term
limit?number
The limit of the search query. Default is 300
include?string
which geoTypes to return
exclude?string
which geoTypes to filter out of the results
exactMatch?boolean
search the exact term when true. The default is false
country?string
return results from this country only
locationsVersion?string
The regions inventory to search in. V1 for FIPS and V2 for ISO-3166. The default is V1
Response Body
application/json
curl -X GET "https://example.com/locations/search?term=United+States&limit=6&include=Region&exclude=Country&exactMatch=true&country=United+States&locationsVersion=V2"{ "geoLocations": [ { "id": "fc4deb5112fb4415a9edacdf4aafb0d8", "name": "United States", "canonicalName": "United States", "geoType": "Country", "code": "US" }, { "id": "c20768bb56a25c22299c38801e935c3a", "name": "United Kingdom", "geoType": "Country", "canonicalName": "United Kingdom", "code": "GB" } ], "excludedGeoLocations": [ { "name": "Alabama", "id": "5d01f8eab282fcd783aff5c09bb8fc7a", "parent": { "geoType": "Country", "canonicalName": "United States", "name": "United States", "id": "fc4deb5112fb4415a9edacdf4aafb0d8" }, "geoType": "Region", "canonicalName": "Alabama, United States" }, { "parent": { "geoType": "Country", "canonicalName": "United States", "name": "United States", "id": "fc4deb5112fb4415a9edacdf4aafb0d8" }, "geoType": "DMA", "canonicalName": "Eugene OR, United States", "name": "Eugene OR", "id": "be482a98eeddfc2009ac2f1c181eac79" }, { "parent": { "canonicalName": "United States", "geoType": "Country", "id": "fc4deb5112fb4415a9edacdf4aafb0d8", "name": "United States" }, "geoType": "PostalCode", "canonicalName": "96373, FPO, , United States", "name": "96373, FPO", "id": "419268adfd7cc1751233df8337b97671" } ]}