Place by ID

Service version: 2
Last edit: 2023.06.27

Purpose

The Place by Id service endpoint provides detailed information about the Place found by its identifier (entityId). Currently, Place by Id supports all types by ids.

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}/place.{ext}?entityId={Poi_id}&key={Your_API_Key}&language={one_of_the_supported_languages}&openingHours={openingHours}&timeZone={timeZone}&mapcodes={mapcodes}&relatedPois={relatedPois}&view={view}
get
https://api.tomtom.com/search/2/place.json?entityId=00004e4c-3100-3c00-0000-0000685e23c7&key={Your_API_Key}
get
curl command request example
curl 'https://api.tomtom.com/search/2/place.json?entityId=00004e4c-3100-3c00-0000-0000685e23c7&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.

place
string

Endpoint name.
Value: place

ext
string

A valid response format.
Values: json , jsonp , js , or xml

entityId
string

A unique POI , Street , Geography , Point Address , Address Range, or Cross Street identifier.
Value: The identifier of a specific POI, Street, Geography, Point Address, Address Range, or Cross Street.

key
string

An API Key valid for the requested service.
Value: Your valid API Key.

Optional parametersDescription

language
string

Language in which details about a specific POI should be returned. When information about a specific POI is not available in the requested language or the language is not specified, the NGT (neutral ground truth) language is used.
Value: One of the TomTom IETF Supported Languages tags except NGT and NGT-Latn.

openingHours
string

List of opening hours for a POI (Points of Interest).
Values: 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

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 example: timeZone=iana

mapcodes
string

Enables the return of a comma-separted mapcodes list. Can also filter the response to only show selected mapcode types. See the mapcodes object in the response.
Values: One or more of: Local , International , and 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 website for more information.
Usage examples:

  • mapcodes=Local : only returns the local mapcode for a location.

  • mapcodes=Local,Alternative : returns both of the local and alternative mapcodes for a location.

  • mapcodes=Local,Alternative,International : returns all possible mapcodes for a location.

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 : only returns Points Of Interest with a child relation.

  • relatedPois=parent : only returns Points Of Interest with a parent relation.

  • relatedPois=all : returns Points Of Interest with all possible relations.

view
string

Geopolitical View. The context used to resolve the handling of disputed territories. Views include Unified , along with AR , IL , IN , MA , PK , RU , TR , and CN which are respectively tailored for Argentina, Israel, India, Morocco, Pakistan, Russia, Turkey, and China.
Default value: Unified

Request headers

Optional headersDescription

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 documentation for more information. When requesting JSON output, the response has the following structure:

Response structure - JSON
1{
2 "summary": {
3 "query": "n/a",
4 "queryType": "NON_NEAR",
5 "queryTime": 24,
6 "numResults": 1,
7 "offset": 0,
8 "totalResults": 1,
9 "fuzzyLevel": 1
10 },
11 "results": []
12}

Each element of the results array is in the following format:

