שליחת בקשה לתגובה גיאוגרפית ותשובה
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מפתחים באזור הכלכלי האירופי (EEA)
בדף הזה מוצגות בקשות ותשובות לאחזור כתובת לפי מזהה מקום.
פרמטרים נדרשים
-
place_id
— מזהה המקום של המקום שרוצים לקבל את הכתובת שלו בפורמט קריא. מזהה המקום הוא מזהה ייחודי שאפשר להשתמש בו עם ממשקי API אחרים של Google. לדוגמה, אפשר להשתמש ב-placeID
שמוחזר על ידי Roads API כדי לקבל את הכתובת של נקודה שהוצמדה לכביש. מידע נוסף על מזהי מקומות זמין במאמר סקירה כללית על מזהי מקומות.
-
key
— מפתח ה-API של האפליקציה. המפתח הזה מזהה את האפליקציה שלכם לצורך ניהול מכסות. איך מקבלים מפתח
הפרמטרים האופציונליים זהים לאלה של המרת קואורדינטות לכתובות.
השאילתה הבאה מכילה את מזהה המקום של מקום בברוקלין:
https://maps.googleapis.com/maps/api/geocode/json?place_id=ChIJd8BlQ2BZwokRAFUEcm_qrcA
&key=YOUR_API_KEY
השאילתה שלמעלה מחזירה את התוצאה הבאה:
{
"results" : [
{
"address_components" : [
{
"long_name" : "277",
"short_name" : "277",
"types" : [ "street_number" ]
},
{
"long_name" : "Bedford Avenue",
"short_name" : "Bedford Ave",
"types" : [ "route" ]
},
{
"long_name" : "Williamsburg",
"short_name" : "Williamsburg",
"types" : [ "neighborhood", "political" ]
},
{
"long_name" : "Brooklyn",
"short_name" : "Brooklyn",
"types" : [ "political", "sublocality", "sublocality_level_1" ]
},
{
"long_name" : "Kings County",
"short_name" : "Kings County",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "New York",
"short_name" : "NY",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
},
{
"long_name" : "11211",
"short_name" : "11211",
"types" : [ "postal_code" ]
}
],
"formatted_address" : "277 Bedford Ave, Brooklyn, NY 11211, USA",
"geometry" : {
"location" : {
"lat" : 40.7142205,
"lng" : -73.9612903
},
"location_type" : "ROOFTOP",
"viewport" : {
"northeast" : {
"lat" : 40.71556948029149,
"lng" : -73.95994131970849
},
"southwest" : {
"lat" : 40.7128715197085,
"lng" : -73.9626392802915
}
}
},
"place_id" : "ChIJd8BlQ2BZwokRAFUEcm_qrcA",
"types" : [ "street_address" ]
}
],
"status" : "OK"
}
תיאור של השדות בתגובה מופיע במאמר בנושא תגובות לגיאו-קידוד.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-31 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-31 (שעון UTC)."],[[["\u003cp\u003eThis page explains how to retrieve a human-readable address for a given place ID using the Google Maps Geocoding API.\u003c/p\u003e\n"],["\u003cp\u003eYou need to provide a \u003ccode\u003eplace_id\u003c/code\u003e and your API \u003ccode\u003ekey\u003c/code\u003e as required parameters in the request.\u003c/p\u003e\n"],["\u003cp\u003eOptional parameters for refining the request are available and shared with reverse geocoding.\u003c/p\u003e\n"],["\u003cp\u003eA successful response includes detailed address components, formatted address, location coordinates, and more.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the provided links for details on place IDs, API keys, optional parameters, and response fields.\u003c/p\u003e\n"]]],["To retrieve a place's address, you need the `place_id` and your API `key`. These parameters are used in a query, which is sent as a request. The response returns the address components, including the street number, name, neighborhood, city, state, country, and postal code. It also provides a formatted address and the place's geographic coordinates. The `place_id` uniquely identifies the location and can be obtained from other Google APIs.\n"],null,["# Place geocoding request and response\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nThis page shows you requests and responses to retrieve an address for a place ID.\n\nRequired parameters\n-------------------\n\n- `place_id` --- The place ID of the place for which you wish to obtain the human-readable address. The place ID is a unique identifier that can be used with other Google APIs. For example, you can use the `placeID` returned by the [Roads API](/maps/documentation/roads/snap) to get the address for a snapped point. For more information about place IDs, see the [place ID overview](/maps/documentation/places/web-service/place-id)..\n- `key` --- Your application's API key. This key identifies your application for purposes of quota management. Learn how to [get a key](/maps/documentation/geocoding/get-api-key).\n\nThe optional parameters are the same as those for\n[reverse geocoding](/maps/documentation/geocoding/requests-reverse-geocoding).\n\nThe following query contains the place ID of a place in Brooklyn: \n\n https://maps.googleapis.com/maps/api/geocode/json?place_id=ChIJd8BlQ2BZwokRAFUEcm_qrcA\n &key=YOUR_API_KEY\n\nThe above query returns the following result: \n\n {\n \"results\" : [\n {\n \"address_components\" : [\n {\n \"long_name\" : \"277\",\n \"short_name\" : \"277\",\n \"types\" : [ \"street_number\" ]\n },\n {\n \"long_name\" : \"Bedford Avenue\",\n \"short_name\" : \"Bedford Ave\",\n \"types\" : [ \"route\" ]\n },\n {\n \"long_name\" : \"Williamsburg\",\n \"short_name\" : \"Williamsburg\",\n \"types\" : [ \"neighborhood\", \"political\" ]\n },\n {\n \"long_name\" : \"Brooklyn\",\n \"short_name\" : \"Brooklyn\",\n \"types\" : [ \"political\", \"sublocality\", \"sublocality_level_1\" ]\n },\n {\n \"long_name\" : \"Kings County\",\n \"short_name\" : \"Kings County\",\n \"types\" : [ \"administrative_area_level_2\", \"political\" ]\n },\n {\n \"long_name\" : \"New York\",\n \"short_name\" : \"NY\",\n \"types\" : [ \"administrative_area_level_1\", \"political\" ]\n },\n {\n \"long_name\" : \"United States\",\n \"short_name\" : \"US\",\n \"types\" : [ \"country\", \"political\" ]\n },\n {\n \"long_name\" : \"11211\",\n \"short_name\" : \"11211\",\n \"types\" : [ \"postal_code\" ]\n }\n ],\n \"formatted_address\" : \"277 Bedford Ave, Brooklyn, NY 11211, USA\",\n \"geometry\" : {\n \"location\" : {\n \"lat\" : 40.7142205,\n \"lng\" : -73.9612903\n },\n \"location_type\" : \"ROOFTOP\",\n \"viewport\" : {\n \"northeast\" : {\n \"lat\" : 40.71556948029149,\n \"lng\" : -73.95994131970849\n },\n \"southwest\" : {\n \"lat\" : 40.7128715197085,\n \"lng\" : -73.9626392802915\n }\n }\n },\n \"place_id\" : \"ChIJd8BlQ2BZwokRAFUEcm_qrcA\",\n \"types\" : [ \"street_address\" ]\n }\n ],\n \"status\" : \"OK\"\n }\n\nFor a description of the fields in the response, see\n[Geocoding responses](/maps/documentation/geocoding/requests-geocoding#responses)."]]