- HTTP request
- Request body
- Response body
- Authorization scopes
- LocationQuery
- LocationBias
- Result
- Confidence
Resolves a list of place names (or addresses) to specific geospatial entities (e.g., places) on Google Maps.
HTTP request
POST https://mapstools.googleapis.com/v1:resolveNames
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "queries": [ { object ( |
| Fields | |
|---|---|
queries[] |
Required. A list of location queries to be resolved. You may specify up to 20 queries. |
locationBias |
Optional. An optional region to bias the resolution results. If specified, the resolution results will be biased towards the entities that are closer to this region. Including If both |
regionCode |
Optional. An optional region code to bias the resolution results. If specified, the resolution results will be biased towards the entities that are in or near the specified region. This should be a CLDR region code. For example, "US" or "CA". Including If both |
Response body
Response message for v1.resolveNames.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "results": [ { object ( |
| Fields | |
|---|---|
results[] |
Output only. The list of resolved entities from the location queries. Guaranteed to map 1:1 with the request |
failedRequests |
Output only. A map communicating partial failures. The key is the index of the failed request in the An object containing a list of |
saveToMapsUrl |
Output only. A link to save all successfully resolved entities in Google Maps. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/maps-platform.mapstools
LocationQuery
A location query represents a specific location entity that can be resolved with Google Maps. Currently, only place names and addresses are supported as location queries.
| JSON representation |
|---|
{ "text": string } |
| Fields | |
|---|---|
text |
Required. The text query to resolve to a specific geospatial entity on Google Maps, such as a place or an address. The more specific the query, the more accurate the resolution. For example, "San Francisco", "Googleplex, Mountain View, CA", "1600 Amphitheatre Parkway, Mountain View, CA", or "Eiffel Tower, Paris". Queries must be a specific address or place name. General locations like a chain name (e.g. Starbucks) or a search query like "restaurants" are not supported. |
LocationBias
The region to bias the resolution results to.
| JSON representation |
|---|
{
// The following is a list of mutually exclusive fields. At most one of the
// fields will be set in a response:
"viewport": {
object ( |
| Fields | |
|---|---|
| The type of the location bias. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
viewport |
A viewport defined by a bounding box. |
| End of mutually exclusive fields. | |
Result
A single resolved entity from a given location query, along with the confidence level of the resolution.
| JSON representation |
|---|
{ "entity": { object ( |
| Fields | |
|---|---|
entity |
Output only. The resolved entity from the location query. |
confidence |
Output only. The level of confidence for the resolution. |
Confidence
The level of confidence for the resolution.
| Enums | |
|---|---|
CONFIDENCE_UNSPECIFIED |
Default value. This value is unused. |
MEDIUM |
Medium confidence indicates that the resolution is likely correct but there may be other candidates. |
HIGH |
High confidence indicates that the resolution is correct and represents a specific geospatial entity (e.g., a specific place). |