Category Search
Service version: 2
Last edit: 2020.08.10
On this page
Purpose
If your search use case only requires POI (Points of Interest) results filtered by category, you may use the Category Search endpoint. This endpoint will only return POI results which are categorized as specified.
To view the list of available categories, see the following section. Click "...Show more" to expand/collapse the list and view its content.
List of available categories (note that this category list is subject to change with a new data release):
"(sub) urban", "access gateway", "administrative area", "administrative
division", "adventure sports venue", "adventure vehicle", "advertising/marketing",
"afghan", "african", "agricultural school", "agricultural supplies",
"agricultural technology", "agriculture", "airfield", "airline", "airline
access", "airport", "algerian", "ambulance unit", "american", "amphitheater",
"amusement arcade", "amusement park", "amusement place", "anabranch",
"animal services", "animal shelter", "antique/art", "apartment",
...Show more
Run this endpoint
You can easily run this and other endpoints.
- Go to the TomTom API Explorer page.
-
Click an endpoint.
- Click Try it out.
- Enter/select all required parameter values and any optional parameter values.
- At the bottom of the form, click Execute.
- Review the Response.
Request data
HTTPS Method: GET
URL format
For ease of viewing and identification:
- Constants and parameters enclosed in angle brackets (< >) must be replaced with their values.
- See the following Request parameters section with the Required and Optional parameters tables for these values.
https://<baseURL>/search/<versionNumber>/categorySearch/<query>.<ext>?key=<Your_API_Key>[&typeahead=<typeahead>][&limit=<limit>][&ofs=<ofs>][&lat=<lat>][&lon=<lon>][&countrySet=<countrySet>][&radius=<radius>][&topLeft=<topLeft>][&btmRight=<btmRight>][&language=<language>][&extendedPostalCodesFor=<extendedPostalCodesFor>][&categorySet=<categorySet>][&brandSet=<brandSet>][&connectorSet=<connectorSet>][&fuelSet=<fuelSet>][&view=<view>][&openingHours=<openingHours>][&timeZone=<timeZone>][&mapcodes=<mapcodes>][&relatedPois=<relatedPois>][&minPowerKW=<minPowerKW>][&maxPowerKW=<maxPowerKW>]
curl command format
curl 'https://<baseURL>/search/<versionNumber>/categorySearch/<query>.<ext>?key=<Your_API_Key>[&typeahead=<typeahead>][&limit=<limit>][&ofs=<ofs>][&lat=<lat>][&lon=<lon>][&countrySet=<countrySet>][&radius=<radius>][&topLeft=<topLeft>][&btmRight=<btmRight>][&language=<language>][&extendedPostalCodesFor=<extendedPostalCodesFor>][&categorySet=<categorySet>][&brandSet=<brandSet>][&connectorSet=<connectorSet>][&fuelSet=<fuelSet>][&view=<view>][&openingHours=<openingHours>][&timeZone=<timeZone>][&mapcodes=<mapcodes>][&relatedPois=<relatedPois>][&minPowerKW=<minPowerKW>][&maxPowerKW=<maxPowerKW>]'
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, which are highlighted with [square brackets], 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 | |
---|---|
Parameter | Description |
baseURL string |
The base URL for calling the API. Value: api.tomtom.com
|
versionNumber string |
The service version. Value: The current value is 2 .
|
query string |
Query string. Must be properly URL encoded. Value: A properly URL encoded query string. |
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 .
|
Optional headers | |
Header | Description |
[Accept-Encoding] string |
Enables response compression. Value: gzip |
Tracking-ID string |
Specifies an identifier for the Request.
An identifier for the Request.
|
Optional parameters | |
Parameter | Description |
[typeahead] boolean |
If the "typeahead" flag is set, the query will be interpreted as a partial input and the search will enter predictive mode. Default value: false
|
[limit] integer |
Maximum number of responses that will be returned. Default value: 10 Maximum value: 100
|
[ofs] integer |
Starting offset of the returned results within the full result set. Default value: 0 Maximum value: 1900
|
[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 |
[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 |
[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).
FR ,ES or FRA ,ESP , etc.Visit the Market Coverage Search 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 [topLeft] parameter should always go along with the [btmRight] parameter as they both define the bounding box.Value: A comma-separated string composed by lat,lon.
|
[btmRight] string |
Bottom-right 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.
|
[language] string |
Language in which search results should be returned.
|
[extendedPostalCodesFor] string |
Indexes for which extended postal codes should be included in the results. Available indexes are:
Usage examples:
extendedPostalCode property of an address. Availability is region-dependent.Values: POI or None
|
[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 endpoint. Value: A comma-separated list of category identifiers (in any order).
|
[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).
|
[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: List of supported connector types Value: A comma-separated list of connector types (in any order).
|
[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:
[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:
[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.
If fuelSet is specified, the query can remain empty. Only POIs with a proper fuel type will be returned. Value: A comma-separated list of fuel type identifiers (in any order).
|
[view] string |
Geopolitical View.
|
[openingHours] string |
List of opening hours for a POI (Points of Interest). Values: nextSevenDays
|
[mapcodes] string |
Enables the return of a comma-separated mapcodes list. Can also filter the Response to only show selected mapcode types. See Mapcodes in the response. Values: One or more of:
Usage examples:
|
[timeZone] string |
Used to indicate the mode in which the timeZone object should be returned.Values: iana
|
[relatedPois] string |
An optional parameter that provides the possibility to return related Points Of Interest. Default value: off Values: off, child, parent, all
|
Response data
Response body
-
For illustrative purposes the example below 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 field documentation for more information.
- When requesting JSON output the Response has the following structure:
-
{ "summary": { "query": "pizza", "queryType": "NON_NEAR", "queryTime": 95, "numResults": 10, "offset": 0, "totalResults": 247458, "fuzzyLevel": 1, "geoBias": { "lat": 36.98844, "lon": -121.97483 } }, "results": [] }
- Each element of the
results []
array is in the following format: -
{ "type": "POI", "id": "g6JpZK84NDAwNjEwMDE4NjUxNDKhY6NVU0GhdqdVbmlmaWVk", "score": 5, "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" }, "geometry": { "id": "00004e4c-3100-3c00-0000-0000685e23c7" }, "poiDetails": [ { "id": "45d78933f964a520e1421fe3", "sourceName": "Foursquare" } ] } }
Response fields
The following 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{} object
|
results[] array |
Result list, sorted in descending order by score.results[] 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
|
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{} object
|
relatedPois object |
List of related Points Of Interest.relatedPois{} object
|
address object |
Structured address for the Result.address{} object
|
position object |
Position of the Result:LatLon
|
mapcodes array |
List of mapcode{} objectsmapcodes{} object
|
viewport object |
A viewport which can be used to display the result on a map.viewport{} object
|
entrypoints array |
List of entry points of the POI.entryPoints[] array
|
chargingPark object |
A list of chargingPark{} objects. Present only when the Points of Interest are of the Electric Vehicle Station type.chargingPark{} object
|
dataSources object |
Optional section. Reference ids for use with the Additional Data service. dataSources{} object
|
poi{} object |
|
Field | Description |
name string |
Name of the POI. |
phone string |
Telephone number. |
brands array |
The list of POI brands.brands[] array
|
url string |
Website URL. |
categories array Deprecated |
The list of POI categories. Category Codes
|
categorySet array |
The list of the most specific POI categories.categorySet[] array
|
openingHours object |
List of opening hours for a POI (Points of Interest).openingHours{} object
|
classifications array |
The list of POI category classifications.classifications[] array
|
timeZone object |
Time zone information for the POI.timeZone{} object
|
categorySet[] array |
|
Field | Description |
id number |
Category id. Full list of available categories is available under POI Categories endpoint. |
brands[] array |
|
Field | Description |
name string |
Brand name. |
classifications[] array |
|
Field | Description |
code string |
Fixed top level category code. Category Code |
names array |
List of category names with locale code information. Currently only "en-US" locale is returned. names[] array
|
names[] array |
|
Field | Description |
nameLocale string |
Locale code of this category name. |
name string |
Category name in given locale. |
relatedPois{} object |
|
Field | Description |
relationType
string
|
Relation type:
|
id
string
|
Pass this as entityId to the 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 / Super City |
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:
|
countrySubdivisionName string |
The full name of the first level of a country's administrative hierarchy.
|
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:
|
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 abbreviation for the country name.
However in these eight very large countries:
territory codes is available at Territories for mapcodes.
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
|
btmRightPoint object |
Bottom-right corner of the rectangle:LatLon
|
entryPoints[] array |
|
Field | Description |
type string |
The main entry point. One of:
|
functions array |
If present, represents the type of access for the POI. Example: FrontDoor
|
position object |
Position of the entry point:LatLon
|
chargingPark{} object |
|
Field | Description |
connectors array |
A list of connectors available in the Points Of Interest of an Electric Vehicle Station type.connectors[] array
|
connectors[] array |
|
Field | Description |
connectorType string |
Type of the connector available in Electric Vehicle Station. See: List of 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). |
dataSources{} object |
|
Field | Description |
chargingAvailability object |
Information about the charging stations availability.chargingAvailability{} object
|
geometry object |
Information about the geometric shape of the result.geometry{} object
|
poiDetails array |
Additional data about the POI.poiDetails[] array
|
chargingAvailability{} object |
|
Field | Description |
id string |
Pass this as chargingAvailability to the EV Charging Stations Availability service to fetch charging availability information for this result. |
geometry{} object |
|
Field | Description |
id string |
Pass this as geometryId to the Additional Data service to fetch geometry information for this result.
|
poiDetails[] array |
|
Field | Description |
id string |
Pass this as id to the Points of Interest Details service to fetch additional data for the POI.
|
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 |
lon float |
Longitude. min/max: -180 to +180 Reference: Latitude, Longitude and Coordinate System Grids |
openingHours{} object |
|
Field | Description |
mode string |
Mode used in the Request. |
timeRanges array |
List of time ranges for the next 7 days.timeRanges[] 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{} 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{} 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. |
HTTP Response codes
The following data 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:
|
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 data table contains response headers sent back from an API server.
Header Description 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
Indicates the format of the response, as chosen by the client.
Format:type/subtype; charset=utf-8
Values: type/subtype is one of:application/json
text/javascript
text/xml
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 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.
An identifier for the Request.
Error Response
The error Response content type depends on the ext
parameter.
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"
}
Error Response example (XML)
<?xml version="1.0" encoding="UTF-8"?>
<response>
<errorText>Error parsing 'language': Language tag 'en-ES' not supported</errorText>
<detailedError>
<code>BadRequest</code>
<message>Error parsing 'language': Language tag 'en-ES' not supported</message>
<target>language</target>
</detailedError>
<httpStatusCode>400</httpStatusCode>
</response>
Error Response fields
Primary fields | |
---|---|
Field | Description |
errorText string |
A human-readable description of the error. |
detailedError object |
Detailed information about the error.detailedError{} object
|
httpStatusCode integer |
HTTP 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. Values:
|