MapQuest plans, whether at the self-serve or Enterprise Edition level, generally operate on a quota system, in which customers purchase a set number of monthly or annual transactions. In most cases, a transaction is a request made to an underlying MapQuest service, such as a request to the Directions API or Geocoding API. To provide additional transparency on geocoding transactions and how they count towards your plan, we developed this post with further detail.
Based on the request type, more than one transaction may be counted towards your quota for a specific request. This type of transaction is an embedded transaction. Embedded transactions must call out to another service in order to complete the initial request.
For example, a request to the Directions API can generate geocoding or reverse geocoding transactions depending on the nature of the request. When making a request to the Directions API with an origin and destination, 3 transactions will count towards your plan: 1 Direction transaction and 2 Geocode transactions.
Reverse Geocoding and Embedded Transactions
Another example of embedded transactions is found in one of our advanced routing options, our reverse geocoding. When routing to/from latitude and longitude coordinates, the Directions API will call the Geocoding API to reverse geocode the coordinates. Since an additional service outside of the Directions API is leveraged, more than one transaction will accumulate towards your plan.
This behavior is controlled by the doReverseGeocode parameter, which is set to ‘true’ by default. In order to prevent the Directions API from reverse geocoding the provided coordinates, the doReverseGeocode parameter can be set to ‘false’ instead by updating the code.
API Response Details and Setting Parameters for Reverse Geocoding
When routing to/from latitude and longitude coordinates, the Directions API will call the Geocoding API to reverse geocode coordinates. Location information will populate the Locations block in the Directions API response. This is reflected in example 1A below:
In order to prevent the Directions API from reverse geocoding the provided latitude and longitude coordinates, the doReverseGeocode parameter can be set to ‘false,’ which is shown in example 1B below:
When the doReverseGeocode parameter is set to ‘false’, location information about each set of latitude and longitude coordinates will not be populated in the response.
Note: The destination maneuver text will be affected by updates to the doReverseGeocode parameters. If doReversGeocode parameter is set to ‘false’, printed directions will show, “You have arrived at your destination.” When set to ‘true’, destination text will include “1555 Blake Street is on your right.”
You can find plan information and the number of transactions used at any given time after logging into your account through our website.
Enterprise Edition customers are encouraged to contact their Account Manager or the Technical Support team for answers regarding transactions, the Directions API best practices, or correct usage of the doReverseGeocode parameter. Self service customers should reference our documentation on the Developer Network or contact email@example.com.