Places API هي خدمة تقبل طلبات HTTP لبيانات المواقع الجغرافية
من خلال مجموعة متنوعة من الطرق. ويعرض بيانات المواقع الجغرافية بتنسيق معيّن
ومشاهد عن المنشآت أو المواقع الجغرافية أو
الأماكن المهمة.
.
أهمية استخدام Places API (الإصدار الجديد)
أنشئ ميزات تستند إلى الموقع الجغرافي لإتاحة بيانات الموقع الجغرافي المفصّلة
للمستخدمين. إنّ البيانات المتاحة من خلال واجهة برمجة التطبيقات
Places API (الإصدار الجديد) مستندة إلى أحد نماذج الأماكن الأكثر دقة وحداثة
وشمولاً في العالم الواقعي. في ما يلي أمثلة على حالات استخدام التطبيقات:
عرض شقق للإيجار في المدن الكبرى مع نتائج
مستهدفة للمدن على وجه التحديد
يمكنك تضمين تفاصيل المكان في تعديل حالة الاستلام أو التسليم.
عرض قائمة بالمتنزهات في منطقة معيّنة مع
الصور والمراجعات التي أرسلها المستخدمون
وفِّر للأشخاص الذين يخطّطون لرحلات معلومات الاتصال والمراجعات
ومستويات الأسعار للمنشآت على طول المسار.
الإجراءات التي يمكنك تنفيذها باستخدام Places API (الإصدار الجديد)
يمكنك استخدام Places API (الإصدار الجديد) لتضمين الميزات التالية
في تطبيقاتك:
يجب تقديم نتائج بحث عن الأماكن من أنواع مختلفة من طلبات بحث المستخدمين،
مثل الإدخال النصي والمواقع الجغرافية المجاورة وطلبات بحث المستخدمين المُبهمة أو الفئوية.
فعِّل ميزات الإكمال التلقائي لأنواع البحث المختلفة، سواء كانت
طلبات بحث نصية محدّدة أو طلبات بحث تصنيفية.
يمكنك تحسين نوع التفاصيل التي يتم عرضها عن مكان معيّن، مثل
ساعات العمل والملخّص ومراجعات المستخدمين والصور.
أضِف صورًا عالية الجودة إلى المواقع الجغرافية التي يعرضها تطبيقك.
تتيح العديد من واجهات برمجة التطبيقات في "منصّة خرائط Google" استخدام أرقام تعريف الأماكن، حيث يحدِّد رقم تعريف المكان مكانًا بشكلٍ فريد في قاعدة بيانات "أماكن Google" وعلى "خرائط Google". هناك العديد من الطرق للحصول على معرّف مكان، بما في ذلك
واجهة برمجة التطبيقات Places API (الجديدة)، ولكن أيضًا من Geocoding API وRoutes API وAddress Validation API.
بعد الحصول على معرّف مكان، يمكنك استخدام Places API (الإصدار الجديد) لطلب
مزيد من التفاصيل عن مؤسسة أو نقطة اهتماًم معيّنة، مثل العنوان الكامل ورقم الهاتف وتقييم المستخدمين والمراجعات.
طريقة عمل Places API (الإصدار الجديد)
تقبل Places API (الإصدار الجديد) الطلبات كعنوان URL عادي مع نقطة نهاية خدمة
محددة، مثل /places أو
places:searchText، وتعرض استجابة JSON.
تتيح Places API (الإصدار الجديد) التفويض باستخدام مفتاح واجهة برمجة التطبيقات والرمز المميّز لبروتوكول OAuth.
يُجري المثال التالي طلبًا بعنوان "تفاصيل المكان (جديد)" لعرض
عناصر العنوان لمعرّف مكان باستخدام مفتاح واجهة برمجة التطبيقات:
تتناول الخطوات أدناه سيناريو حالة استخدام نموذجيًا لاستخدام خدمة Places
API. أثناء إنشاء الحلّ، يمكنك استخدام نقاط نهاية إضافية، مثل "البحث عن الأماكن المجاورة" (ميزة جديدة) و"صور الأماكن" (ميزة جديدة).
استخدام رقم تعريف المكان للحصول على مزيد من التفاصيل
تعرض العديد من واجهات برمجة تطبيقات "منصّة خرائط Google" معرّف مكان كجزء من
الاستجابة. استخدِم أرقام تعريف الأماكن للحصول على تفاصيل الأماكن (الميزة الجديدة).
4
الحصول على صورة لمكان
تتيح لك ميزة "صور الأماكن" (الإصدار الجديد) الوصول إلى ملايين
الصور المخزّنة في قاعدة بيانات "الأماكن". استخدِم صور الأماكن (ميزة جديدة) ل
الوصول إلى صور مكان معيّن.
تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe Places API provides location data and imagery for establishments, geographic locations, and points of interest through various methods.\u003c/p\u003e\n"],["\u003cp\u003eYou can use the Places API to create location-aware features, such as place search, autocomplete, details retrieval, and photo integration.\u003c/p\u003e\n"],["\u003cp\u003eThe Places API offers two versions: Places API and Places API (New), with differences outlined in a guide for choosing the best fit for your project.\u003c/p\u003e\n"],["\u003cp\u003eYou can access places data through requests to specific service endpoints using an API key or OAuth token, receiving responses in JSON or XML format.\u003c/p\u003e\n"],["\u003cp\u003eDetailed steps for using the API include setup, text search, place details retrieval using place IDs, and accessing place photos.\u003c/p\u003e\n"]]],[],null,["# Overview\n\nSelect platform: [Android](/maps/documentation/places/android-sdk/overview \"View this page for the Android platform docs.\") [iOS](/maps/documentation/places/ios-sdk/overview \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/place \"View this page for the JavaScript platform docs.\") [Web Service](/maps/documentation/places/web-service/overview \"View this page for the Web Service platform docs.\") \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\nIntroduction\n------------\n\nThe Places API is a service that accepts HTTP requests for location data through a variety of methods. It returns formatted location data and imagery about establishments, geographic locations, or prominent points of interest. **Note:** Google Maps Platform provides separate versions of the Places library for [Android](/maps/documentation/places/android-sdk/overview), [iOS](/maps/documentation/places/ios-sdk/overview), and [JavaScript](/maps/documentation/javascript/places). We recommend that you use the version of the Places library specific to your platform. That is, if you are developing an Android app, you should use the Android version of Places.\n\nWhy use the Places API (New)\n----------------------------\n\nCreate location-aware features to make detailed location data\navailable to your users. The data available through the\nPlaces API (New) is built on one of the most accurate, up-to-date,\nand comprehensive place models of the real world. Here are example use\ncases for applications:\n\n- Display condo rentals within major metropolitan areas with results targeted specifically to cities.\n- Include place details in a pickup or delivery status update.\n- Display a list of parks in an area along with user-submitted photos and reviews.\n- Provide people planning trips with contact information, reviews, and price levels for establishments along the way.\n\n| **Note:** Places API (New) is the current version. Places API is now Legacy and can no longer be enabled. Legacy documentation and migration guides are available on the [Legacy](/maps/documentation/places/web-service/overview-legacy) tab.\n\nWhat can you do with the Places API (New)\n-----------------------------------------\n\nYou can use the Places API (New) to include the following features\nin your applications:\n\n- Provide place search results from different types of users queries, such as text input, nearby locations, and ambiguous or categorical user queries.\n- Enable autocomplete features for different search types, either specific text queries or categorical queries.\n- Refine the type of details returned about a place, such as operating hours, a summary, user reviews, and a photo.\n- Add high-quality photos to locations served by your application.\n\nMany Google Maps Platform APIs support [place IDs](/maps/documentation/places/web-service/place-id), where\nthe place ID uniquely identifies a place in the Google Places database and\non Google Maps. There are many ways to obtain a place ID, including from\nthe Places API (New), but also from the [Geocoding API](/maps/documentation/geocoding), [Routes API](/maps/documentation/routes), and [Address Validation API](/maps/documentation/address-validation).\n\nOnce you have a place ID, you can use the Places API (New) to\nrequest more details about a particular establishment or point of\ninterest, such as its complete address, phone number, user rating, and\nreviews.\n\nHow the Places API (New) works\n------------------------------\n\nPlaces API (New) accepts requests as a standard URL with a\nspecific service endpoint, such as `/places` or\n`places:searchText` and returns a JSON response.\nPlaces API (New) supports authorization by API key and OAuth token.\nThe following example makes a Place Details (New) request to return\nthe address components for a place ID using an API key: \n\n```html\nhttps://places.googleapis.com/v1/places/GyuEmsRBfy61i59si0?fields=addressComponents&key=YOUR_API_KEY\n```\n\nHow to use the Places API (New)\n-------------------------------\n\nThe steps below cover a typical use case scenario for using the Places API service. As you build out your solution, you can use additional endpoints, such as Nearby Search (New) and Place Photos (New).\n\n|---|---------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Get set up** | Start with [Set up your Google Cloud project](/maps/documentation/elevation/cloud-setup) and complete the setup instructions that follow and then learn [how to use your API key](/maps/documentation/places/web-service/get-api-key). |\n| 2 | **Try a basic text search** | Issue a text search by using [Text Search (New)](/maps/documentation/places/web-service/text-search). |\n| 3 | **Use the place ID for more details** | Many Google Maps Platform APIs return a place ID as part of a response. Use place IDs to get [Place Details (New)](/maps/documentation/places/web-service/place-details). |\n| 4 | **Get a photo for a place** | Place Photos (New) gives you access to the millions of photos stored in the Places database. Use [Place Photos (New)](/maps/documentation/places/web-service/place-photos) to access photos for a place. |"]]