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

Low Bandwidth Search (Deprecated)

 

Service version: 2.0
Last edit: 2019.02.01

Deprecation notice

May 1, 2018:

  • The Low Bandwidth Search endpoint has been deprecated.
  • This endpoint will be withdrawn following a 12 month deprecation period.
  • The planned withdrawal date is May 1, 2019.
  • Following withdrawal, requests to this endpoint will receive an HTTP 404 error in response.

On this page

Purpose

When building apps for mobile conserving bandwidth is extremely important. We have a shortened endpoint with:

  • A more compressed and concise response structure to help save bandwidth.
  • Add some convenience to the client side parsing.

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.

Request data

HTTPS Method: GET

URL format (using "s" search)

For ease of viewing and identification:

  • Required constants and parameters are shown in bold text.
  • Optional parameters are shown in plain text.
https://api.tomtom.com/search/2/s/pizza.json?key=*****&typeahead=true&limit=10&ofs=1000&countrySet=FR&lat=37.337&lon=-121.89 &radius=100&topLeft=37.553%2C-122.453&btmRight=37.4%2C-122.55&language=en-us&idxSet=POI&view=Unified

curl command

curl -X GET "https://api.tomtom.com/search/2/s/pizza.json?key=*****
  &typeahead=true
  &limit=10
  &ofs=1000
  &countrySet=FR
  &lat=37.337
  &lon=-121.89
  &radius=100
  &topLeft=37.553%2C-122.453
  &btmRight=37.4%2C-122.55
  &language=en-us
  &idxSet=POI
  &view=Unified"
-H "accept: */*"

HTTPS Method: GET

URL format (using "cS" category search)

https://api.tomtom.com/search/2/cS/pizza.json?key=*****&typeahead=true&limit=10&ofs=1000&countrySet=FR&lat=37.337&lon=-121.89&radius=100 &topLeft=37.553%2C-122.453&btmRight=37.4%2C-122.55&language=en-us&idxSet=POI&view=Unified
            

curl command

curl -X GET "https://api.tomtom.com/search/2/cS/pizza.json?key=*****
  &typeahead=true
  &limit=10
  &ofs=1000
  &countrySet=FR
  &lat=37.337
  &lon=-121.89
  &radius=100
  &topLeft=37.553%2C-122.453
  &btmRight=37.4%2C-122.55
  &language=en-us
  &idxSet=POI
  &view=Unified
-H "accept: */*"

▲ Return to top

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.
  • A parameter's data type is beneath its name.
  • 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
Base URL for calling the API:
Value: api.tomtom.com
versionNumber
integer
Service version number.
Value: The current value is 2.
query/category
string
Query (s)/Category (cS) string. Must be properly URL encoded.
Value: A properly URL encoded query string.
ext
string
A valid response format.
Value: JSON, JSONP, JS, or XML
key
string
An API Key valid for the requested service.
Value: Your valid API Key.
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
Other value: true
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: lat
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: lon
countrySet
string
Comma separated string of country codes (e.g.: FR, ES)

  • This will limit the search to the specified countries.
  • The choice of view may restrict which countries are available.
  • Incompatible combinations will return error 400.

Value: FR, ES, etc.

radius
integer
If radius and position are set, the results will be constrained to the defined area.
The radius parameter is specified in meters.
Value: A radius.
topLeft
string
Top left position of the bounding box.

  • This is specified as a comma separated string composed by lat., lon. (e.g.: 37.553,-122.453).
  • Important note: Point-Radius parameters and Bounding box parameters are mutually exclusive.
  • Point radius parameters take precendence when both are passed.

Value: A comma separated string composed by lat, lon.

btmRight
String
Bottom right position of the bounding box.

  • This is specified as a comma separated string composed by lat., lon. (e.g.: 37.553,-122.453).
  • Important note: Point-Radius parameters and Bounding box parameters are mutually exclusive.
  • Point radius parameters take precendence when both are passed.

Value: A comma separated string composed by lat, lon.

language
string
Language in which search results should be returned.
Should be one of supported IETF language tags, case insensitive. When data in a specified language is not available for a specific field, default language is used.
Value: One of supported IETF language tags.
idxSet
string
The dxSet parameter allows for fine tuning L2 by specifying which indexes to utilize for the search.

  • It is a comma-separated list of indexes which should be utilized for the search.
  • Item order does not matter.
  • Available values are described in the Additional Information indexes abbreviation values section.

Usage examples:

  • idxSet=POI(search Points Of Interest only)
  • idxSet=PAD,Addr (search addresses only)

Value: A comma-separated list of indexes.

view
string
Geopolitical View.
The context used to resolve handling disputed territories.

  • Views include Unified, along with IN, PK, IL, and MA which are tailored for India, Pakistan, Israel and Morocco, respectively.
  • IN overrides in India

Values: Unified, IN, PK, IL, and MA

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 section for more information.

When requesting JSON output, the Response has the following structure:

{
    "s": 200,
    "sum": {
        "q": "pizza",
        "t": "NON_NEAR"
    },
    "r": []
}

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

{
    "id": "US/POI/p0/9033556",
    "tp": "POI",
    "etp": "",
    "a1": "2501 Soquel Dr",
    "a2": "Santa Cruz, CA 95065",
    "cc": "US",
    "nm": "Upper Crust Pizza & Pasta",
    "ph": "+(1)-(831)-4762333",
    "ul": "www.uppercrustsc.com/",
    "ps": "36.98844 -121.97483",
    "gh": "9q962ms9k2yx",
    "ct": [
        "pizza",
        "restaurant"
    ],
    "cst": [
        {
            "cd": "RESTAURANT",
            "ns": [
                {
                    "nl": "en-US",
                    "na": "pizza"
                },
                {
                    "nl": "en-US",
                    "na": "restaurant"
                }
            ]
        }
    ]
}

▲ Return to top

Response fields

The following tables 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.

Primary fields
Field Description
s
string
Response status code.
sum{}
object
Summary information about the search that was performed.
r[]
array
Result list, sorted in descending order by score.
s
Field Description
s
integer
Response status code. 200 denotes success.
sum{} object
Field Description
q
string
Query as interpreted by the search engine.
t
string
Response type * see response types below.
r[] array
Field Description
id
string
Non-stable id for this result.
tp
string
Type of Result. One of:

  • POI
  • Street
  • Geography
  • Point Address
  • Cross Street
etp
string
Optional section. Only present if type = = Geography. One of:

  • Country
  • CountrySubdivision
  • CountrySecondarySubdivision
  • CountryTertiarySubdivision
  • Municipality
  • MunicipalitySubdivision
  • Neighbourhood
  • PostalCodeArea
a1
string
Address line 1.
a2
string
Address line 2.
cc
string
Country.
nm
string
Name of the POI.
ph
string
Telephone number.
ul
string
Website URL.
ps
string
Position.
gh
string
Geohash.
ct
array
Deprecated
The list of POI categories. Deprecated: Use cst instead.
May 1, 2018:

  • The ct response field has been deprecated.
  • It will be withdrawn following a 12 month deprecation period.
  • The planned withdrawal date is May 1, 2019.
cst
array
The list of POI category classifications.
cst[] array
Field Description
cd
string
Fixed top level category code.
ns
array
List of category names with locale code information. Currently only the en-US locale is returned.
ns array fields
Field Description
nl
string
Locale code of this category name.
na
string
Category name in given locale.

▲ Return to top

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

Header Description
Access-Control-Allow-Origin Ensures that clients that implement the CORS security model are able to access the response from this service.
Value: *
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

▲ Return to top