In many cases, the complete Search service might be too much. For instance, if you are only interested in traditional Geocoding, Search can also be exclusively accessed for address look-up. The Geocoding is performed by hitting the Geocode endpoint with just the address or partial address in question. The Geocoding index will be queried for everything above the street level data.
No POIs (Points of Interest) will be returned. Note that the geocoder
is very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses, streets, or intersections as well as higher-level geographies such as city centers, counties, states, etc.
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:
The following table describes the parameters that can be used in a request.
Required parameters
Description
baseURL
string
Base URL for calling the API.
Values:
api.tomtom.com
kr-api.tomtom.com
(see the Region-specific content page)
versionNumber
string
Service version number.
Value: The current value is 2
.
query
string
Query string. Must be properly URL encoded.
Value: A properly URL encoded query string.
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
.
storeResult
boolean
Deprecated
If the storeResult
flag is set, the query will be interpreted as a stored geocode, and will be billed according to the terms of use.
Default value: false
.
December 1, 2017
- The
storeResult
parameter has been deprecated and will be withdrawn following a 12 month deprecation period.- The planned withdrawal date is December 1, 2018.
- Following withdrawal, API requests that include the
storeResult
parameter will receive a HTTP 400 error in the response.
typeahead
boolean
Deprecated
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
May 13, 2023
- The
typeahead
parameter has been deprecated and will be withdrawn following a 12 month deprecation period.- The planned withdrawal date is May 13, 2024.
- Following withdrawal, API requests that include the
typeahead
parameter will receive an HTTP 400 error in the response.
limit
integer
The maximum number of responses that will be returned.
Default value: 10
Maximum value: 100
ofs
integer
The starting offset of the returned results within the full result set. The total number of results can be no more than 2000. If you want to receive all the results, you need to limit the number of results by using, for example the radius parameter.
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 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 bias the search results to that area.
Value: lon
countrySet
string
Comma separated string of country codes in ISO 3166-1 alpha-2 or alpha-3 code formats (e.g., FR,ES
or FRA,ESP
). This will limit the search to the specified countries. The choice of view may restrict which countries are available. Visit the Geocoding API Market Coverage page for a list of all the countries supported by the Geocoding API engine. Values: FR
, ES
or FRA
, ESP
, 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 precenence when both are passed.
Value: A comma-separated string composed by lat
, lon
.
Example: 37.553,-122.453
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 precenence when both are passed.
Value: A comma-separated string composed by lat
, lon
.
Example: 37.553,-122.453
language
string
Language in which search results should be returned. It should be one of the TomTom IETF Supported Language Tags , case insensitive. When data in the specified language is not available for a specific field or the language is not specified, the language best matched with your query is used.
Value: A TomTom IETF Supported Language Tag.
extendedPostalCodesFor
string
Indexes for which extended postal codes should be included in the results. Available values are described in Additional Information indexes abbreviation values section. The value should be a comma-separated list of index types (in any order) or "None" for no indexes. By default, extended postal codes are included for all indexes except Geo. Extended postal code lists for geographies can be quite long, so they have to be explicitly requested when needed. Extended postal code is returned as the extendedPostalCode
property of an address. Availability is region-dependent.
Value: A comma-separated list of index types.
Usage examples:
extendedPostalCodesFor=POI
extendedPostalCodesFor=PAD,Addr,POI
extendedPostalCodesFor=None
view
Geopolitical View. The context used to resolve the handling of disputed territories. Views include Unified
, along with AR
IL
, IN
, MA
, PK
, RU
, TR
, CN
, and TW
which are respectively tailored for Argentina, Israel, India, Morocco, Pakistan, Russia, Turkey, China, and Taiwan.
Default values:
AR
, other available views: Unified
, IL
, IN
, MA
, PK
, RU
, TR
, CN
, TW
IN
, other available views: -MA
, other available views: Unified
, AR
, IL
, IN
, PK
, RU
, TR
, CN
, TW
PK
, other available views: Unified
, AR
, IL
, IN
, MA
, RU
, TR
, CN
, TW
RU
, other available views: Unified
, AR
, IL
, IN
, MA
, PK
, TR
, CN
, TW
TR
, other available views: Unified
, AR
, IL
, IN
, MA
, PK
, RU
, CN
, TW
CN
, other available views: Unified
, AR
, IL
, IN
, MA
, PK
, RU
, TR
, TW
TW
, other available views: Unified
, AR
, IL
, IN
, MA
, PK
, RU
, TR
, CN
Unified
, other available views: AR
, IL
, IN
, MA
, PK
, RU
, TR
, CN
, TW
mapcodes
string
Enables the return of a comma-separted mapcodes list. It can also filter the response to only show selected mapcode types. See mapcodes in the response. 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.
Values: One or more of:
Local
International
Alternative
Usage examples:
mapcodes=Local
(returns only the local mapcode for a location)mapcodes=Local,Alternative
(returns both, local and alternative, mapcodes for a location)mapcodes=Local,Alternative,International
(returns all possible mapcodes for a location)entityTypeSet
string
A comma-separated list of entity types which can be used to restrict the result to the Geography result of a specific entity type. If entityTypeSet
is specified, only a Geography result with a proper entity type will be returned.
Value: A comma-separated list of of entity types. Item order in the list does not matter. Values are case sensitive.
Available values:
Country
CountrySubdivision
CountrySecondarySubdivision
CountryTertiarySubdivision
Municipality
MunicipalitySubdivision
MunicipalitySecondarySubdivision
Neighbourhood
PostalCodeArea
Usage examples:
entityTypeSet=Municipality
: Only returns results with a Municipality
entity type.entityTypeSet=Municipality,MunicipalitySubdivision
: Returns results with a Municipality
or MunicipalitySubdivision
entity type.Optional headers
Description
Enables response compression.
Value: gzip
Tracking-ID
Specifies an identifier for the request. It can be used to trace a call. The value must match the regular expression '^[a-zA-Z0-9-]{1,100}$'
. An example of the format that matches this regular expression is UUID: (e.g., 9ac68072-c7a4-11e8-a8d5-f2801f1b9fd1
). For details check RFC 4122. If specified, it is replicated in the Tracking-ID response header. It is only meant to be used for support and does not involve tracking of you or your users in any form.
Value: An identifier
for the request.
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:
Where each element of the results
array is in the following format:
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
Descriptionsummary
object
Summary information about the search that was performed.
summary object
results
array
The result list, sorted in descending order by score.
results array
summary object
Field Descriptionquery
string
The query as interpreted by the search engine.queryType
string
Deprecated
Response type. Can be NEARBY
or NON_NEAR
.
May 13, 2023
- The
queryType
parameter has been deprecated and will be withdrawn following a 12 month deprecation period.- The planned withdrawal date is May 13, 2024.
- Following withdrawal, API requests that include the
queryType
parameter will receive an HTTP 400 error in the response.
queryTime
integer
Time spent on resolving the query.numResults
integer
The number of results in the response.offset
integer
The starting offset of the returned results within the full result set.
totalResults
integer
The total number of results found.fuzzyLevel
integer
The maximum fuzzy level required to provide results.geoBias
object
The position used to bias the results: Latitude, Longitude
results array
Field Descriptiontype
string
Type of result.
Value: One of:
Street
Geography
Point Address
Address Range
Cross Street
id
string
the non-stable unique id for this result.score
double
Deprecated
The score of the result. A larger score means there is a probability that a result meeting the query criteria is higher.
May 13, 2023
- The
score
parameter has been deprecated and will be withdrawn following a 12 month deprecation period.- The planned withdrawal date is May 13, 2024.
- Following withdrawal, API requests that include the
score
parameter will receive an HTTP 400 error in the response.
matchConfidence
object
The confidence of the result's textual match with the query.
matchConfidence object
dist
double
Unit: meters. This is the distance to an object if geobias
was provided.
entityType
string
Optional section. Only present if type == Geography
. One of:
Country
CountrySubdivision
CountrySecondarySubdivision
CountryTertiarySubdivision
Municipality
MunicipalitySubdivision
MunicipalitySecondarySubdivision
Neighbourhood
PostalCodeArea
address
object
The structured address for the result.
address object
position
object
The position of the result: Latitude, Longitude.
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
A list of entry points of the POI (Points of Interest).
entryPoints array
addressRanges
object
The address ranges on a street segment. Available only for results where the result type is equal to Address Range. addressRanges object
dataSources
object
An optional section. These are unique reference ids for use with the Additional Data service.
dataSources object
address object
Field DescriptionstreetNumber
string
The building number on the street.building
string
The building name or code of the address. This can be a descriptive name, an alphanumeric string, or even a single alphabetic character or numerical digit.
streetName
string
The street name.municipalitySubdivision
string
Sub / Super CitymunicipalitySecondarySubdivision
string
Sub Sub Cityneighbourhood
string
Neighbourhoodmunicipality
string
City / TowncountrySecondarySubdivision
string
CountycountryTertiarySubdivision
string
Named AreacountrySubdivision
string
State or ProvincepostalCode
string
Postal Code / Zip CodepostalName
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
A country's code (Note: This is a two-letter code, not a country name.).
country
string
Country namecountryCodeISO3
string
ISO alpha-3 country codefreeformAddress
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 country administrative hierarchy. This field appears only in case countrySubdivision
is presented in an abbreviated form. It is only supported for the 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.
matchConfidence object
Field Descriptionscore
double
Represents the overall textual match score, in the range of [0..1], where 1 means a perfect match and 0 - no match.
Example:
A Point Address result with freeformAddress 9390 Santa Monica Boulevard, Beverly Hills, CA 90210
has:
score: 1
for a query that matches perfectly, like "9390 santa monica boulevard beverly hills california los angeles"
score: 0.88
for a query that matches, despite a spelling error and synonym, like "9390 snta monica avenue beverly hills california los angeles"
score: 0.42
for a query that contains many unmatched terms, like "mr smith apartment 20 ground floor 9390 santa monica boulevard beverly hills california los angeles"
mapcodes object
Field Descriptiontype
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:
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 DescriptiontopLeftPoint
object
Top-left corner of the rectangle:
btmRightPoint
object
Bottom-right corner of the rectangle:
boundingBox object
Field DescriptiontopLeftPoint
object
Top-left position of the bounding box:
btmRightPoint
object
Bottom-right position of the bounding box:
entryPoints array
Field Descriptiontype
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.
addressRanges object
Field DescriptionrangeLeft
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
The beginning point of a street segment: Latitude, Longitude
to
object
The end point of a street segment: Latitude, Longitude
dataSources object
Field Descriptiongeometry
object
Information about the geometric shape of the result. Only present if type == Geography
.
geometry object
geometry
Field Descriptionid
string
Pass this as geometryId
to the Additional Data service to fetch geometry information for this result.
LatLon
Field Descriptionlat
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
Response codesThe following data table contains HTTP 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:
405
Method Not Allowed : The HTTPS method ( GET
, POST
, etc.) is not supported for this request.
404/596
Not Found : The HTTPS request method ( GET
, POST
, etc.) 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.
The following table contains response headers sent back from an API server.
Header
Description
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.
Indicates the format of the response, as chosen by the client.
Format: type/subtype; charset=utf-8
Values: type/subtype
is one of application/json
, text/javascript
, or text/xml
.
If requested by the client, the Search service applies gzip compression to the responses with the Accept-Encoding header.
Value: gzip
Tracking-ID
An identifier for the request. If the Tracking-ID header was specified, it is replicated in the response. Otherwise, it is generated automatically by the service. It is only meant to be used for support and does not involve tracking of you or your users in any form.
Value: An identifier
for the request.
The error response content type depends on the ext
parameter.
Primary fields
Field
DescriptionerrorText
string
A human-readable description of the error.detailedError
object
Detailed information about the error.
detailedError object
httpStatusCode
integer
HTTP response codes signifying failed requests to an API server.
detailedError object
Field Descriptioncode
string
One of a server-defined set of error codes.message
string
A human-readable description of the error code. It is intended as an aid to developers and is not suitable for exposure to end users.
target
string
Optional.
Target of the particular error.
Value: The name of the request parameter causing the error.
Additional information Indexes abbreviation valuesIn some cases, a list of indexes can be passed as a parameter to query, which should be listed with their abbreviations, available values are:
Geo
= Geographies - areas on map which represent administrative divison of a land i.e., country, state, city.PAD
= Point Addresses - points on a map where a specific address with a street name and number can be found in the index, i.e., Soquel Dr 2501.Addr
= Address ranges - for some streets there are address points that are interpolated from the beginning and end of the street, those points are represented as address ranges.Str
= Streets - representation of streets on the map.XStr
= Cross Streets (intersections) - representations of junctions; places where two streets intersect.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4