High-quality geocoding is a cornerstone of location-based applications and core to the Mapbox platform. The new v6 version of the Mapbox Geocoding API (now available in Private Preview) introduces a range of powerful features and expands data coverage.
Numerous enhancements in v6 transform the Mapbox Geocoding API into a more accurate and developer-friendly geocoding solution, including a new structured input option, expanded batch geocoding, and detailed transparency into how the accuracy of results is assessed.
Enhanced Search Precision with Structured Input
Precision is crucial for applications like navigation systems and logistics planning that rely on accurate location data. Previously, Mapbox Geocoding queries could only be passed as a single combined parameter. Now with Geocoding v6, the use of structured input allows users to define each part of an address individually, improving the accuracy of query results. Structured input especially benefits users working with already-structured data, machine-to-machine geocoding, and anyone whose priority is the highest possible accuracy of results.
For example, when geocoding the address ‘1600 Pennsylvania Avenue Washington DC 20500’, developers can now choose to specify each part of the address by type such as ‘street number’ and ‘postal code’ independently, instead of relying on the Geocoding API to infer which part of the input is which. The resulting structed query would look like:
By enhancing visibility into input parameters, structured input improves the understandability, debugging, and logging of geocoding requests so developers can identify and rectify errors more efficiently.
New Ways to Examine Result Accuracy with Smart Address Match
The ‘Smart Address Match’ feature of Geocoding v6 provides a reliable and transparent method for developers to understand and assess the quality of geocoding results. Smart Address Match adds two key elements to each geocoding response: the `match_code` object for each part of an address and the resulting overall `confidence` score for a query result.
The `match_code` breaks down the address result piece-by-piece, comparing values to the original query. This allows developers to see which elements of the address were matched, unmatched, or inferred by the Geocoding API. Match code values also enable developers to identify quality patterns in their source data; for example, if results consistently show "unmatched" values for postcodes, it may be evidence of an upstream data quality issue.
The `confidence` score provides a rating for how well the resulting address matches the user's original query. The score is based on the combination of all the individual match codes assigned to each component of the address. Users can leverage the confidences score to more precisely assess the quality of geocoding results and finely control the degree of match required to accept or reject a given set of results.
Batch Queries Available for Both Temporary and Permanent Geocoding
With v6, the Mapbox Geocoding API can now handle up to 1000 queries at once within a single API request when using either Temporary or Permanent geocoding. Batch requests are also now packaged inside of a JSON object via POST request.
Expanding the number of queries allowed in a single batch request helps developers to streamline their code and eliminate request overhead when needing to load many geocodes at once. This is especially useful when using temporary geocodes for client-side tasks, where a developer may want to geocode and plot many points simultaneously, such as outage maps and business intelligence tools.
More Readable Format for Geocoding Responses
In Geocoding v6, the response object now provides the context of a named place instead of relying on a numbered array. The new format is easier to read and follows the geojason structure more closely than before. The improved response object improves the clarity of responses and reduces the learning curve for developers new to the Mapbox Geocoding API.
For developers who prefer the response format of Geocoding v5 but want to access the other benefits of Geocoding v6, we have added the option to maintain the familiar structure of v5 response format.
Bonus: New Coverage in Japan
Included in the Geocoding v6 rollout is an extensive increase in coverage for Japan, thanks to expanded data sources. With access to over 34 million addresses, developers, businesses, and organizations can effectively incorporate best-in-class location intelligence into their applications, enabling seamless navigation, logistics planning, and location-based services across Japan.
Get Access Today
Geocoding v6 is available now in Private Preview. Register for access and stay ahead of the competition while delivering exceptional location-based experiences to your users.