Google Maps Geocoding
FREEMIUM
By googlecloud
Updated 6 months ago
Google Maps Geocoding Overview
Geocoding is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739), which you can use to place markers on a map, or position the map.
provider
rating
add first rating
Followers on API
Follow this API
resourcesTerms of Service
More Details

Component Filtering

In a Geocoding response, the Geocoding API can return address results restricted to a specific area. You can specify the restriction using the components filter. A filter consists of a list of component:value pairs separated by a pipe (|). Filter values support the same methods of spelling correction and partial matching as other Geocoding requests. If the geocoder finds a partial match for a component filter, the response will contain a partial_match field.

The components that can be filtered include:

  • postal_code matches postal_code and postal_code_prefix.
  • country matches a country name or a two letter ISO 3166-1 country code. The API follows the ISO standard for defining countries, and the filtering works best when using the corresponding ISO code of the country.

The following components may be used to influence results, but will not be enforced:

  • route matches the long or short name of a route.
  • locality matches against locality and sublocality types.
  • administrative_area matches all the administrative_area levels.

Notes about component filtering:

If the request contains multiple component filters, the API evaluates them as an AND, not an OR. For example, if the request includes multiple countries components=country:GB|country:AU, the API looks for locations where country=GB AND country=AU, and returns ZERORESULTS. Results are consistent with Google Maps, which occasionally yields unexpected ZERORESULTS responses. Using Place Autocomplete may provide better results in some use cases. To learn more, see this FAQ.
For each address component, either specify it in the address parameter or in a components filter, but not both. Specifying the same values in both may result in ZERO_RESULTS.

Viewport Biasing

In a Geocoding request, you can instruct the Geocoding service to prefer results within a given viewport (expressed as a bounding box). You do so within the request URL by setting the bounds parameter. Note that biasing only prefers results within the bounds; if more relevant results exist outside of these bounds, they may be included.

The bounds parameter defines the latitude/longitude coordinates of the southwest and northeast corners of this bounding box using a pipe (|) character to separate the coordinates.

Example: bounds=34.172684,-118.604794|34.236144,-118.500938

Supported Languages

Language Code Language
ar Arabic
lt Lithuanian
be Belarusian
lv Latvian
bg Bulgarian
mk Macedonian
bn Bengali
ml Malayalam
ca Catalan
mr Marathi
cs Czech
my Burmese
da Danish
nl Dutch
de German
no Norwegian
el Greek
pa Punjabi
en English
pl Polish
en-Au English (Australian)
pt Portuguese
en-GB English (Great Britain)
pt-BR Portuguese (Brazil)
es Spanish
pt-PT Portugue
se (Portugal)
eu Basque
ro Romanian
fa Farsi
ru Russian
fi Finnish
sk Slovak
fil Filipino
sl Slovenian
fr French
sq Albanian
gl Galician
sr Serbian
gu Gujarati
sv Swedish
hi Hindi
ta Tamil
hr Croatian
te Telugu
hu Hungarian
th Thai
id Indonesian
tl Tagalog
it Italian
tr Turkish
iw Hebrew
uk Ukrainian
ja Japanese
uz Uzbek
kk Kazakh
vi Vietnamese
kn Kannada
zh-CN Chinese (Simlified)
ko Korean
zh-TW Chinese (Traditional)
ky Kyrgyz

Reverse Geocoding

Result_type values:

  • street_address indicates a precise street address.
  • route indicates a named route (such as "US 101").
  • intersection indicates a major intersection, usually of two major roads.
  • political indicates a political entity. Usually, this type indicates a polygon of some civil administration.
  • country indicates the national political entity, and is typically the highest order type returned by the Geocoder.
  • administrative_area_level_1 indicates a first-order civil entity below the country level. Within the United States, these administrative levels are states. Not all nations exhibit these administrative levels. In most cases, administrativearealevel_1 short names will closely match ISO 3166-2 subdivisions and other widely circulated lists; however this is not guaranteed as our geocoding results are based on a variety of signals and location data.
  • administrative_area_level_2 indicates a second-order civil entity below the country level. Within the United States, these administrative levels are counties. Not all nations exhibit these administrative levels.
  • administrative_area_level_3 indicates a third-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.
  • administrative_area_level_4 indicates a fourth-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.
  • administrative_area_level_5 indicates a fifth-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.
  • colloquial_area indicates a commonly-used alternative name for the entity.
  • locality indicates an incorporated city or town political entity.
  • sublocality indicates a first-order civil entity below a locality. For some locations may receive one of the additional types: sublocalitylevel1 to sublocalitylevel5. Each sublocality level is a civil entity. Larger numbers indicate a smaller geographic area.
  • neighborhood indicates a named neighborhood
  • premise indicates a named location, usually a building or collection of buildings with a common name
  • subpremise indicates a first-order entity below a named location, usually a singular building within a collection of buildings with a common name
  • postal_code indicates a postal code as used to address postal mail within the country.
  • natural_feature indicates a prominent natural feature.
  • airport indicates an airport.
  • park indicates a named park.
  • point_of_interest indicates a named point of interest. Typically, these "POI"s are prominent local entities that don't easily fit in another category, such as "Empire State Building" or "Eiffel Tower".

Location_type values:

  • "ROOFTOP" returns only the addresses for which Google has location information accurate down to street address precision.
  • "RANGE_INTERPOLATED" returns only the addresses that reflect an approximation (usually on a road) interpolated between two precise points (such as intersections). An interpolated range generally indicates that rooftop geocodes are unavailable for a street address.
  • "GEOMETRIC_CENTER" returns only geometric centers of a location such as a polyline (for example, a street) or polygon (region).
  • "APPROXIMATE" returns only the addresses that are characterized as approximate.
Have a question about this API?Ask the API Provider.
Developers who viewed Google Maps Geocoding also viewed

Install SDK for (Node.js)Unirest

OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication