با مجموعهها، منظم بمانید ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
توسعه دهندگان منطقه اقتصادی اروپا (EEA).
Geocoding API سرویسی است که geocoding و معکوس جغرافیایی آدرس ها را ارائه می دهد.
ژئوکدینگ فرآیند تبدیل آدرسها (مانند آدرس خیابان) به مختصات جغرافیایی (مانند طول و عرض جغرافیایی) است که میتوانید از آن برای قرار دادن نشانگرها روی نقشه یا موقعیتیابی نقشه استفاده کنید.
ژئوکدینگ معکوس فرآیند تبدیل مختصات جغرافیایی به یک آدرس قابل خواندن برای انسان است.
همچنین می توانید از Geocoding API برای یافتن آدرس شناسه مکان معین استفاده کنید.
نمونه درخواست و پاسخ
شما از طریق رابط HTTP به API Geocoding دسترسی دارید. در زیر نمونه هایی از درخواست های geocoding و معکوس جغرافیایی آورده شده است.
درخواست و پاسخ کدگذاری جغرافیایی (جستجوی طول و عرض جغرافیایی)
مثال زیر طول و عرض جغرافیایی "1600 Amphitheatre Parkway, Mountain View, CA" را درخواست می کند و مشخص می کند که خروجی باید در قالب JSON باشد.
میتوانید این مورد را با وارد کردن URL در مرورگر وب خود آزمایش کنید (حتماً YOUR_API_KEY با کلید API واقعی خود جایگزین کنید). پاسخ شامل طول و عرض جغرافیایی آدرس است.
میتوانید این مورد را با وارد کردن URL در مرورگر وب خود آزمایش کنید (حتماً «YOUR_API_KEY» را با کلید API واقعی خود جایگزین کنید). پاسخ شامل یک آدرس قابل خواندن برای انسان برای موقعیت جغرافیایی و طول جغرافیایی است.
در زیر یک نمونه پاسخ ژئوکدینگ معکوس در 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"}
برای استفاده از Geocoding API، ابتدا باید API را فعال کرده و اعتبار احراز هویت مناسب را دریافت کنید. برای اطلاعات بیشتر، شروع به کار با Google Maps Platform را ببینید.
سهمیه بندی و قیمت گذاری
صفحه استفاده و صورتحساب را برای جزئیات بیشتر در مورد سهمیه ها و قیمت گذاری تعیین شده برای Geocoding API مرور کنید.
سیاست ها
استفاده از Geocoding API باید مطابق با سیاست های API باشد.
بیشتر بدانید
کارهای بیشتری می توانید با Geocoding API انجام دهید. برای دموهای اضافی، مثالها، پارامترهای موجود، کدهای وضعیت و پیامهای خطا و سایر جزئیات، به راهنمای توسعهدهنده Geocoding API مراجعه کنید.
راهنمای توسعهدهنده Geocoding API سرویس وب Geocoding API را توضیح میدهد. این برای توسعه دهندگان وب سایت و تلفن همراه است که می خواهند از داده های رمزگذاری جغرافیایی در نقشه های ارائه شده توسط یکی از API های پلتفرم Google Maps استفاده کنند.
تاریخ آخرین بهروزرسانی 2025-08-15 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-15 بهوقت ساعت هماهنگ جهانی."],[[["\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."]]