results array elements format - JSON
1{
2 "type": "POI",
3 "id": "g6JpZK84NDAwNjEwMDE4NjUxNDKhY6NVU0GhdqdVbmlmaWVk",
4 "score": 5,
5 "dist": 0,
6 "info": "search:ta:840061001865142-US",
7 "poi": {
8 "name": "Upper Crust Pizza & Pasta",
9 "phone": "+(1)-(831)-4762333",
10 "url": "www.uppercrustsc.com/",
11 "brands": [
12 {
13 "name": "Upper Crust"
14 }
15 ],
16 "categorySet": [
17 {
18 "id": 7315015
19 }
20 ],
21 "categories": ["pizza", "restaurant"],
22 "openingHours": {
23 "mode": "NEXT_SEVEN_DAYS",
24 "timeRanges": [
25 {
26 "startTime": {
27 "date": "2019-02-05",
28 "hour": 7,
29 "minute": 0
30 },
31 "endTime": {
32 "date": "2019-02-05",
33 "hour": 21,
34 "minute": 0
35 }
36 },
37 {
38 "startTime": {
39 "date": "2019-02-06",
40 "hour": 7,
41 "minute": 0
42 },
43 "endTime": {
44 "date": "2019-02-06",
45 "hour": 21,
46 "minute": 0
47 }
48 },
49 {
50 "startTime": {
51 "date": "2019-02-07",
52 "hour": 7,
53 "minute": 0
54 },
55 "endTime": {
56 "date": "2019-02-07",
57 "hour": 21,
58 "minute": 0
59 }
60 },
61 {
62 "startTime": {
63 "date": "2019-02-08",
64 "hour": 7,
65 "minute": 0
66 },
67 "endTime": {
68 "date": "2019-02-08",
69 "hour": 21,
70 "minute": 0
71 }
72 },
73 {
74 "startTime": {
75 "date": "2019-02-09",
76 "hour": 7,
77 "minute": 0
78 },
79 "endTime": {
80 "date": "2019-02-09",
81 "hour": 21,
82 "minute": 0
83 }
84 },
85 {
86 "startTime": {
87 "date": "2019-02-10",
88 "hour": 7,
89 "minute": 0
90 },
91 "endTime": {
92 "date": "2019-02-10",
93 "hour": 12,
94 "minute": 0
95 }
96 },
97 {
98 "startTime": {
99 "date": "2019-02-10",
100 "hour": 14,
101 "minute": 0
102 },
103 "endTime": {
104 "date": "2019-02-10",
105 "hour": 21,
106 "minute": 0
107 }
108 }
109 ]
110 },
111 "classifications": [
112 {
113 "code": "RESTAURANT",
114 "names": [
115 {
116 "nameLocale": "en-US",
117 "name": "pizza"
118 },
119 {
120 "nameLocale": "en-US",
121 "name": "restaurant"
122 }
123 ]
124 }
125 ],
126 "timeZone": {
127 "ianaId": "Europe/Andorra"
128 }
129 },
130 "address": {
131 "streetNumber": "2501",
132 "streetName": "Soquel Dr",
133 "municipalitySubdivision": "Santa Cruz, Live Oak",
134 "municipality": "Santa Cruz, Live Oak",
135 "countrySecondarySubdivision": "Santa Cruz",
136 "countryTertiarySubdivision": "Santa Cruz",
137 "countrySubdivision": "CA",
138 "postalCode": "95065",
139 "extendedPostalCode": "950652023",
140 "countryCode": "US",
141 "country": "United States Of America",
142 "countryCodeISO3": "USA",
143 "freeformAddress": "2501 Soquel Dr, Santa Cruz, CA 95065",
144 "countrySubdivisionName": "California",
145 "localName": "Santa Cruz"
146 },
147 "position": {
148 "lat": 36.98844,
149 "lon": -121.97483
150 },
151 "mapcodes": [
152 {
153 "type": "Local",
154 "fullMapcode": "US-CA FS.WRH3",
155 "territory": "US-CA",
156 "code": "FS.WRH3"
157 },
158 {
159 "type": "International",
160 "fullMapcode": "S4ZW4.990V"
161 },
162 {
163 "type": "Alternative",
164 "fullMapcode": "US-CA 4349.S8W",
165 "territory": "US-CA",
166 "code": "4349.S8W"
167 },
168 {
169 "type": "Alternative",
170 "fullMapcode": "US-CA JJCH.H9DF",
171 "territory": "US-CA",
172 "code": "JJCH.H9DF"
173 },
174 {
175 "type": "Alternative",
176 "fullMapcode": "USA JJCH.H9DF",
177 "territory": "USA",
178 "code": "JJCH.H9DF"
179 }
180 ],
181 "viewport": {
182 "topLeftPoint": {
183 "lat": 36.98934,
184 "lon": -121.97596
185 },
186 "btmRightPoint": {
187 "lat": 36.98754,
188 "lon": -121.9737
189 }
190 },
191 "entryPoints": [
192 {
193 "type": "main",
194 "position": {
195 "lat": 36.98817,
196 "lon": -121.97487
197 }
198 }
199 ],
200 "chargingPark": {
201 "connectors": [
202 {
203 "connectorType": "Tesla",
204 "ratedPowerKW": 25,
205 "voltageV": 400,
206 "currentA": 62,
207 "currentType": "DC"
208 }
209 ]
210 },
211 "dataSources": {
212 "chargingAvailability": {
213 "id": "442009000132285"
214 },
215 "geometry": {
216 "id": "00004e4c-3100-3c00-0000-0000685e23c7"
217 }
218 }
219}

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 the order that they appear in the response.

Primary fields

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

FieldDescription

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.
FieldDescription

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.

results array

FieldDescription

type
string

Type of result. One of: POI , Street , Geography , Point Address , Address Range , Cross Street

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.

entityType
string

Optional section. Only present if type == Geography. One of:

  • Country

  • CountrySubdivision

  • CountrySecondarySubdivision

  • CountryTertiarySubdivision

  • Municipality

  • MunicipalitySubdivision

  • MunicipalitySecondarySubdivision

  • Neighbourhood

  • PostalCodeArea

