קל לארגן דפים בעזרת אוספים אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מפתחים באזור הכלכלי האירופי (EEA)
Geocoding API הוא שירות שמספק המרת כתובות לקואורדינטות (geocoding) והמרת קואורדינטות לכתובות (reverse geocoding).
גאוקוד הוא תהליך המרה של כתובות (כמו כתובת רחוב) לקואורדינטות גאוגרפיות (כמו קו אורך וקווי רוחב), שאפשר להשתמש בהן כדי להציב סמנים במפה או למקם את המפה.
המרת קואורדינטות לכתובות (reverse geocoding) היא תהליך המרה של קואורדינטות גאוגרפיות לכתובת שקריאה לבני אדם.
אפשר גם להשתמש ב-Geocoding API כדי למצוא את הכתובת של מזהה מקום נתון.
אפשר לבדוק את זה על ידי הזנת כתובת ה-URL בדפדפן האינטרנט (חשוב להחליף את 'YOUR_API_KEY' במפתח ה-API בפועל). התשובה כוללת כתובת שאנשים יכולים לקרוא, עם קו הרוחב וקו האורך של המיקום.
בהמשך מוצגת דוגמה לתגובה של המרת קואורדינטות לכתובות (reverse geocoding), בפורמט JSON:
{"plus_code":{"compound_code":"P27Q+MC New York, NY, USA","global_code":"87G8P27Q+MC"},"results":[{"address_components":[{"long_name":"279","short_name":"279","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":"279 Bedford Ave, Brooklyn, NY 11211, USA","geometry":{"location":{"lat":40.7142484,"lng":-73.9614103},"location_type":"ROOFTOP","viewport":{"northeast":{"lat":40.71559738029149,"lng":-73.9600613197085},"southwest":{"lat":40.71289941970849,"lng":-73.96275928029151}}},"place_id":"ChIJT2x8Q2BZwokRpBu2jUzX3dE","plus_code":{"compound_code":"P27Q+MC Brooklyn, New York, United States","global_code":"87G8P27Q+MC"},"types":["bakery","cafe","establishment","food","point_of_interest","store"]},...Additionalresultstruncatedinthisexample[]...],"status":"OK"}
מתחילים לכתוב קוד באמצעות ספריות הלקוח שלנו
ספריות הלקוח מאפשרות לפתח בקלות באמצעות ממשקי ה-API של שירותי האינטרנט של מפות Google, על ידי מתן הטמעות פשוטות ונפוצות של משימות נפוצות, כמו אימות, הגבלת בקשות וניסיון חוזר אוטומטי. Geocoding API זמין בלקוח Java, בלקוח Python, בלקוח Go ובלקוח Node.js לשירותי מפות Google.
בדף שימוש וחיוב מפורטים פרטים על המכסות והתמחור של Geocoding API.
מדיניות
השימוש ב-Geocoding API חייב להתבצע בהתאם למדיניות ה-API.
מידע נוסף
יש עוד דברים שאפשר לעשות עם Geocoding API. ב מדריך למפתחים של Geocoding API תוכלו למצוא הדגמות, דוגמאות, פרמטרים זמינים, קודי סטטוס והודעות שגיאה ופרטים נוספים.
המדריך למפתחים של Geocoding API מתאר את שירות האינטרנט של Geocoding API. הוא מיועד למפתחי אתרים ואפליקציות לנייד שרוצים להשתמש בנתוני קידוד גיאוגרפי במפות שמספק אחד מממשקי ה-API של הפלטפורמה של מפות Google.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-08-16 (שעון UTC)."],[[["\u003cp\u003eThe Geocoding API converts addresses into geographic coordinates (geocoding) and vice versa (reverse geocoding).\u003c/p\u003e\n"],["\u003cp\u003eYou need a Google Cloud project with billing enabled and the Geocoding API enabled before using the service.\u003c/p\u003e\n"],["\u003cp\u003eAccess the Geocoding API through HTTP requests, specifying the address or coordinates and desired output format.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries are available for Java, Python, Go, and Node.js to simplify development with the API.\u003c/p\u003e\n"],["\u003cp\u003eUsage of the Geocoding API is subject to quotas, pricing, and policies outlined in the documentation.\u003c/p\u003e\n"]]],[],null,["**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| **Before you begin:** Before you start using the Geocoding API, you need a project with a billing account and the Geocoding API enabled. We recommend creating multiple Project Owners and Billing Administrators, so that you'll always have someone with these roles available to your team. To learn more, see [Set up in Cloud console](/maps/documentation/geocoding/cloud-setup).\n\nThe Geocoding API is a service that provides geocoding and reverse geocoding\nof addresses.\n| This service is also available as part of the client-side [Google Maps JavaScript\n| API](/maps/documentation/javascript/geocoding), or for server-side use with the [Java Client,\n| Python Client, Go Client and Node.js Client for Google Maps Services](/maps/documentation/geocoding/client-library).\n\n**Geocoding** is the process of converting addresses (like a street address)\ninto geographic coordinates (like latitude and longitude), which you can use to place markers\non a map, or position the map.\n\n**Reverse geocoding** is the process of converting geographic coordinates\ninto a human-readable address.\n\nYou can also use the Geocoding API to find the address for a\ngiven [place ID](/maps/documentation/geocoding/requests-places-geocoding).\n\nSample request and response\n\nYou access the Geocoding API through an HTTP interface. Following\nare examples of geocoding and [reverse geocoding](#reverse) requests.\n\nGeocoding request and response (latitude/longitude lookup)\n\nThe following example requests the latitude and longitude of \"1600 Amphitheatre\nParkway, Mountain View, CA\", and specifies that the output must be in JSON format. \n\n```carbon\nhttps://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY\n```\n\nYou can test this by entering the URL into your web browser (be sure to replace\n`YOUR_API_KEY` with [your actual API key](/maps/documentation/geocoding/get-api-key)).\nThe response includes the latitude and longitude of the address.\n\nView the [developer's guide](/maps/documentation/geocoding/overview)\nfor more information about\n[building geocoding request URLs](/maps/documentation/geocoding/overview#geocoding-requests) and\n[available parameters](/maps/documentation/geocoding/overview#geocoding)\nand [understanding the response](/maps/documentation/geocoding/overview#geocoding-requests).\n\nBelow is a sample geocoding response, in JSON: \n\n```carbon\n{\n \"results\" : [\n {\n \"address_components\" : [\n {\n \"long_name\" : \"1600\",\n \"short_name\" : \"1600\",\n \"types\" : [ \"street_number\" ]\n },\n {\n \"long_name\" : \"Amphitheatre Parkway\",\n \"short_name\" : \"Amphitheatre Pkwy\",\n \"types\" : [ \"route\" ]\n },\n {\n \"long_name\" : \"Mountain View\",\n \"short_name\" : \"Mountain View\",\n \"types\" : [ \"locality\", \"political\" ]\n },\n {\n \"long_name\" : \"Santa Clara County\",\n \"short_name\" : \"Santa Clara County\",\n \"types\" : [ \"administrative_area_level_2\", \"political\" ]\n },\n {\n \"long_name\" : \"California\",\n \"short_name\" : \"CA\",\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\" : \"94043\",\n \"short_name\" : \"94043\",\n \"types\" : [ \"postal_code\" ]\n }\n ],\n \"formatted_address\" : \"1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA\",\n \"geometry\" : {\n \"location\" : {\n \"lat\" : 37.4267861,\n \"lng\" : -122.0806032\n },\n \"location_type\" : \"ROOFTOP\",\n \"viewport\" : {\n \"northeast\" : {\n \"lat\" : 37.4281350802915,\n \"lng\" : -122.0792542197085\n },\n \"southwest\" : {\n \"lat\" : 37.4254371197085,\n \"lng\" : -122.0819521802915\n }\n }\n },\n \"place_id\" : \"ChIJtYuu0V25j4ARwu5e4wwRYgE\",\n \"plus_code\" : {\n \"compound_code\" : \"CWC8+R3 Mountain View, California, United States\",\n \"global_code\" : \"849VCWC8+R3\"\n },\n \"types\" : [ \"street_address\" ]\n }\n ],\n \"status\" : \"OK\"\n}\n```\n\nReverse geocoding request and response (address lookup)\n\nThe following example requests the address corresponding to a given latitude/longitude\nin Brooklyn, NY, USA. It specifies that the output must be in JSON format. \n\n```scdoc\nhttps://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&key=YOUR_API_KEY\n```\n\nYou can test this by entering the URL into your web browser (be sure to replace\n'YOUR_API_KEY' with [your actual API key](#get-a-key)).\nThe response includes a human-readable address for the latitude and longitude\nlocation.\n\nView the [developer's guide](/maps/documentation/geocoding/overview)\nfor more information about\n[building reverse geocoding request URLs](/maps/documentation/geocoding/overview#GeocodingRequests) and\n[available parameters](/maps/documentation/geocoding/overview#ReverseGeocoding)\nand [understanding the response](/maps/documentation/geocoding/overview#reverse-response).\n\nBelow is a sample reverse geocoding response, in JSON: \n\n```carbon\n{\n \"plus_code\" : {\n \"compound_code\" : \"P27Q+MC New York, NY, USA\",\n \"global_code\" : \"87G8P27Q+MC\"\n },\n \"results\" : [\n {\n \"address_components\" : [\n {\n \"long_name\" : \"279\",\n \"short_name\" : \"279\",\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\" : \"279 Bedford Ave, Brooklyn, NY 11211, USA\",\n \"geometry\" : {\n \"location\" : {\n \"lat\" : 40.7142484,\n \"lng\" : -73.9614103\n },\n \"location_type\" : \"ROOFTOP\",\n \"viewport\" : {\n \"northeast\" : {\n \"lat\" : 40.71559738029149,\n \"lng\" : -73.9600613197085\n },\n \"southwest\" : {\n \"lat\" : 40.71289941970849,\n \"lng\" : -73.96275928029151\n }\n }\n },\n \"place_id\" : \"ChIJT2x8Q2BZwokRpBu2jUzX3dE\",\n \"plus_code\" : {\n \"compound_code\" : \"P27Q+MC Brooklyn, New York, United States\",\n \"global_code\" : \"87G8P27Q+MC\"\n },\n \"types\" : [\n \"bakery\",\n \"cafe\",\n \"establishment\",\n \"food\",\n \"point_of_interest\",\n \"store\"\n ]\n },\n\n ... Additional results truncated in this example[] ...\n\n ],\n \"status\" : \"OK\"\n}\n```\n\nStart coding with our client libraries\n\nClient libraries make\ndeveloping with the Google Maps web service APIs easier by providing simple,\nnative implementations of common tasks, such as authentication, request\nthrottling and automatic retry. The Geocoding API is available\nin the\n[Java Client,\nPython Client, Go Client and Node.js Client for Google Maps Services](/maps/documentation/geocoding/client-library).\n\nAuthentication, quotas, pricing, and policies\n\nAuthentication\n\nTo use the Geocoding API, you must first enable the API\nand obtain the proper authentication credentials. For more information, see\n[Get Started with Google Maps Platform](https://developers.google.com/maps/get-started).\n\nQuotas and pricing\n\nReview the [usage and billing](/maps/documentation/geocoding/usage-and-billing)\npage for details on the quotas and pricing set for the Geocoding API.\n\nPolicies\n\nUse of the Geocoding API must be in accordance with the\n[API policies](/maps/documentation/geocoding/policies).\n\nLearn more\n\nThere's more you can do with the Geocoding API. See the\n[Geocoding API developer guide](/maps/documentation/geocoding/overview) for additional demos,\nexamples, available parameters, status codes and error messages, and other details.\n\nThe [Geocoding API developer guide](/maps/documentation/geocoding/overview) describes the\nGeocoding API web service. It is intended for website and mobile developers\nwho want to use geocoding data within maps provided by one of the Google Maps Platform\nAPIs."]]