Sorry, you need to enable JavaScript to visit this website.

Place by ID

 

Service version: 2
Last edit: 2020.08.11

On this page

Purpose

The Place by Id service endpoint provides detailed information about the Place found by its identifier (entityId).

Currently, Place by Id only supports POI (Points of Interest) ids.

▲ Return to top

Run this endpoint

You can easily run this and other endpoints.

  1. Go to the TomTom API Explorer page.
  2. Click an endpoint.
    1. Click Try it out.
    2. Enter/select all required parameter values and any optional parameter values.
    3. At the bottom of the form, click Execute.
  3. Review the Response.

▲ Return to top

Request data

HTTPS Method: GET

URL format

https://<baseURL>/search/<versionNumber>/place.<ext>?entityId=<Poi_id>&key=<Your_API_Key>&language=<one_of_the_supported_languages>

curl command format

curl 'https://<baseURL>/search/<versionNumber>/place.<ext>?entityId=<Poi_id>&key=<Your_API_Key>&language=<one_of_the_supported_languages>'

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.
Required parameters
Parameter Description
baseURL
string
Base URL for calling the API.
Value: api.tomtom.com
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 identifier.
Value: The identifier of a specific POI, e.g., g6Fjo05MRKJpZK81MjgwMDkwMDQyNDY3OTKhdqdVbmlmaWVk./>
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
Optional parameters
[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 default language is used (English).
Value: One of the TomTom supported IETF language tags except NGT and NGT-Latn.

▲ Return to top

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": "n/a",
          "queryType": "NON_NEAR",
          "queryTime": 24,
          "numResults": 1,
          "offset": 0,
          "totalResults": 1,
          "fuzzyLevel": 1
        },
        "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": "NEXT_SEVEN_DAYS",
      "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"
    }
  },
  "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
      }
    }
  ],
  "dataSources": {
    "chargingAvailability": {
      "id": "442009000132285"
    },
    "geometry": {
      "id": "00004e4c-3100-3c00-0000-0000685e23c7"
    },
    "poiDetails": [
      {
        "id": "Rm91cnNxdWFyZTo0YmQzOWE1ZmIyMjFjOWI2ZjYzOWRhZDA=",
        "sourceName": "Foursquare"
      }
    ]
  }
}

▲ Return to top

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 containing the searched POI.
result[] 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.
results[] array
Field Description
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
  • Neighbourhood
  • PostalCodeArea
poi
object
Information about the Points of Interest in the result.
Optional section. Only present if type == POI.
poi{} 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
entrypoints
array
List of entry points of the POI.
entryPoints[] array
addressRanges
object
Available only for results where the result type == "Address Range".
addressRanges{} 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
  • 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[] 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
timeZone{} object
ianaId
string
ID from the IANA Time Zone Database.
names[] array
Field Description
nameLocale
string
Locale code of this category name.
name
string
Category name in given locale.
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:
  • The formatting rules of the result's country of origin.
  • In the case of countries, its full country name.
countrySubdivisionName
string
A full name of a first level of country 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 e.g., 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:
  • The USA
  • Canada
  • Mexico
  • Brazil
  • India
  • Australia
  • 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
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:
  • main
  • minor
functions
array
If present, represents the type of access for the POI.
Example: FrontDoor
position
object
Position of the entry point:
LatLon
dataSources{} object
Field Description
chargingAvailability
object
Information about the charging stations availability. Only present if type == POI.
chargingAvailability{} object
geometry
object
Information about the geometric shape of the result. Only present if type == Geography or POI.
geometry{} object
poiDetails
array
Additional data about the POI. Only present if type == 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.

▲ Return to top

HTTP Response codes

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

Successful and failed Response codes

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.
5xx Server Error: The service was unable to process your Request. Contact support to resolve the issue.

▲ Return to top

Response headers

The following table contains Response headers sent back from an API server.

Response headers
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
Value: 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

▲ Return to Top