poi
object

Information about the Points of Interest in the result. Optional section. Only present if type == POI.
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 objects
mapcodes object

viewport
object

A viewport which can be used to display the result on a map.
viewport object

boundingBox
object

Optional section. Only present if type == Geography. A bounding box which can be used to display the result on a map defined by minimum and maximum longitudes and latitudes.
boundingBox object

entrypoints
array

List of entry points of the POI.
entryPoints array

addressRanges
object

Address ranges on a street segment. Available only for results where the result type is equal to "Address Range".
addressRanges object

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

fuelTypes
array

Optional section. List of fuel types served by the petrol station.
fuelTypes array
Fuel Types available

vehicleTypes
array

Optional section. List of vehicle types supported by the petrol station.
vehicleTypes array
Available vehicle types: Car , Truck

poi object

FieldDescription

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.

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.

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

FieldDescription

id
number

Category id. A full list of available categories is available under the POI Categories endpoint.

brands array

FieldDescription

name
string

Brand name.

classifications array

FieldDescription

code
string

Fixed top level category code. Supported Category Codes

names
array

List of category names with locale code information. Currently only the en-US locale is returned.
names array

names array

FieldDescription

nameLocale
string

Locale code of this category name.

name
string

Category name in given locale.

relatedPois object

FieldDescription

relationType
string

Relation type: child parent

id
string

Pass this as entityId to the Place by ID service to fetch additional data for the Point Of Interest.

address object

FieldDescription

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

postalName
string

An address component which represents the name for a postal code that is related to a single administrative area, city, town, or other populated place. Note: This field only appears for geographies having entityType == PostalCodeArea. It is only supported for the USA.

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. For the USA, in the case of geographies with entityType == PostalCodeArea it will contain the postalName field value.

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.

countrySubdivisionCode
string

countrySubdivisionCode prefixed by countryCode ( countryCode-countrySubdivisionCode ) and the hyphen forms the ISO 3166-2 code. It is only present if the returned document has entityType == CountrySubdivision. countrySubdivisionCode examples: TX for Texas, SCT for Scotland, ON for Ontario, ZE for Zeeland and BB for Brandenburg.

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

FieldDescription

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 ). 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 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. 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

FieldDescription

topLeftPoint
object

Top-left corner of the rectangle.
LatLon

btmRightPoint
object

Bottom-right corner of the rectangle.
LatLon

boundingBox object

FieldDescription

topLeftPoint
object

Top-left position of the bounding box.
LatLon

btmRightPoint
object

Bottom-right position of the bounding box.
LatLon

entryPoints array

FieldDescription

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

addressRanges object

FieldDescription

rangeLeft
string

An address range on the left side of a street segment (assuming looking from the "from" end toward the "to" end).

rangeRight
string

An address range on the right side of a street segment (assuming looking from the "from" end toward the "to" end).

from
object

A beginning point of a street segment.
LatLon

to
object

An end point of a street segment.
LatLon

chargingPark object

FieldDescription

connectors
array

A list of connectors available in the Points Of Interest of an Electric Vehicle Station type.
connectors array

connectors array

FieldDescription

connectorType
string

Type of the connector available in Electric Vehicle Station. See: 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

FieldDescription

chargingAvailability
object

Information about the charging stations availability. Only present if type == POI.
chargingAvailability object

parkingAvailability
object

Information about the parking site availability. Only present if type == POI.
parkingAvailability object

fuelPrice
object

Information about the fuel station prices. Only present if type == POI.
fuelPrice object

geometry
object

Information about the geometric shape of the result. Only present if type == Geography or POI.
geometry object

chargingAvailability object

FieldDescription

id
string

Pass this as chargingAvailability to the EV Charging Stations Availability service to fetch charging availability information for this result.

parkingAvailability object

FieldDescription

id
string

Pass this as parkingAvailability to the Parking Availability service to fetch parking availability information for this result.

fuelPrice object

FieldDescription

id
string

Pass this as fuelPrice to the Fuel Prices service to fetch fuel price information for this result.

geometry object

FieldDescription

id
string

Pass this as geometryId to the Additional Data service to fetch geometry information for this result.

sourceName
string

Name of an additional data provider.

LatLon

FieldDescription

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

FieldDescription

mode
string

Mode used in the request.

timeRanges
array

List of time ranges for the next 7 days.
timeRanges array

timeRanges array

FieldDescription

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

FieldDescription

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

FieldDescription

ianaId
string

ID from the IANA Time Zone Database.

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

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 , text/javascript , or 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