The Google Maps Roads API identifies the roads a vehicle was traveling along and provides additional metadata about those roads, such as speed limits.
Overview
The Roads API allows you to map GPS coordinates to the geometry of the road, and to determine the speed limit along those road segments. The API is available via a simple HTTPS interface, and exposes two services:
- Snap to roads This service returns the best-fit road geometry for a given set of GPS coordinates. This service takes up to 100 GPS points collected along a route, and returns a similar set of data with the points snapped to the most likely roads the vehicle was traveling along. Optionally, you can request that the points be interpolated, resulting in a path that smoothly follows the geometry of the road.
- Speed limits This service returns the posted speed limit for a road segment. The Speed Limit service is only available to Google Maps API for Work customers. If you are an existing customer, you can contact your account manager or file a ticket in the Maps API for Work support portal to enable the Google Maps API for Work.
Watch this video for some examples of the kinds of apps that will find the Roads API useful:
API Key
All Google Maps Roads API applications should use an API key. Including a key in your request:
- Allows you to monitor your application's API usage in the Google Developers Console.
- Enables per-key instead of per-IP-address quota limits.
- Ensures that Google can contact you about your application if necessary.
The Google Maps Roads API uses an API key to identify your application. API keys are managed through the Google APIs console. To create your key:
- Visit the APIs console at Google Developers Console and log in with your Google Account.
- Click the Services link from the left-hand menu in the APIs Console, then activate the Google Maps Roads API service.
- Once the service has been activated, your API key is available from the API Access page, in the Simple API Access section. Google Maps Roads API applications use the Key for server apps.
To specify a key in your request, include it as the value of a key parameter.
Usage Limits
The Google Maps Roads API has the following usage limits in place:
- Users of the free API:
-
- 2500 requests per 24-hour period
- 10 requests per second
- 100 points per request
- Speed limits not included.
- Google Maps API for Work customers:
-
- 100 000 requests per 24-hour period
- 10 requests per second
- 100 points per request
- Speed limits not included.
- Google Maps API for Work customers with an Asset Tracking license:
-
- Unlimited requests per 24-hour period
- 10 requests per second
- 100 points per request
- Access to speed limit data
The Google Maps Roads API enforces usage limits to prevent abuse and/or repurposing of the API. These limits may be changed in the future without notice. Additionally, we enforce a request rate limit to prevent abuse of the service. If you exceed these limits, the Roads API may stop working for you temporarily. If you continue to exceed this limit, your access to the API may be blocked.
Client Library
The Roads API is available as part of the Java Client for Google Maps Services and Python Client for Google Maps Services. Client libraries make developing with the Roads API easier by providing simple, native implementations of common tasks, such as authentication, request throttling and automatic retry.
These community-supported client libraries are open-sourced under the Apache 2.0 License and are available for download, or contributions, on GitHub. The libraries are not covered by the standard Google deprecation policy, or support agreement.