Skip to content

Location API

The Location API provides a suite of location-based services, including distance calculation between two points, route generation with map URLs, geocoding, and reverse geocoding functionalities.

Base URL

The Location API is currently on version 1.

js
https://api.ttgtoolbox.com/v1/location

Authentication

Authentication is required for all API endpoints using an API Key sent in the request header. See the Authentication page to learn how to set up your keys and authenticate to the API.

Response codes & errors

We use conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc.). Codes in the 5xx range indicate an error with our servers.

CodeTypeDetails
200OKThe request succeeded.
400Bad requestBad request. Additional errors will be provided in the message.
401UnauthorizedThe request was failed, usually due missing or invalid API key.
422Quota reachedThe request was denied due to insufficient API credits. Free plans only.
429Too many requestsThe request was denied due to the number of allowed requests per minute being exceeded.
500Internal server errorThe request could not be completed due to an error on the server side.
503Service unavailableThe server was unavailable.

Tutorials & examples

Tutorials and guides, including downloadable example scripts, are available on the TTG Toolbox website.

A note on credits

All of our APIs use credits for billing and tracking purposes.