### Which API should I use for search? - The Search API is generally available and fully supported. - For new integrations we recommend the [Places Search API](https://docs.tomtom.com/places-search-api/documentation/product-information/introduction). - See [Which API should I use for search?](https://docs.tomtom.com/search-api/documentation/product-information/choosing-a-search-api) for a side-by-side comparison. ## Purpose If your use case is only retrieving POI (Points of Interest) results around a location, you may use the Nearby Search endpoint. This endpoint will _only return POI results_. It **does not** take in a search query parameter. ### Run this endpoint You can easily run this and other endpoints. Go to the TomTom [API Explorer](https://docs.tomtom.com/search-api/api-explorer) page and follow the directions. ## Request data ### HTTPS Method: `GET` For ease of viewing and identification: - Constants and parameters enclosed in curly brackets { } **must be replaced** with their values. - Please see the following [Request parameters](#request-parameters) section with the required and optional parameters tables for their values. The generic request format is as follows. ```shell [type=get] [title=URL request format] https://{baseURL}/search/{versionNumber}/nearbySearch/.{ext}?key={Your_API_Key}&lat={lat}&lon={lon}&radius={radius}&limit={limit}&ofs={ofs}&countrySet={countrySet}&topleft={topleft}&btmRight={btmRight}&language={language}&extendedPostalCodesFor={extendedPostalCodesFor}&categoryset={categoryset}&brandSet={brandSet}&connectorset={connectorset}&fuelSet={fuelSet}&vehicleTypeSet={vehicleTypeSet}&view={view}&openingHours={openingHours}&timezone={timezone}&mapcodes={mapcodes}&relatedpois={relatedpois}&minPowerKW={minPowerKW}&maxpowerkw={maxpowerkw} ``` ```shell [type=get] [title=URL request example] https://api.tomtom.com/search/2/nearbySearch/.json?key={Your_API_Key}&lat=36.98844&lon=-121.97483 ``` ```shell [type=get] [title=curl command request example] curl 'https://api.tomtom.com/search/2/nearbySearch/.json?key={Your_API_Key}&lat=36.98844&lon=-121.97483' ``` ### Request parameters The following table describes the parameters that can be used in a request. - Required parameters **must** be used or the call will fail. - Optional parameters _may_ be used. - If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table. - The order of request parameters is not important.
Required parameters Description
`baseURL`
*string*
Base URL for calling the API.
**Values:**
  • `api.tomtom.com`
  • `kr-api.tomtom.com` (see the [Region-specific content](https://docs.tomtom.com/search-api/documentation/product-information/region-specific-content) page)
`versionNumber`
*string*
The service version.
**Value:** The current value is `2`.
`ext`
*string*
A valid response format.
**Values:** `json` , `jsonp` , `js` , or `xml`
`key`
*string*
An API Key valid for the requested service.
**Value:** Your valid `API Key`.
`lat`
*float*
Latitude, e.g., `lat=37.337` lat,lon where results should be biased.
**Note:** supplying a lat/lon *without a radius* will only bias the search results *to that area*.
**Value:** min/max: -90 to +90
**Reference:** [Latitude, Longitude and Coordinate System Grids](https://gisgeography.com/latitude-longitude-coordinates/)
`lon`
*float*
Longitude, e.g., `lon=-121.89` lat,lon where results should be biased.
**Note:** supplying a lat/lon *without a radius* will only bias the search results *to that area*.
**Value:** min/max: -180 to +180
**Reference:** [Latitude, Longitude and Coordinate System Grids](https://gisgeography.com/latitude-longitude-coordinates/)
Optional parameters Description
`limit`
*integer*
The maximum number of responses that will be returned.
**Default value:** `10`
**Maximum value:** `100`
`ofs`
*integer*
The starting offset of the returned results within the full result set.
**Default value:** `0`
`countrySet`
*string*
Comma separated string of country codes in ISO 3166-1 alpha-2 or alpha-3 code formats (e.g., FR,ES or FRA,ESP). This will limit the search to the specified countries. The choice of view may restrict which countries are available.
**Values:** `FR` , `ES` or `FRA` , `ESP` , etc. Visit the [Search API Market Coverage](https://docs.tomtom.com/search-api/documentation/product-information/market-coverage) page for a list of all the countries supported by the Search engine.
`radius`
*integer*
If `radius` and `position` are set, the results will be constrained to the defined area. The radius parameter is specified in **meters**. Valid radius values are numbers greater than `0`. Supplying values equal to or lesser than `0` causes the parameter to be ignored.
**Value:** A `radius`.
`topLeft`
*string*
Top-left position of the bounding box. **Note:** the `btmRight` parameter should always go along with the `topLeft` parameter as they *both* define the bounding box.
**Value:** A comma-separated string composed by `lat,lon`. This is specified as a comma-separated string composed by `lat,lon` (e.g., `37.553,-122.453` ). **Important note:** Point-Radius parameters and Bounding box parameters are mutually exclusive. Point radius parameters take precedence when both are passed.
`btmRight`
*string* (position)
**Deprecated**
Bottom-right position of the bounding box. This is specified as a comma-separated string composed by lat,lon (e.g., `37.553,-122.453` ). **Important note:** Point Radius parameters and Bounding Box parameters are mutually exclusive. Point Radius parameters **take precedence when both are passed**.
March 1, 2018:
  • The `topLeft` and `btmRight` parameters have been deprecated and will be withdrawn following a 12 month deprecation period. The planned withdrawal date is **March 1, 2019**. Following withdrawal, API requests that include a `topLeft` or `btmRight` parameter **will receive a HTTP 400 error** in the response.
**Value:** A comma-separated string composed by `lat,lon`.
**Example:** `37.553,-122.453`
`language`
*string*
Language in which search results should be returned. Should be one of the TomTom IETF [Supported Languages](https://docs.tomtom.com/search-api/documentation/product-information/supported-languages) tags, case insensitive. When data in the specified language is not available for a specific field or the language is not specified, the default language is used (English).
**Value:** A TomTom IETF [Supported Languages](https://docs.tomtom.com/search-api/documentation/product-information/supported-languages) tag.
`extendedPostalCodesFor`
*string*
Indexes for which extended postal codes should be included in the results. Available values are described in the additional information indexes abbreviation values section. The value should be a comma-separated list of index types (in any order) or `None` for no indexes. By default extended postal codes are included for all indexes **except Geo**. Extended postal code lists for geographies can be quite long, so they have to be explicitly requested when needed.
**Value:** A comma-separated list of index types.
**Usage examples:**
  • `extendedPostalCodesFor=POI`
  • `extendedPostalCodesFor=PAD,Addr,POI`
  • `extendedPostalCodesFor=None`
Extended postal code is returned as an `extendedPostalCode` property of an address. Availability is region-dependent.
`categorySet`
*string*
A comma-separated list of categories which could be used to restrict the result to the Points Of Interest of specific categories. The list of categories can be discovered using the [POI Categories](https://docs.tomtom.com/search-api/documentation/poi-categories-service/poi-categories) endpoint.
**Value:** A comma-separated list of category identifiers (in any order). When multiple category identifiers are provided, only POIs that belong to (at least) one of the categories from the provided list will be returned.
**Usage examples:**
  • `categorySet=7315` (search Points Of Interest of category `Restaurant` )
  • `categorySet=7315025,7315017` (search Points Of Interest of a category, in this example an Italian ( `italian` ) or French ( `french` ) `Restaurant`
`brandSet`
*string*
A comma-separated list of brand names which could be used to restrict the result to Points Of Interest of specific brands.
**Value:** A comma-separated list of brand names (in any order). When multiple brands are provided, only POIs that belong to (at least) one of the brands from the provided list will be returned. Brands that contain a "," (comma) in their name should be put into quotes, for example: `"A,B,C"`.
**Usage examples:**
  • `brandSet=Tomtom` (search Points Of Interest of the "Tomtom" brand)
  • `brandSet=Tomtom,Foobar` (search Points Of Interest of the "Tomtom" brand OR "Foobar" brand)
  • `brandSet="A,B,C Comma"` (search Points Of Interest of the "Adam,Batsman,and,Bowling" brand)
`connectorSet`
*string*
A comma-separated list of connector types which could be used to restrict the result to the Points Of Interest of type Electric Vehicle Station supporting specific connector types. See the list of [Supported Connector Types](https://docs.tomtom.com/search-api/documentation/product-information/supported-connector-types)
**Value:** A comma-separated list of connector types (in any order). When multiple connector types are provided, only POIs that support (at least) one of the connector types from the provided list will be returned.
**Usage examples:**
  • `connectorSet=IEC62196Type2CableAttached` (search Points Of Interest of type Electric Vehicle Station supporting `IEC62196Type2CableAttached` )
  • `connectorSet=IEC62196Type2Outlet,IEC62196Type2CableAttached` (search Points Of Interest of type Electric Vehicle Station supporting `IEC62196Type2CableAttached` or `IEC62196Type2Outlet` )
`minPowerKW`
*double*
An optional parameter which could be used to restrict the result to the Points Of Interest of type Electric Vehicle Station supporting at least one connector with a specific minimal value of power in kilowatts (closed interval - with that value).
**Value:** A double value representing the power rate in kilowatts.
**Usage example:**
`minPowerKW=22.2` : returns a Points Of Interest of type Electric Vehicle Station supporting at least one connector with a power rate in the range from 22.2 kW. This parameter might be used together with `maxPowerKW`.
`maxPowerKW`
*double*
An optional parameter which could be used to restrict the result to the Points Of Interest of type Electric Vehicle Station supporting at least one connector with a specific maximum value of power in kilowatts (closed interval - with that value).
**Value:** A double value representing the power rate in kilowatts.
**Usage example:**
`maxPowerKW=43.2` : returns a Points Of Interest of type Electric Vehicle Station supporting at least one connector with a power rate in the range to 43.2 kW. This parameter might be used together with `minPowerKW`.
`fuelSet`
*string*
A comma-separated list of fuel types which could be used to restrict the result to the Points Of Interest of specific fuels. Only POIs with a proper fuel type will be returned.
**Value:** A comma-separated list of fuel type identifiers (in any order). When multiple fuel types are provided, only POIs that belong to (at least) one of the fuel types from the provided list will be returned.
[Fuel Types available](https://docs.tomtom.com/search-api/documentation/product-information/supported-fuel-types)
**Usage examples:**
  • `fuelSet=Diesel` (search Points Of Interest of the `Diesel` fuel type)
  • `fuelSet=Petrol,LPG` (search Points Of Interest of either the `Petrol` or `LPG` fuel type)
`vehicleTypeSet`
*string*
A comma-separated list of vehicle types that could be used to restrict the result to the Points Of Interest of specific vehicles. If `vehicleTypeSet` is specified, the query can remain empty. Only POIs with a proper vehicle type will be returned.
**Value:** A comma-separated list of vehicle type identifiers (in any order). When multiple vehicles types are provided, only POIs that belong to (at least) one of the vehicle types from the provided list will be returned.
Available vehicle types: `Car` , `Truck`
**Usage examples:**
  • `vehicleTypeSet=Car` (search Points Of Interest of the `Car` car type)
  • `vehicleTypeSet=Car,Truck` (search Points Of Interest of either the `Car` or `Truck` vehicle type)
`view`
*string*
Geopolitical view parameter defines the context used to resolve disputed territories. We support the following views: `Unified`, `AR` (Argentinian), `CN` (Chinese), `IL` (Israeli), `IN` (Indian), `MA` (Moroccan), `PK` (Pakistani), `RU` (Russian), `RS` (Serbian), `TW` (Taiwanese), and `TR` (Turkish). The default value for view depends on the country from which the request originates.
**Default values:**
  • **Argentina**: `AR`
  • **China**: `CN`
  • **Israel**: `IL`
  • **India**: `IN` (No other geopolitical views are allowed)
  • **Morocco**: `MA`
  • **Pakistan**: `PK`
  • **Russia**: `RU`
  • **Serbia**: `RS`
  • **Taiwan**: `TW`
  • **Türkiye**: `TR`
  • **Others**: `Unified`
`openingHours`
*string*
List of opening hours for a POI (Points of Interest).
**Value:** `nextSevenDays` Mode shows the opening hours for next week, starting with the current day in the local time of the POI.
**Usage example:** `openingHours=nextSevenDays`
`mapcodes`
*string*
Enables the return of a comma-separated mapcodes list. It can also filter the response to only show selected mapcode types. See [mapcodes](#mapcodes) in the response.
**Values:** One or more of: `Local` , `International` , `Alternative` A mapcode represents a specific location to within a few meters. Every location on Earth can be represented by a mapcode. Mapcodes are designed to be short, easy to recognize, remember, and communicate. Visit the [Mapcode project](http://www.mapcode.com) website for more information.
**Usage examples:**
  • `mapcodes=Local` (only returns the `Local` mapcode for a location)
  • `mapcodes=Local,Alternative` (returns both `Local` and `Alternative` mapcodes for a location)
  • `mapcodes=Local,Alternative,International` (returns all possible mapcodes for a location)
`timeZone`
*string*
Used to indicate the mode in which the `timeZone` object should be returned.
**Values:** `iana` Mode shows the IANA ID which allows the user to determine the current time zone for the POI.
**Usage examples:** `timeZone=iana`
`relatedPois`
*string*
An optional parameter that provides the possibility to return related Points Of Interest.
**Default value:** `off`
**Values:** `off` , `child` , `parent` , `all` Points Of Interest can be related to each other when one is physically part of another. For example, an airport terminal can physically belong to an airport. This relationship is expressed as a parent/child relationship: the airport terminal is a child of the airport. If the value `child` or `parent` is given, a related Points Of Interest with a specified relation type will be returned in the response. If the value `all` is given, then both child and parent relations are returned.
**Usage examples:**
  • `relatedPois=child` : Returns only Points Of Interest with a child relation.
  • `relatedPois=parent` : Returns only Points Of Interest with a parent relation.
  • `relatedPois=all` : Returns Points Of Interest with all possible relations.
### Request headers
Optional headers Description
[Accept-Encoding](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding) Enables response compression.
**Value:** `gzip`
Tracking-ID Specifies an identifier for the request. It can be used to trace a call. The value must match the regular expression `'^[a-zA-Z0-9-]{1,100}$'`. An example of the format that matches this regular expression is UUID: (e.g., `9ac68072-c7a4-11e8-a8d5-f2801f1b9fd1` ). For details check [RFC 4122](https://tools.ietf.org/html/rfc4122). If specified, it is replicated in the [Tracking-ID](#trackingid-response) response header. It is only meant to be used for support and does not involve tracking of you or your users in any form.
**Value:** An `identifier` for the request.
## Response data ### Response body For illustrative purposes, the following code example is neatly indented and includes all possible response fields. Actual responses are more compact and the fields present will vary based on the result type and the data available. See the following response fields section for more information. When requesting JSON output the response has the following structure: ```json [title=Response body structure - JSON] { "summary": { "queryType": "NEARBY", "queryTime": 48, "numResults": 10, "offset": 0, "totalResults": 12344, "fuzzyLevel": 1, "geoBias": { "lat": 36.98844, "lon": -121.97483 } }, "results": [] } ``` Each element of the `results` array is in the following format: **Results array elements format - JSON** ```json { "type": "POI", "id": "g6JpZK84NDAwNjEwMDE4NjUxNDKhY6NVU0GhdqdVbmlmaWVk", "score": 1, "dist": 0, "info": "search:ta:840061001865142-US", "poi": { "name": "Upper Crust Pizza & Pasta", "phone": "+(1)-(831)-4762333", "url": "www.uppercrustsc.com/", "brands": [ { "name": "Upper Crust" } ], "categorySet": [ { "id": 7315015 } ], "categories": ["pizza", "restaurant"], "openingHours": { "mode": "nextSevenDays", "timeRanges": [ { "startTime": { "date": "2019-02-05", "hour": 7, "minute": 0 }, "endTime": { "date": "2019-02-05", "hour": 21, "minute": 0 } }, { "startTime": { "date": "2019-02-06", "hour": 7, "minute": 0 }, "endTime": { "date": "2019-02-06", "hour": 21, "minute": 0 } }, { "startTime": { "date": "2019-02-07", "hour": 7, "minute": 0 }, "endTime": { "date": "2019-02-07", "hour": 21, "minute": 0 } }, { "startTime": { "date": "2019-02-08", "hour": 7, "minute": 0 }, "endTime": { "date": "2019-02-08", "hour": 21, "minute": 0 } }, { "startTime": { "date": "2019-02-09", "hour": 7, "minute": 0 }, "endTime": { "date": "2019-02-09", "hour": 21, "minute": 0 } }, { "startTime": { "date": "2019-02-10", "hour": 7, "minute": 0 }, "endTime": { "date": "2019-02-10", "hour": 12, "minute": 0 } }, { "startTime": { "date": "2019-02-10", "hour": 14, "minute": 0 }, "endTime": { "date": "2019-02-10", "hour": 21, "minute": 0 } } ] }, "classifications": [ { "code": "RESTAURANT", "names": [ { "nameLocale": "en-US", "name": "pizza" }, { "nameLocale": "en-US", "name": "restaurant" } ] } ], "timeZone": { "ianaId": "Europe/Andorra" } }, "relatedPois": [ { "relationType": "child", "id": "g6JpZK83ODQwMDkwMDAwMjUxMTWhY6NBUkWhdqdVbmlmaWVk" }, { "relationType": "child", "id": "u234HsadasKHZK81MjgwMDkwMDQyNDY3jashfsaASDHkjhdA" } ], "address": { "streetNumber": "2501", "streetName": "Soquel Dr", "municipalitySubdivision": "Santa Cruz, Live Oak", "municipality": "Santa Cruz, Live Oak", "countrySecondarySubdivision": "Santa Cruz", "countryTertiarySubdivision": "Santa Cruz", "countrySubdivision": "CA", "postalCode": "95065", "extendedPostalCode": "950652023", "countryCode": "US", "country": "United States Of America", "countryCodeISO3": "USA", "freeformAddress": "2501 Soquel Dr, Santa Cruz, CA 95065", "countrySubdivisionName": "California", "localName": "Santa Cruz" }, "position": { "lat": 36.98844, "lon": -121.97483 }, "mapcodes": [ { "type": "Local", "fullMapcode": "US-CA FS.WRH3", "territory": "US-CA", "code": "FS.WRH3" }, { "type": "International", "fullMapcode": "S4ZW4.990V" }, { "type": "Alternative", "fullMapcode": "US-CA 4349.S8W", "territory": "US-CA", "code": "4349.S8W" }, { "type": "Alternative", "fullMapcode": "US-CA JJCH.H9DF", "territory": "US-CA", "code": "JJCH.H9DF" }, { "type": "Alternative", "fullMapcode": "USA JJCH.H9DF", "territory": "USA", "code": "JJCH.H9DF" } ], "viewport": { "topLeftPoint": { "lat": 36.98934, "lon": -121.97596 }, "btmRightPoint": { "lat": 36.98754, "lon": -121.9737 } }, "entryPoints": [ { "type": "main", "position": { "lat": 36.98817, "lon": -121.97487 } }, { "type": "minor", "functions": ["FrontDoor"], "position": { "lat": 52.30987, "lon": 4.76093 } } ], "chargingPark": { "connectors": [ { "connectorType": "IEC62196Type2CCS", "ratedPowerKW": 22.2, "currentA": 32, "currentType": "AC3", "voltageV": 380 }, { "connectorType": "Tesla", "ratedPowerKW": 43.2, "currentA": 16, "currentType": "AC3", "voltageV": 480 } ] }, "dataSources": { "chargingAvailability": { "id": "442009000132285" }, "parkingAvailability": { "id": "00000000-0005-36de-0009-20d4467654e2" }, "fuelPrice": { "id": "1:cf81fe50-6218-11ea-a677-d05099d5f839" }, "geometry": { "id": "00004e4c-3100-3c00-0000-0000685e23c7" } } } ```
### Response fields The following data table describes all of the fields that can appear in a response. Fields are listed by the response section they belong to, and in the order that they appear in the response.
Primary fields
Field Description
`summary`
*object*
Summary information about the search that was performed.
[summary](#summary-object) object
`results`
*array*
Result list, sorted in descending order by score.
[results](#results-array) array
summary object
Field Description
`query`
*string*
Query as interpreted by the search engine.
`queryType`
*string*
Response type. Can be `NEARBY` or `NON_NEAR`.
`queryTime`
*integer*
Time spent on resolving the query.
`numResults`
*integer*
Number of results in the response.
`offset`
*integer*
Starting offset of the returned results within the full result set.
`totalResults`
*integer*
Total number of results found.
`fuzzyLevel`
*integer*
Maximum fuzzy level required to provide results.
`geoBias`
*object*
Position used to bias the results:
[LatLon](#latlon)
results array
Field Description
`type`
*string*
Type of result.
**Value:** `POI`
`id`
*string*
A stable unique id for the POI index, and a non-stable unique id for the other indexes. **Note:** Stable id means that it doesn't change between data releases without changing the location, attribution, or classification.
`score`
*double*
Score of the result. A larger score means there is a probability that a result meeting the query criteria is higher.
`dist`
*double*
Unit: meters. This is the distance to an object if `geoBias` was provided.
`info`
*string*
Information about the original data source of the result.
`poi`
*object*
Information about the Points of Interest in the result.
[poi](#poi-object) object
`relatedPois`
*object*
List of related Points Of Interest.
[relatedPois](#relatedpois-object) object
`address`
*object*
Structured address for the result.
[address](#address-object) object
`position`
*object*
Position of the result:
[LatLon](#latlon)
`mapcodes`
*array*
List of mapcode objects
[mapcodes](#mapcodes-object) object
`viewport`
*object*
A viewport which can be used to display the result on a map.
[viewport](#viewport-object) object
`entrypoints`
*array*
List of entry points of the POI.
[entryPoints](#entrypoints-array) array
`chargingPark`
*object*
A list of `chargingPark` objects. Present only when the Points of Interest are of the Electric Vehicle Station type.
[chargingPark](#chargingpark-object) object
`vehicleConstraint`
*object*
Optional section. Information on access constraints to a POI (Point of Interest).
[vehicleConstraint](#vehicleconstraint-object) object
`dataSources`
*object*
Optional section.
Reference ids for use with the [Additional Data](https://docs.tomtom.com/search-api/documentation/additional-data-service/additional-data) service.
[dataSources](#datasources-object) object
`fuelTypes`
*array*
Optional section. List of fuel types served by the petrol station.
fuelTypes array
[Fuel Types available](https://docs.tomtom.com/search-api/documentation/product-information/supported-fuel-types)
`vehicleTypes`
*array*
Optional section. List of vehicle types supported by the petrol station.
vehicleTypes array
Available vehicle types: `Car` , `Truck`
poi object
Field Description
`name`
*string*
Name of the POI.
`phone`
*string*
Telephone number.
`brands`
*array*
The list of POI brands.
[brands](#brands-array) array
`url`
*string*
Website URL.
`categories`
*array*
**Deprecated**
The list of POI categories. [Supported Category Codes](https://docs.tomtom.com/search-api/documentation/product-information/supported-category-codes) **Deprecated:** Use `classifications` instead.
  • **As of May 1, 2018**
    • The response `categories` field has been deprecated.
    • It will be withdrawn following a 12 month deprecation period.
    • The planned withdrawal date is **May 1, 2019**.
`categorySet`
*array*
The list of the most specific POI categories.
[categorySet](#categoryset-array) array
`openingHours`
*object*
List of opening hours for a POI (Points of Interest).
[openingHours](#openinghours-object) object
`classifications`
*array*
The list of POI category classifications.
[classifications](#classifications-array) array
`timeZone`
*object*
Time zone information for the POI.
[timeZone](#timezone-object) object
categorySet array
Field Description
`id`
*number*
Category id. Full list of available categories is available under the [POI Categories](https://docs.tomtom.com/search-api/documentation/poi-categories-service/poi-categories) endpoint.
brands array
Field Description
`name`
*string*
Brand name.
classifications array
Field Description
`code`
*string*
Fixed top level category code. [Supported Category Codes](https://docs.tomtom.com/search-api/documentation/product-information/supported-category-codes)
`names`
*array*
List of category names with locale code information. Currently only the `en-US` locale is returned.
[names](#names-array) array
relatedPois object
Field Description
`relationType`
*string*
Relation type:
  • `child`
  • `parent`
`id`
*string*
Pass this as `entityId` to the [Place by ID](https://docs.tomtom.com/search-api/documentation/place-by-id-service/place-by-id) service to fetch additional data for the Point Of Interest.
address object
Field Description
`streetNumber`
*string*
The building number on the street.
`streetName`
*string*
The street name.
`municipalitySubdivision`
*string*
Sub City
`municipalitySecondarySubdivision`
*string*
Sub Sub City
`neighbourhood`
*string*
Neighbourhood
`municipality`
*string*
City / Town
`countrySecondarySubdivision`
*string*
County
`countryTertiarySubdivision`
*string*
Named Area
`countrySubdivision`
*string*
State or Province
`postalCode`
*string*
Postal Code / Zip Code
`extendedPostalCode`
*string*
Extended postal code (availability dependent on region)
`countryCode`
*string*
Country (Note: This is a two-letter code, not a country name.)
`country`
*string*
Country name
`countryCodeISO3`
*string*
ISO alpha-3 country code
`freeformAddress`
*string*
An address line formatted according to the formatting rules of the result's country of origin. In the case of countries, its full country name.
`countrySubdivisionName`
*string*
The full name of the first level of a country's administrative hierarchy. This field appears only in case `countrySubdivision` is presented in an abbreviated form. Supported only for USA, Canada, and Great Britain.
`localName`
*string*
An address component which represents the name of a geographic area or locality that groups a number of addressable objects for addressing purposes, without being an administrative unit.
mapcodes object
Field Description
`type`
*string*
Type of mapcode.
`Local`
The shortest possible (and easiest to remember) mapcode. Local mapcodes are especially useful when the user knows what territory the mapcode is in (for example, when an application is designed to be used inside just one European country or US state). Note that the code element of a Local mapcode is ambiguous when used without the territory element. For example, the "4J.P2" mapcode can mean the Eiffel Tower location ( `48.858380, 2.294440` ) (with the territory set to `FRA` ), but also some place in Amsterdam-Noord, Netherlands ( `52.382184, 4.911021` ) (with the territory set to `NLD` ).
`International`
This mapcode is unambiguous. It is also the longest.
`Alternative`
Alternatives to Local mapcodes. Each Alternative mapcode points to slightly different coordinates due to the way mapcodes are computed (see the [mapcode documentation](http://www.mapcode.com/documentation) ). For example, the position from a response can be encoded as "5DM.WC" ( `51.759244, 19.448316` ) and the "VHJ.036" ( `51.759245, 19.448264` ), which are close to each other, but not exactly the same place.
`fullMapcode`
*string*
The full form of a mapcode ( `territory` + `code` ). It is always unambiguous. The `territory` element is always in the Latin alphabet. In an `International` mapcode, the `territory` part is empty.
`territory`
*string*
The `territory` element of the mapcode. The `territory` element is always in the Latin alphabet. Usually, the `territory` is the [ISO 3166-1 alpha 3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) abbreviation for the country name. However in these eight very large countries:
  • USA
  • Canada
  • Mexico
  • Brazil
  • India
  • Russia
  • China
an address has little meaning unless the user also knows what state it's in (just as, elsewhere, an address has little meaning if the user doesn't know what country it's in). More information about `territory` codes is available at [Territories for mapcodes](http://www.mapcode.com/isos.html). This field is not returned for an `International` mapcode.
`code`
*string*
The mapcode *without* the `territory` element. It consists of two groups of letters and digits separated by a dot. The `code` is using the same language and alphabet as the response. The `language` parameter may be used to modify the language and alphabet of both the response and the `code` (for example: Cyrillic for the `language` 'ru-RU'). This field is not returned for the `International` mapcodes. Use `fullMapcode` instead.
viewport object
Field Description
`topLeftPoint`
*object*
Top-left corner of the rectangle.
[LatLon](#latlon)
`btmRightPoint`
*object*
Bottom-right corner of the rectangle.
[LatLon](#latlon)
entryPoints array
Field Description
`type`
*string*
The main entry point. One of:
  • `main`
  • `minor`
`functions`
*array*
If present, represents the type of access for the POI.
**Example:** `FrontDoor`
`position`
*object*
Position of the entry point.
[LatLon](#latlon)
chargingPark object
Field Description
`connectors`
*array*
A list of connectors available in the Points Of Interest of an Electric Vehicle Station type.
[connectors](#connectors-array) array
connectors array
Field Description
`connectorType`
*string*
Type of the connector available in Electric Vehicle Station. See the list of [Supported Connector Types](https://docs.tomtom.com/search-api/documentation/product-information/supported-connector-types).
`ratedPowerKW`
*double*
Rated power of the connector in kilowatts (kW).
`currentA`
*integer*
Current value of the connector in amperes (A).
`currentType`
*string*
Current type of the connector.
`voltageV`
*integer*
Voltage of the connector in Volts (V).
**vehicleConstraint object**
**Field** **Description**
`brands`
*array*
The list of vehicle brands for which access to a POI is limited.
[brands](#brands-array) array
dataSources object
Field Description
`chargingAvailability`
*object*
Information about the charging stations availability.
[chargingAvailability](#chargingavailability-object) object
`parkingAvailability`
*object*
Information about the parking site availability.
[parkingAvailability](#parkingavailability-object) object
`fuelPrice`
*object*
Information about the fuel station prices.
[fuelPrice](#fuelprice-object) object
`geometry`
*object*
Information about the geometric shape of the result.
[geometry](#geometry-object) object
chargingAvailability object
Field Description
`id`
*string*
Pass this as `chargingAvailability` to the [EV Charging Stations Availability](https://docs.tomtom.com/ev-charging-stations-availability-api/documentation/ev-charging-stations-availability-api/ev-charging-stations-availability) service to fetch charging availability information for this result.
parkingAvailability object
Field Description
`id`
*string*
Pass this as `parkingAvailability` to the [Parking Availability](https://docs.tomtom.com/parking-api/documentation/parking-availability/parking-availability-api/parking-availability) service to fetch parking availability information for this result.
fuelPrice object
Field Description
`id`
*string*
Pass this as `fuelPrice` to the [Fuel Prices](https://docs.tomtom.com/fuel-prices-api/documentation/fuel-prices-api/fuel-price) service to fetch fuel price information for this result.
geometry object
Field Description
`id`
*string*
Pass this as `geometryId` to the [Additional Data](https://docs.tomtom.com/search-api/documentation/additional-data-service/additional-data) service to fetch geometry information for this result.
`sourceName`
*string*
Name of an additional data provider.
LatLon
Field Description
`lat`
*float*
Latitude. min/max: `-90` to `+90`
**Reference:** [Latitude, Longitude, and Coordinate System Grids](https://gisgeography.com/latitude-longitude-coordinates/)
`lon`
*float*
Longitude. min/max: `-180` to `+180`
**Reference:** [Latitude, Longitude, and Coordinate System Grids](https://gisgeography.com/latitude-longitude-coordinates/)
openingHours object
Field Description
`mode`
*string*
Mode used in the request.
`timeRange`
*array*
List of time ranges for the next 7 days.
[timeRanges](#timeranges-array) array
timeRanges array
Field Description
`startTime`
*object*
The point in the next 7 days range when a given POI is being opened (or the beginning of the range if it was opened before the range), inclusive.
[startTime](#starttime-object) object
`endTime`
*object*
The point in the next 7 days range when a given POI is being opened (or the beginning of the range if it was opened before the range), exclusive.
[endTime](#starttime-object) object
startTime object, endTime object
Field Description
`date`
*string*
Represents current day in calendar year in POI time zone.
`hour`
*integer*
Hours are in the 24 hour format in the local time of a POI; possible values are `0` - `23`.
`minute`
*integer*
Minutes are in the local time of a POI; possible values are `0` - `59`.
timeZone object
Field Description
`ianaId`
*string*
ID from the [IANA Time Zone Database](https://www.iana.org/time-zones).
### Response codes The following table contains response codes signifying successful and failed requests to an API server.
Code Meaning & possible causes
`200` **OK** : The search successfully returned zero or more results.
`400` **Bad Request** : One or more parameters were incorrectly specified.
`403` **Forbidden** : Possible causes include:
  • Service requires SSL
  • Not authorized
  • Rate or volume limit exceeded
  • Unknown referer
`405` **Method Not Allowed** : The HTTP method ( `GET` , `POST` , etc.) is not supported for this request.
`404/596` **Not Found** : The HTTP request method ( `GET` , `POST` , etc.) or path is incorrect.
`429` **Too Many Requests** : The API Key is over QPS (Queries per second).
`5xx` **Server Error** : The service was unable to process your request. Contact support to resolve the issue.
### Response headers The following table contains response headers sent back from an API server.
Header Description
[Access-Control-Allow-Origin](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin) Ensures that clients implementing the CORS security model are able to access the response from this service.
**Value:** An asterisk `*` that signifies access to the TomTom API using the Access-Control-Allow-Origin (ACAO) header in its response indicating which origin sites are allowed.
[Content-Type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) Indicates the format of the response, as chosen by the client.
**Format:** `type/subtype; charset=utf-8`
**Value:** `type/subtype` is one of:
  • `application/json`
  • `text/javascript`
  • `text/xml`
[Content-Encoding](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding) If requested by the client, the Search service applies gzip compression to the responses with the Accept-Encoding header.
**Value:** `gzip`
Tracking-ID An identifier for the request. If the [Tracking-ID](#trackingid-request) header was specified, it is replicated in the response. Otherwise, it is generated automatically by the service. It is only meant to be used for support and does not involve tracking of you or your users in any form.
**Value:** An `identifier` for the request.
### Error response The error response content type depends on the `ext` parameter. ```json [title=Error response example - JSON] { "errorText": "Error parsing 'language': Language tag 'en-ES' not supported", "detailedError": { "code": "BadRequest", "message": "Error parsing 'language': Language tag 'en-ES' not supported", "target": "language" }, "httpStatusCode": "400" } ``` ```xml [title=Error response example - XML] Error parsing 'language': Language tag 'en-ES' not supported BadRequest Error parsing 'language': Language tag 'en-ES' not supported language 400 ``` ### Error response fields
Primary fields Description
`errorText`
*string*
A human-readable description of the error.
`detailedError`
*object*
Detailed information about the error.
[detailedError](#detailederror-object) object
`httpStatusCode`
*integer*
[HTTP response codes](#response-codes) signifying failed requests to an API server.
detailedError object
Field Description
`code`
*string*
One of a server-defined set of error codes.
`message`
*string*
A human-readable description of the error code. It is intended as an aid to developers and is not suitable for exposure to end users.
`target`
*string*
Optional. Target of the particular error.
**Value:** The name of the request parameter causing the error.