Häufig gestellte Fragen zu Geocoding
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
In diesen FAQs werden Fragen speziell zur Geocoding API behandelt.
Allgemeine Fragen zur Google Maps Platform werden unter Google Maps Platform – FAQs beantwortet. Weitere Informationen finden Sie unter Best Practices für das Geocodieren von Adressen.
Fehlerbehebung
Fehlerbehebung
-
Ich erhalte mehr Abfragen, die mit dem Geocoder ZERO_RESULTS zurückgeben. Was ist da los?
-
Im Geocoder führen mehrdeutige, unvollständige und schlecht formatierte Suchanfragen, z. B. falsch geschriebene oder nicht vorhandene Adressen, häufig zu ZERO_RESULTS.
Wenn die Adresse nicht gefunden werden kann, ist ZERO_RESULTS vorzuziehen, anstatt ein Teilergebnis zurückzugeben (z. B. nur den Stadtteil anstelle einer Adresse).
Wenn Ihre Anwendung Nutzereingaben von Adressen verarbeitet, kann die Funktion Place Autocomplete in der Places API bessere Ergebnisse liefern.
Mit Place Autocomplete können Nutzer anhand ihrer Eingabe aus einer Reihe von Ergebnissen auswählen. So können sie zwischen ähnlich benannten Ergebnissen wählen und ihre Suchanfrage anpassen, wenn sie eine Adresse falsch geschrieben haben.
Wenn Sie eine Anwendung haben, die mit mehrdeutigen oder unvollständigen Suchanfragen oder Suchanfragen arbeitet, die Fehler enthalten können, empfehlen wir, die Funktion Place Autocomplete in der Places API anstelle des Vorwärts-Geocoders in der Geocoding API zu verwenden. Weitere Informationen finden Sie unter
Best Practices für das Geocoding von Adressen und im Blogpost
Adressgeocoding in den Google Maps APIs.
-
Ich benötige schnelle Antworten und der Geocoder ist für meine Anwendung zu langsam. Was kann ich verwenden, um schnellere Antworten zu erhalten?
-
Für Anwendungen, die auf Nutzereingaben reagieren und daher sehr latensempfindlich sind, empfehlen wir, die Funktion Place Autocomplete in der Places API zu verwenden (auch in JavaScript, Android oder iOS verfügbar) und nicht das Geocoding von Adressen.
Place Autocomplete ist für die interaktive Verwendung optimiert. Die Latenz ist bei dieser Funktion daher sehr gering.
Die Geocodierung von Adressen in der Geocoding API ist für die Verwendung mit vollständigen, eindeutigen und gut formatierten Adressen optimiert, z. B. Lieferadressen, die in Onlineformulare eingegeben werden. Daher ist die Latenz höher als bei Place Autocomplete. Der Vorwärtsgeocoder hat eine größere Abdeckung und eine bessere Ergebnisqualität, aber eine etwas höhere Latenz.
-
Wie kann ich die Latenz bei der Directions API (alte Version) und der Distance Matrix API (alte Version) verringern?
-
Verwenden Sie anstelle von Adressen Orts-IDs, um Wegpunkte, Start- und Zielort anzugeben. Orts-IDs lassen sich am besten über die Funktion Place Autocomplete in der Places API oder über die Places Library in der Maps JavaScript API abrufen. Weitere Informationen finden Sie unter
placeIdOnly
, mit der sich die Kosten für Place Autocomplete senken lassen.
Wenn die Directions API (alte Version) oder die Distance Matrix API (alte Version) mit einem Adressstring anstelle einer Orts-ID oder eines Breiten-/Längengrads abgefragt wird, wird dasselbe Backend wie bei der Geocoding API verwendet, um diese Adresse vor dem Berechnen der Wegbeschreibung in eine Orts-ID umzuwandeln. Place Autocomplete ist schneller als das Geocoding von Adressen. Für Anwendungen, in denen die Directions API (alte Version) oder die Distance Matrix API (alte Version) in Situationen mit hoher Latenz verwendet wird, z. B. bei der Reaktion auf Nutzereingaben, empfehlen wir, die Orts-IDs, die diesen Adressen entsprechen, mithilfe der automatischen Ortsvervollständigung abzurufen und an die Directions API (alte Version) oder die Distance Matrix API (alte Version) zu übergeben.
Dadurch wird die Latenz deutlich reduziert. In unserer Dokumentation finden Sie ein
Beispiel für die Verwendung von Place Autocomplete mit Wegbeschreibungen.
-
Wie melde ich Fehler im Geocoder?
-
Wenn Sie
Fehlerberichte oder
Funktionsanfragen für den Vorwärtsgeocoder haben, können Sie uns diese über unseren öffentlichen
Issue Tracker senden.
-
Der Geocoder liefert für meinen Anwendungsfall keine guten Ergebnisse. Welche Arten von Hilfe kann ich erhalten?
-
Teilen Sie uns Ihre Fragen über unseren öffentlichen
Issue-Tracker mit. Wir prüfen dann, ob es Fehler oder systemische Probleme gibt, die die Qualität der Ergebnisse beeinträchtigen, oder ob wir Änderungen am Leitfaden mit Best Practices vornehmen können, damit Entwickler bessere Ergebnisse erzielen.
-
Wie erziele ich mit dem Geocoder die besten Ergebnisse mithilfe der Komponentenfilterung?
-
Im Geocoder werden durch die
Komponentenfilterung nur Einschränkungen für postal_code
und country
erzwungen. In den folgenden Beispielen wird veranschaulicht, wie Sie die Komponentenfilterung je nach gewünschten Ergebnissen am besten verwenden. Ersetzen Sie in den Beispielanfrage-URLs „YOUR_API_KEY“ durch Ihren tatsächlichen API-Schlüssel.
- Wenn Sie Postleitzahlen auf ein bestimmtes Land beschränken möchten, müssen Sie die Ländereinschränkung mit einem ISO 3166-2-Ländercode angeben.
Beispiel:
components=country:CH|postal_code:8000
gibt „8000 Zürich, Schweiz“ zurück.
https://maps.googleapis.com/maps/api/geocode/json?components=country:CH%7Cpostal_code:8000&key=YOUR_API_KEY
- Wenn Sie Suchanfragen auf ein bestimmtes Land beschränken möchten, müssen Sie die Ländereinschränkung mit einem ISO 3166-2-Ländercode angeben. Ländernamen und andere Abkürzungen liefern möglicherweise nicht dieselben Ergebnisse wie Ländercodes.
Beispiele:
- Bei der Geocodierung von
components=country:FRA|locality:gallus
wird der Ortsteil Gallus in Frankfurt am Main, Deutschland, zurückgegeben. Das liegt daran, dass der dreistellige Ländercode für Frankreich (FRA) nicht unterstützt wird. Daher sind Ergebnisse für alle Länder zulässig und das Ergebnis in Frankfurt passt besser als alle Ergebnisse in Frankreich.
https://maps.googleapis.com/maps/api/geocode/json?components=country:FRA%7Clocality:gallus&key=YOUR_API_KEY
- Die Geocoding API gibt bei mehrdeutigen Suchanfragen nicht unbedingt mehrere Ergebnisse zurück. Solche Suchanfragen werden besser von Place Autocomplete beantwortet.
Beispiele:
- Bei der Geocodierung von
components=country:US|locality:madrid
wird „Madrid, NM 87010, USA“ zurückgegeben, aber keine der anderen Städte in den USA mit dem Namen „Madrid“.
https://maps.googleapis.com/maps/api/geocode/json?components=country:US%7Clocality:madrid&key=YOUR_API_KEY
- Wenn Sie Place Autocomplete für
input=madrid&components=country:us&types=(regions)
verwenden und mit location
und radius
einen Darstellungsbereich angeben, um die Standortergebnisse
zu beeinflussen, wird eine Antwort mit mehreren Städten in den USA mit dem Namen „Madrid“ generiert.
https://maps.googleapis.com/maps/api/place/autocomplete/json?location=37.386052,-122.083851&radius=10000&input=madrid&components=country:us&types=(regions)&key=YOUR_API_KEY
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-08-31 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-08-31 (UTC)."],[[["\u003cp\u003eThis FAQ addresses questions about the Geocoding API; for general Google Maps Platform questions, refer to the Google Maps Platform FAQ.\u003c/p\u003e\n"],["\u003cp\u003eFor applications with user input and latency sensitivity, Google recommends using Place Autocomplete instead of address geocoding for better results and speed.\u003c/p\u003e\n"],["\u003cp\u003eTo improve latency with the Directions or Distance Matrix APIs, use place IDs obtained from Place Autocomplete instead of addresses.\u003c/p\u003e\n"],["\u003cp\u003eYou can report bugs or request features for the Geocoding API through the public issue tracker.\u003c/p\u003e\n"],["\u003cp\u003eComponent filtering in the Geocoding API is primarily used to restrict results by country and postal code.\u003c/p\u003e\n"]]],[],null,["This FAQ covers questions specific to the Geocoding API.\nRefer to the [Google Maps Platform FAQ](/maps/faq) for questions\ncommon to all Google Maps Platform. See also\n[Best Practices When Geocoding Addresses](/maps/documentation/geocoding/best-practices).\n\nTroubleshooting\n\n- [I'm getting more queries that return ZERO_RESULTS with the geocoder. What's going on?](#trbl-zero-results)\n- [I need fast responses, and the geocoder is too slow for my application. What can\n I use for faster responses?](#trbl-slow)\n- [How can I mitigate the latency on the Directions API (Legacy) and\n Distance Matrix API (Legacy)?](#trbl-latency)\n- [How do I report bugs in the geocoder?](#trbl-report-bug)\n- [The geocoder isn't producing good results for my use case. What help is available?](#trbl-help)\n- [How do I get the best results with the geocoder using component filtering?](#trbl-component-filtering)\n\nTroubleshooting\n\n\nI'm getting more queries that return ZERO_RESULTS with the geocoder. What's going on?\n\n: In the geocoder, ambiguous, incomplete and badly formatted queries, such as\n misspelled or nonexistent addresses, are prone to produce ZERO_RESULTS.\n If the address cannot be found, ZERO_RESULTS is preferable to a partial\n result (for example returning only the suburb in lieu of an address).\n\n If your application deals with user input of addresses, the\n [Place Autocomplete](/maps/documentation/places/web-service/autocomplete) feature\n in the Places API may produce better quality results.\n Place Autocomplete allows users to select from a set of results based on what\n they've typed, which allows users to choose between similarly named results,\n and to adjust their query if they misspell an address.\n\n If you have an application dealing with ambiguous or incomplete queries or queries\n that may contain errors, we recommend you use the\n [Place Autocomplete](/maps/documentation/places/web-service/autocomplete) feature\n in the Places API rather than the forward geocoder\n available in the Geocoding API. For more details, see\n [Best Practices When Geocoding Addresses](/maps/documentation/geocoding/best-practices) and the\n [Address Geocoding in the Google Maps APIs blog post](https://mapsplatform.google.com/resources/blog/address-geocoding-in-google-maps-apis/).\n\n\nI need fast responses, and the geocoder is too slow for my application. What can\nI use for faster responses?\n\n: We recommend that applications that respond to user input, and therefore are highly\n latency-sensitive, use the [Place Autocomplete](/maps/documentation/places/web-service/autocomplete)\n feature in the Places API (also available in\n [JavaScript](/maps/documentation/javascript/places-autocomplete),\n [Android](/maps/documentation/places/android-sdk/autocomplete), or\n [iOS](/maps/documentation/places/ios-sdk/autocomplete)) rather than address geocoding.\n Place Autocomplete is optimized to be used interactively, and thus has very low latency.\n\n Address geocoding in the Geocoding API is optimized for use with\n complete, unambiguous, well formatted addresses, such as delivery addresses entered into\n online forms, and thus has higher latency than Place Autocomplete. The forward geocoder\n has greater coverage and better result quality, but with somewhat higher latency.\n\n\nHow can I mitigate the latency on the Directions API (Legacy) and\nDistance Matrix API (Legacy)?\n\n: Instead of addresses, use [place IDs](/maps/documentation/places/web-service/place-id) to\n specify waypoints, origin, and destination. Place IDs are best obtained from the\n [Place Autocomplete](/maps/documentation/places/web-service/autocomplete)\n feature in the Places API or the\n [Places library](/maps/documentation/javascript/places-autocomplete) in the\n Maps JavaScript API. See also the information on the\n [`placeIdOnly`](/maps/documentation/javascript/places-autocomplete#placeidonly) option, which can be used to reduce the cost of\n Place Autocomplete.\n\n When the Directions API (Legacy) or Distance Matrix API (Legacy)\n is queried with an address string rather than a place ID or latlng, they use the same\n backend as the Geocoding API to convert that address into a\n place ID prior to calculating directions. Place Autocomplete is faster than address\n geocoding. For applications that use the Directions API (Legacy) or\n Distance Matrix API (Legacy) in highly latency-sensitive situations, such as\n responding to user input, we recommended you use Place Autocomplete to get the place IDs\n corresponding to those addresses, and pass the place IDs to the\n Directions API (Legacy) or Distance Matrix API (Legacy).\n This approach reduces latency significantly. See our documentation for an\n [example of how to use Place Autocomplete with directions](/maps/documentation/javascript/examples/places-autocomplete-directions).\n\n\nHow do I report bugs in the geocoder?\n\n: If you have any\n [bug reports](https://issuetracker.google.com/savedsearches/558483) or\n [feature requests](https://issuetracker.google.com/issues/new?component=188871&template=788905) for the forward geocoder service, let us know using our public\n [issue tracker](https://issuetracker.google.com/issues/new?component=188871&template=788906).\n\n\nThe geocoder isn't producing good results for my use case. What help is available?\n\n: Let us know using our public\n [issue tracker](https://issuetracker.google.com/savedsearches/558483), sharing a few specific queries, so we can investigate to\n see if there are any bugs or systemic issues causing problems with result\n quality, or if there are any changes we can make to the\n [best practices guide](/maps/documentation/geocoding/best-practices)\n to help developers get better results.\n\n\nHow do I get the best results with the geocoder using component filtering?\n\n: In the geocoder, [component filtering](/maps/documentation/geocoding/overview#component-filtering) enforces only `postal_code` and\n `country` restrictions. The following examples illustrate how best to use component\n filtering, depending on the results you need. In the sample request URLs, be sure to\n replace \\`YOUR_API_KEY\\` with your actual API key.\n\n - To restrict postal codes to a specific country, be sure to specify the country restriction using an [ISO 3166-2 country code](https://en.wikipedia.org/wiki/ISO_3166-2). For example: `components=country:CH|postal_code:8000` returns \"8000 Zürich, Switzerland\". \n\n ```scdoc\n https://maps.googleapis.com/maps/api/geocode/json?components=country:CH%7Cpostal_code:8000&key=YOUR_API_KEY\n ```\n - To restrict queries to a specific country, be sure to specify the country restriction using an [ISO 3166-2 country code](https://en.wikipedia.org/wiki/ISO_3166-2). Country names and other abbreviations may not produce the same results as country codes.\n\n Examples:\n - Geocoding for `components=country:FRA|locality:gallus` returns the sublocality of Gallus in Frankfurt am Main, Germany. This is because the 3-letter country code for France (FRA) isn't supported, thus results in any country are allowed and the result in Frankfurt is a better fit than anything in France. \n\n ```scdoc\n https://maps.googleapis.com/maps/api/geocode/json?components=country:FRA%7Clocality:gallus&key=YOUR_API_KEY\n ```\n - Geocoding API won't necessarily return multiple results for ambiguous queries. Such queries are better answered by the Place Autocomplete. Examples:\n\n - Geocoding for `components=country:US|locality:madrid` returns \"Madrid, NM 87010, USA\" but none of the other cities in the USA named \"Madrid\". \n\n ```scdoc\n https://maps.googleapis.com/maps/api/geocode/json?components=country:US%7Clocality:madrid&key=YOUR_API_KEY\n ```\n - Using Place Autocomplete for `input=madrid&components=country:us&types=(regions)`, and also specifying a viewport using `location` and `radius` to [bias the location results](/maps/documentation/places/web-service/autocomplete#location_biasing), generates a response with several cities in the USA named \"Madrid\". \n\n ```carbon\n https://maps.googleapis.com/maps/api/place/autocomplete/json?location=37.386052,-122.083851&radius=10000&input=madrid&components=country:us&types=(regions)&key=YOUR_API_KEY\n ```"]]