The Distance Matrix API uses a pay-as-you-go pricing model. Distance Matrix API requests generate calls to one of two SKUs depending on the type of request: basic or advanced. Along with the overall Google Terms of Use, there are usage limits specific to the Distance Matrix API. Manage your costs and usage with tools available in the Google Cloud console.
How the Distance Matrix API is billed
The Distance Matrix API uses a pay-as-you-go pricing model. The Google Maps Platform APIs and SDKs are billed by SKU. Usage is tracked for each SKU, and any API or SDK may have more than one product SKU. Cost is calculated by
Use our Pricing and Usage calculator to estimate your usage cost per API or SDK. For qualifying Google Maps Platform SKUs, a $200 USD Google Maps Platform credit is available each month for each billing account. This credit is automatically applied to the qualifying SKUs.
Pricing for the Distance Matrix API
SKU: Distance Matrix
A request to the Distance Matrix API or the Maps JavaScript API’s Distance Matrix Service (excludes requests triggering the Distance Matrix Advanced billing SKU billing SKU).
MONTHLY VOLUME RANGE (Price per ELEMENT) |
||
---|---|---|
0.005 USD per each (5.00 USD per 1000) |
0.004 USD per each (4.00 USD per 1000) |
Contact Sales for volume pricing |
Each query sent to the Distance Matrix API generates elements, where the number of
origins
times the number of destinations
equals the number
of elements.
SKU: Distance Matrix Advanced
A request to the Distance Matrix API or the Maps JavaScript API’s Distance Matrix Service that uses traffic information and/or location modifiers.
MONTHLY VOLUME RANGE (Price per ELEMENT) |
||
---|---|---|
0.01 USD per each (10.00 USD per 1000) |
0.008 USD per each (8.00 USD per 1000) |
Contact Sales for volume pricing |
Each query sent to the Distance Matrix API generates elements, where the number
of origins
times the number of destinations
equals the number of elements.
A Distance Matrix Advanced SKU is charged for a Distance Matrix API or a Maps JavaScript API’s Distance Matrix Service that uses one or more of the following:
- Traffic information. Traffic information is used when all the following apply (these are the conditions required
to receive the
duration_in_traffic
field in the Distance Matrix response):- The
travel
mode
parameter isdriving
, or is not specified (driving
is the default travel mode). - The request includes a valid
departure_time
parameter. Thedeparture_time
can be set to the current time or some time in the future. It cannot be in the past.
- The
travel
- Location modifiers. When you use the following
location
modifiers to indicate how drivers should approach a particular location:
side_of_road
heading
Other usage limits
While there is no maximum number of elements per day (EPD), the following usage limits are in place for the Distance Matrix API:
- Maximum of 25 origins or 25 destinations per request
- Maximum 100 elements per server-side request.
- Maximum 100 elements per client-side request.
- 60,000 EPM (elements per minute), calculated as the sum of client-side and server-side queries.
Terms of Use restrictions
For information on terms of use, see policies for the Distance Matrix API, and the License Restrictions section of the Google Maps Platform Terms of Service.
Manage your cost of use
To manage your cost of use of the Distance Matrix API or to meet the demands of your production traffic, set daily quota limits on all requests to any API. Daily quotas are reset at midnight Pacific time.
To view or change quota limits for the Distance Matrix API:
- In the Cloud console, open the Google Maps Platform Quotas page.
- Click the APIs drop-down and select the Distance Matrix API.
- To view the quota limits, scroll down to the Elements
card.
A table lists the quota names and limits. - To change a quota limit, click the Edit icon for that limit.
In the dialog that appears, in the Quota Limit field, enter the preferred billable daily quota limit (up to the quota limit, if any, specified by Google) and select Save.
If your API usage reaches your billable quota limit on any given day, your application will not be able to access the API for the remainder of that day.