The Address capture and validation capability is a Mobility services toolkit that helps address a number of common problems with delivery addressing, such as inaccurate address entry from consumers, undeliverable addresses, and the need for adjustments to point-of-delivery locations.
These services include:
- Places API: Simplifies address entry for end users and provides information about points of interest that can be used for routing purposes.
- Address Validation API: Determines whether an address refers to a real deliverable place and provides additional address-level metadata.
- Geocoding API: Provides the latitude and longitude for a given address.
This document describes how to use these services.
About address capture and validation
Accurate, detailed address information is critical for delivery operations because it affects the quality of all downstream activities that depend on it. Whether you get addresses through a user-facing application or from upstream partners using an API, Google Mobility services can help you with this step.
Whether you get addresses through a user-facing application or from upstream partners using an API, Google Mobility services can help you with address capture as follows:
Improve consumer experience: Provide your users with the tools to ensure they can provide a correct address and that their packages get delivered to the right place.
Improve driver productivity: Reduce the time your drivers spend searching for delivery addresses and reduce the need for repeat delivery attempts.
Capture the address
The Places API contains the Place Autocomplete service. This service provides autocomplete capabilities for text-based geographic searches by returning places, such as businesses, addresses and points of interest, as the user enters an address.
For user-facing applications that involve obtaining a delivery address—such as an online consumer or shipper site or an in-store employee portal—simplify address entry and selection for your customers using Place Autocomplete.
For example, suppose a user requests a package pickup and enters the pickup location. Place Autocomplete makes it possible for them to provide an address by entering just a few characters and selecting from a matching list.
The Places API also provides ways to restrict search results, so your developers can ensure that suggested addresses align with locations that your business serves.
Validate the address
After you capture an address, either from direct user input or using an API, ensure that the customer provided a correct address. That means an address free of inaccuracies, such as missing address components or typos. Address validation helps to reduce delivery failures by catching bad addresses and improves delivery predictability with better awareness of address details.
The Address Validation API validates the address components, normalizes the address for mailing, and finds the best known location for it. It can help understand if an address refers to a real place. If the address does not refer to a real place, it can identify possibly wrong components, enabling users to correct them.
If the Address Validation API determines that the address is incorrect or refers to an undeliverable location, you can prompt the user to fix it. If you obtain the address using an API call, you can reject the address.
Allow confirmation of the address location
After a user has entered or selected an address, and you have validated the address, use the Google Maps Platform to supply a map and a marker to indicate the location of the address.
Use the Geocoding API to determine the geographic coordinates of the address. In addition to the location, the Geocoding API also returns address components, which you can use to get missing address parts needed for necessary corrections. It also supplies the location type, which indicates the precision of the coordinates retrieved from the API.
The geocoded location can also be used for other purposes, such as assigning the delivery to a driver in the optimal sequence. See Route Optimization for details.
Use Google Mobility services for address capture
This section provides basic information on how to implement address capture and validation. These steps assume you have set up a project in the Google API Console and have the correct service accounts and billing enabled. For details specific to Google Mobility services, see the Fleet Engine documentation for setting up your project.
Enable address entry capabilities
- Enable Places API in the APIs and Services section of the Google API Console. The Places API includes the Place Autocomplete service.
- Review the
Place Autocomplete
documentation for additional features you can use, such as the
Optional Parameters
section. For example:
- The components parameter limits output to certain countries.
- The types parameter restricts results to certain location types, such as addresses and even allowable input languages from the user.
- For streamlined deployment of an address form, Google Maps Platform offers a Quick Builder within the Google API Console.
Validate the delivery address
- Enable the Address Validation API in the APIs and Services section of the Google API Console.
- Review the Address Validation API documentation to understand the various data you can use to evaluate the address quality and surface recommendations to users.
Allow confirmation of pickup or delivery location
- Build an interactive map for your users on your preferred platforms for mobile and web. For specifics, see the documentation for the Maps JavaScript API and navigate to other platform instructions from there.
- Obtain the address geocode either from the Address Validation API or by passing the Place ID from Place Autocomplete to the Geocoding API, and add a marker at the location.
- To allow the user to adjust the delivery coordinates, make your markers draggable. See the documentation for marker behaviors (Android, iOS, Web).
- Retrieve the geocode of the adjusted marker position. You may also pass the updated geocode to the reverse Geocoding API to retrieve the corresponding address. You can then evaluate address components and accuracy of the new position.
Get additional context about the delivery addresses
Having detailed contextual data about delivery addresses is an essential next step once an address has been determined. With this information, you can:
- Improve driver productivity: Ensure your drivers have all information to successfully and efficiently complete deliveries. When combined with other Google Mobility services capabilities, you can ensure drivers get to the right place at the right time.
- Reduce cost: Efficiently getting the driver to the right place and reducing repeat deliveries can also reduce labor cost and fuel costs for your fleet.
- Scale your operations: All address capture capabilities use Google's worldwide geospatial database, which provide granular coverage wherever you expand your business.
The Google Mobility services can be used to obtain a variety of contextual data about addresses and locations. Once you have determined the correct address, you may call any of the services described below to obtain the relevant information. This information can be used as an input into your route optimization systems or to provide additional context to drivers within your driver application.
- Geocoding API attempts to match an input address to a location with the Google Maps database and provides the latitude/longitude.
- In addition to providing a variety of validation signals, Address Validation API also provides the latitude/longitude for the input address. It also provides residential and commercial flags for the location and a variety of data from USPS for US addresses.
- Place Details API provides information about points of interest, including business open hours.