POI Categories

Service version: 2
Last edit: 2022.12.13

Purpose

The POI Categories service endpoint provides a full list of POI categories and subcategories together with their translations and synonyms.

Run this endpoint

You can easily run this and other endpoints. Go to the TomTom 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 section with the required and optional parameters tables for their values. The generic request format is as follows.
get
URL request format
https://{baseURL}/search/{versionNumber}/poiCategories.{ext}?key={Your_API_Key}&language={one_of_the_supported_languages}
get
URL request example
https://api.tomtom.com/search/2/poiCategories.json?key={Your_API_Key}
get
curl command request example
curl 'https://api.tomtom.com/search/2/poiCategories.json?key={Your_API_Key}'

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.
Required parametersDescription

baseURL
string

Base URL for calling the API.
Values:

versionNumber
string

Service version.
Value: The current value is 2.

poiCategories
string

Endpoint name.
Value: poiCategories

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 parametersDescription

language
string

Language in which the category tree should be returned. When a category in a requested language is not available, the default language is used (English).
Value: One of the TomTom IETF Supported Language Tags except NGT and NGT-Latn.

Request headers

Optional headerDescription

Accept-Encoding

Enables response compression.
Value: gzip

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 fields section for more information. When requesting JSON output format in the request URL ext parameter, the response has the following structure.

1{
2 "poiCategories": [
3 {
4 "id": 7320,
5 "name": "Sports Center",
6 "childCategoryIds": [
7 7320002,
8 7320003,
9 7320004,
10 7320006,
11 7320005
12 ],
13 "synonyms": [
14 "Fitness Center",
15 "Fitness Centre",
16 "Fitness Club",
17 "Gym",
18 "Gymnasium",
19 "Health Club",
20 "Indoor Sports",
21 "Indoors Sports",
22 "Sports Centre",
23 "Wellness Club"
24 ]
25 },
26 {
27 "id": 7374,
28 "name": "Stadium",
29 "childCategoryIds": [
30 7374002,
31 7374009,
32 7374012,
33 7374003,
34 7374010,
35 7374005,
36 7374008,
37 7374011,
38 7374006,
39 7374014,
40 7374013,
41 7374007,
42 7374004
43 ],
44 "synonyms": [
45 "Arena",
46 "Gymnasium",
47 "Indoor Arena",
48 "Sports Field",
49 "Sports Ground",
50 "Sports Stadium",
51 "Sportsfield",
52 "Sportsground",
53 "Velodrome"
54 ]
55 },
56 . . .
57 ]
58}

When requesting XML output format in the request URL ext parameter, the response has the following structure.

1<?xml version='1.0' encoding='UTF-8'?>
2<response>
3 <poiCategories>
4 <poiCategory>
5 <id>7320</id>
6 <name>Sports Center</name>
7 <childCategoryIds>
8 <childCategoryId>7320002</childCategoryId>
9 <childCategoryId>7320003</childCategoryId>
10 <childCategoryId>7320005</childCategoryId>
11 </childCategoryIds>
12 <synonyms>
13 <synonym>Gym</synonym>
14 <synonym>Health Club</synonym>
15 <synonym>Indoors Sports</synonym>
16 <synonym>Sports Centre</synonym>
17 <synonym>Wellness Club</synonym>
18 </synonyms>
19 </poiCategory>
20 <poiCategory>
21 <id>7374</id>
22 <name>Stadium</name>
23 <childCategoryIds>
24 <childCategoryId>7374002</childCategoryId>
25 <childCategoryId>7374009</childCategoryId>
26 <childCategoryId>7374012</childCategoryId>
27 <childCategoryId>7374003</childCategoryId>
28 <childCategoryId>7374010</childCategoryId>
29 <childCategoryId>7374005</childCategoryId>
30 <childCategoryId>7374008</childCategoryId>
31 <childCategoryId>7374011</childCategoryId>
32 <childCategoryId>7374006</childCategoryId>
33 <childCategoryId>7374014</childCategoryId>
34 <childCategoryId>7374013</childCategoryId>
35 <childCategoryId>7374007</childCategoryId>
36 <childCategoryId>7374004</childCategoryId>
37 </childCategoryIds>
38 <synonyms>
39 <synonym>Arena</synonym>
40 <synonym>Gymnasium</synonym>
41 <synonym>Indoor Arena</synonym>
42 <synonym>Sports Field</synonym>
43 <synonym>Sports Ground</synonym>
44 <synonym>Sports Stadium</synonym>
45 <synonym>Sportsfield</synonym>
46 <synonym>Sportsground</synonym>
47 <synonym>Velodrome</synonym>
48 </synonyms>
49 </poiCategory>
50 ...
51 </poiCategories>
52</response>

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.

poiCategories array
FieldDescription

poiCategory
object

Category Tree result list.
poiCategory object
FieldDescription

id
long

Unique ID for the category.

name
string

Name of the category.

childCategoryIds
array

List of subcategories ids.

synonyms
array

List of alternative names of the category.

Response codes

The following table contains response codes signifying successful and failed requests to an API server.

CodeMeaning & possible causes

200

OK : The search successfully returned a result.

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 request method GET is not supported for this request.

404/596

Not Found : The HTTP request method GET 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.

HeaderDescription

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
Value: type/subtype is one of: application/json , application/javascript , or application/xml

Content-Encoding

If requested by the client, the Search service applies gzip compression to the responses with the Accept-Encoding header.
Value: gzip