يمكنك الوصول إلى Elevation API من خلال واجهة HTTP، مع
الطلبات التي تم إنشاؤها كسلسلة عنوان URL، باستخدام إحداثيات خط الطول/العرض لتحديد
المواقع الجغرافية أو رؤوس المسار. يجب أن تتضمّن الطلبات مفتاح واجهة برمجة التطبيقات.
يطلب المثال التالي بيانات الارتفاع في مدينة دنفر بولاية كولورادو، والتي تُعرف باسم
"مدينة الميل العالي"، بتنسيق JSON:
يمكنك اختبار ذلك من خلال إدخال عنوان URL في متصفّح الويب (احرص على استبدال
YOUR_API_KEY بـ مفتاح واجهة برمجة التطبيقات الفعلي).
تتضمّن الإجابة الارتفاع في تلك النقطة، بالكيلومترات، بالإضافة إلى
قيمة الدقة (الحد الأقصى للمسافة بين نقاط البيانات التي تم من خلالها
الاستقراء للارتفاع، بالكيلومترات).
تسهّل مكتبات العملاء تطوير التطبيقات باستخدام واجهات برمجة تطبيقات خدمة الويب في "خرائط Google" من خلال توفير عمليات تنفيذ بسيطة ومضمّنة للمهام الشائعة، مثل المصادقة وتقييد معدل إرسال الطلبات وإعادة المحاولة التلقائية. تتوفّر Elevation API
في
Java Client
وعميل Python وعميل Go وعميل Node.js لخدمات "خرائط Google".
المصادقة والحصص والأسعار والسياسات
المصادقة
لاستخدام Elevation API، عليك أولاً تفعيل واجهة برمجة التطبيقات والحصول على بيانات اعتماد مصادقة مناسبة. لمزيد من المعلومات، يُرجى الاطّلاع على
بدء استخدام "منصة خرائط Google".
الحصص والأسعار
راجِع صفحة الاستخدام والفوترة
للاطّلاع على تفاصيل حول الحصص والأسعار المحدّدة لواجهة Elevation API.
دليل مطوّري Elevation API مخصّص لمطوّري المواقع الإلكترونية
والتطبيقات المتوافقة مع الأجهزة الجوّالة الذين يريدون استخدام بيانات الارتفاع ضمن الخرائط التي تقدّمها إحدى
واجهات برمجة التطبيقات في "منصّة خرائط Google". وتوفّر مقدّمة عن استخدام واجهة برمجة التطبيقات ومرجعًا
عن المَعلمات المتاحة.
تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe Elevation API provides elevation data for all locations on the surface of the earth, including ocean floor depths.\u003c/p\u003e\n"],["\u003cp\u003eYou can access the Elevation API through an HTTP interface using latitude/longitude coordinates, requiring an API key for requests.\u003c/p\u003e\n"],["\u003cp\u003eThe API can be used with client-side Maps JavaScript API or server-side with Java, Python, Go, and Node.js client libraries.\u003c/p\u003e\n"],["\u003cp\u003eA billing account and enabled Elevation API are prerequisites for using the API, and creating multiple project owners/billing administrators is recommended.\u003c/p\u003e\n"]]],[],null,["| **Before you begin:** Before you start using the Elevation API, you need a project with a billing account and the Elevation 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/elevation/cloud-setup).\n\nThe Elevation API provides elevation data for all locations on the\nsurface of the earth, including depth locations on the ocean floor (which\nreturn negative values). \nThis service is also available as part of the client-side\n[Maps JavaScript API](/maps/documentation/javascript/elevation),\nor for server-side use with the\n[Java Client,\nPython Client, Go Client and Node.js Client for Google Maps Services](/maps/documentation/elevation/client-library).\n\nSample request and response\n\nYou access the Elevation API through an HTTP interface, with\nrequests constructed as a URL string, using latitude/longitude coordinates to\nidentify the locations or path vertices. Requests must include your API key.\n\nThe following example requests the elevation for Denver, Colorado, the\n\"Mile High City\", in JSON format: \n\nURL \n\n```scdoc\nhttps://maps.googleapis.com/maps/api/elevation/json\n ?locations=39.7391536%2C-104.9847034\n &key=YOUR_API_KEY\n```\n\ncURL \n\n```bash\ncurl -L -X GET 'https://maps.googleapis.com/maps/api/elevation/json?locations=39.7391536%2C-104.9847034&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 the elevation at that point, in meters, along with\nthe resolution value (the maximum distance between data points from which the\nelevation was interpolated, in meters).\n\nView the [developer's guide](/maps/documentation/elevation/overview)\nfor more information about\n[building request URLs and available parameters](/maps/documentation/elevation/overview#ElevationRequests)\nand [understanding the response](/maps/documentation/elevation/overview#ElevationResponses).\n\nBelow is a sample response: \n\nJSON \n\n```json\n{\n \"results\":\n [\n {\n \"elevation\": 1608.637939453125,\n \"location\": { \"lat\": 39.7391536, \"lng\": -104.9847034 },\n \"resolution\": 4.771975994110107,\n },\n ],\n \"status\": \"OK\",\n}\n```\n\nXML \n\n```xml\n\u003cElevationResponse\u003e\n \u003cstatus\u003eOK\u003c/status\u003e\n \u003cresult\u003e\n \u003clocation\u003e\n \u003clat\u003e39.7391536\u003c/lat\u003e\n \u003clng\u003e-104.9847034\u003c/lng\u003e\n \u003c/location\u003e\n \u003celevation\u003e1608.6379395\u003c/elevation\u003e\n \u003cresolution\u003e4.7719760\u003c/resolution\u003e\n \u003c/result\u003e\n\u003c/ElevationResponse\u003e\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 Elevation API is available\nin the\n[Java Client,\nPython Client, Go Client and Node.js Client for Google Maps Services](/maps/documentation/elevation/client-library).\n\nAuthentication, quotas, pricing, and policies\n\nAuthentication\n\nTo use the Elevation API, you must first enable the API and obtain the proper\nauthentication credentials. For more information, see\n[Get Started with Google Maps Platform](/maps/get-started).\n\nQuotas and pricing\n\nReview the [usage and billing](/maps/documentation/elevation/usage-and-billing)\npage for details on the quotas and pricing set for the Elevation API.\n\nPolicies\n\nUse of the Elevation API must be in accordance with the\n[API policies](/maps/documentation/elevation/policies).\n\nLearn more\n\nThere's more you can do with the Elevation API, like\n[requesting elevation data\nfrom multiple locations](/maps/documentation/elevation/overview#PointElevation). See the [Elevation API Developer's Guide](/maps/documentation/elevation/overview) for more\nexamples and other details.\n\nThe [Elevation API Developer's Guide](/maps/documentation/elevation/overview) is intended for website and\nmobile developers who want to use elevation data within maps provided by one of the\nGoogle Maps Platform APIs. It provides an introduction to using the API and reference\nmaterial on the available parameters."]]