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

Along Route Search

The Search Along Route endpoint allows you to perform a fuzzy search for POIs along a specified route. This search is constrained by specifying detour time limiting measure.

To send the route points you will use a POST request which body will contain the route parameter in JSON format. The minimum number of route points is 2. It is possible that original route will be altered, some of its points may be skipped. If the route that passes through the found point is faster than the original one, the detour time value is negative. POST requests require the "Content-Type" header to be set to "application/json".



  "route": {
      "points": [{
        "lat": 37.7524152343544,
        "lat": 37.70660472542312,
        "lat": 37.712059855877314,
        "lat": 37.75350561243041,



POST https://<baseURL>/search/<versionNumber>/searchAlongRoute/<query>[.<ext>]


The table below 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.

Parameter Description Req'd? Type / Values Default value Max value
baseURL Base URL for calling the API.  Yes
versionNumber Service version number. The current value is 2. Yes 2
query Query string. Must be properly URL encoded. Yes String
ext Valid response formats are JSON, JSONP, JS or XML. Yes String
key Your TomTom API Key. Yes String
maxDetourTime Maximum detour time Yes Integer 3600 Seconds
[limit] Maximum number of responses that will be returned. No Integer 10 20



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 response field documentation below for more information.

When requesting JSON output the response has the following structure:

    "summary": {
        "query": "pizza",
        "queryType": "NON_NEAR",
        "queryTime": 137,
        "numResults": 1,
        "offset": 0,
        "totalResults": 1,
        "fuzzyLevel": 1
    "results": []

Each element of the results array is in the format:

    "type": "POI",
    "id": "US/POI/p0/9033556",
    "score": 4.999,
    "dist": 32.32909635789851,
    "info": "search:ta:840061001865142-US",
    "poi": {
        "name": "Upper Crust Pizza & Pasta",
        "phone": "+(1)-(831)-4762333",
        "url": "",
        "categories": [
        "classifications": [
                "code": "RESTAURANT",
                "names": [
                        "nameLocale": "en-US",
                        "name": "pizza"
                        "nameLocale": "en-US",
                        "name": "restaurant"
    "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"
    "position": {
        "lat": 36.98844,
        "lon": -121.97483
    "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
    "detourTime": 113,
    "dataSources": {
        "geometry": {
            "id": "00004e4c-3100-3c00-0000-0000685e23c7"

Response fields

The tables below describe 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.

Field Description Type / Values
summary Summary information about the search that was performed. Summary
results Result list, sorted in ascending order by detour time. Result
query Query as interpreted by the search engine. String
queryType Response type. * see response types below. String
queryTime Time spent on resolving the query. Integer
numResults Number of Results in the response. Integer
offset Starting offset of the returned Results within the full Result set. Integer
totalResults Total number of Results found. Integer
fuzzyLevel Maximum fuzzy level required to provide Results. Integer
type Type of Result. POI
id Non-stable id for this Result. String
score Score of the Result. Larger score means that probability that a Result meets query criteria is higher. Double
dist Unit: meters. Double
info Information about original data source of the Result. String
poi Optional section. Only present if type == POI. Poi
address Structured address for the Result. Address
position Position of the Result. LatLon
viewport A viewport which can be used to display the Result on a map. Viewport
entrypoints List of entry points of the POI. Entrypoint[]
detourTime Detour time in seconds. Integer
dataSources Optional section. Reference ids for use with the Additional Data service. DataSources
name Name of the POI. String
phone Telephone number. String
url Website URL. String
categories The list of POI categories.
DEPRECATED1: Use classifications instead.
classifications The list of POI category classifications. Classification[]
code Fixed top level category code. Category Code
names List of category names with locale code. information. Currently only "en-US" locale is returned. Name[]
nameLocale Locale code of this category name. String
name Category name in given locale. String
streetNumber The building number on the street. String
streetName The street name. String
municipalitySubdivision Sub / Super City. String
municipality City / Town. String
countrySecondarySubdivision County. String
countryTertiarySubdivision Named Area. String
countrySubdivision State or Province. String
postalCode Postal Code / Zip Code. String
extendedPostalCode Extended postal code (availability dependent on region). String
countryCode Country. String
country Country name. String
countryCodeISO3 ISO alpha-3 country code. String
freeformAddress An address line formatted according to formatting rules of Result's country of origin or in case of countries it's full country name. String
countrySubdivisionName 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. String
topLeftPoint Top left corner of the rectangle. LatLon
btmRightPoint Bottom right corner of the rectangle. LatLon
type Main entry point. One of:

  • main
  • minor
position Position of the entry point. LatLon
geometry Information about the geometric shape of the result. Only present if type == Geography or POI. Geometry

Response codes

Code Meaning and 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

Header Description Value
Access-Control-Allow-Origin Ensures that clients that implement the CORS security model are able to access the response from this service. *
Content-Type Indicates the format of the response, as chosen by the client. Format: type/subtype; charset=utf-8 type/subtype is one of:

  • application/json
  • text/javascript
  • text/xml

1May 1, 2018: The categories response field has been deprecated and will be withdrawn following a 12 month deprecation period. The planned withdrawal date is May 1, 2019.