هذا المنتج أو هذه الميزة في حالة "قديم". لمزيد من المعلومات عن الحالة "قديمة"، يُرجى الاطّلاع على المنتجات والميزات القديمة. لنقل البيانات إلى Places API (الإصدار الجديد)، يُرجى الاطّلاع على دليل نقل البيانات.
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
المطوّرون في المنطقة الاقتصادية الأوروبية
مقدمة
تتيح لك Places API البحث عن معلومات حول مجموعة متنوعة من أنواع الأماكن واستردادها باستخدام سلسلة نصية أو حسب القرب. Places API (الإصدار القديم) هو الإصدار القديم من Places API (الإصدار الجديد).
يعرض الجدول التالي الإصدارات المتوافقة من كلتا واجهتَي برمجة التطبيقات. استخدِم هذا الدليل للتعرّف على الاختلافات الرئيسية بينهما ونقل البيانات إلى Places API (الجديدة).
يجب أن تستخدم جميع الطلبات التي تستخدم واجهة برمجة التطبيقات القديمة وتتضمّن طلب بحث نصيًا
البحث النصي (جديد)
لأنّ "البحث في الأماكن القريبة (جديد)" لا يتيح إدخال نص.
الميزات الرئيسية التي تمت إضافتها إلى Places API (جديدة)
يتناول هذا القسم الميزات الرئيسية التي تمت إضافتها إلى Places API (الجديدة).
تم تنفيذه على منصة Google Cloud العادية
يتم تنفيذ Places API (جديدة) على البنية التحتية للخدمة على Google Cloud. يوفّر هذا التنفيذ منصة أكثر أمانًا وموثوقية مع خيارات أمان محسّنة، مثل OAuth. يوفّر تصميم واجهة برمجة التطبيقات العادي هذا مستوى من الاتساق بين واجهات برمجة التطبيقات، ما يحسّن من كفاءة عملية التطوير باستخدام Places API (New).
تحسين الأداء
توفّر Places API (الجديدة) أداءً محسّنًا، ما يجعلها خيارًا مناسبًا لاستبدال التطبيقات التي تستخدم Places API الحالية.
الأسعار المبسّطة
تم تبسيط الأسعار في Places API (الجديدة) بحيث لا تدفع إلا مقابل البيانات التي تستخدمها. يتم تنفيذ التسعير المبسّط باستخدام قناع
حقل.
باستخدام Place Details (New) وNearby Search (New) وText Search (New)، يمكنك استخدام قناع الحقل للتحكّم في قائمة الحقول التي سيتم عرضها في الرد. بعد ذلك، يتم تحصيل الرسوم منك مقابل البيانات المطلوبة فقط. يُعدّ استخدام إخفاء الحقول من أفضل ممارسات التصميم لضمان عدم طلب بيانات غير ضرورية، ما يساعد في تجنُّب وقت المعالجة غير الضروري ورسوم الفوترة.
بيانات الاستجابة المتسقة لمكان معيّن
باستخدام واجهات برمجة التطبيقات القديمة، كانت واجهات Place Details (Legacy) وNearby Search (Legacy) وText Search (Legacy) تعرض بيانات ردود مختلفة لمكان معيّن.
تعمل واجهة Places API (الجديدة) على توحيد الاستجابة، وبالتالي تعرض جميع واجهات برمجة التطبيقات هذه البيانات نفسها عن مكان معيّن.
أنواع الأماكن الموسّعة
يمكن أن تتضمّن استجابة واجهة برمجة التطبيقات الآن النوع الأساسي لمكان. يمكن أن يتضمّن كل مكان قيمة نوع واحدة يتم تحديدها كنوع أساسي للمكان، كما هو موضّح في الجدول أ.
تتضمّن واجهة برمجة التطبيقات الجديدة أيضًا عدة أنواع جديدة. يمكنك استخدام هذه الأنواع الجديدة والأنواع الحالية في عملية بحث باستخدام "البحث في الأماكن القريبة (جديد)" و"البحث النصي (جديد)". يتم تضمين الأنواع الجديدة في الجدول
أ.
بيانات الأماكن الديناميكية
تتيح Places API (New) بيانات الردود الديناميكية، مثل مدى توفّر محطة شحن للمركبات الكهربائية أو أحدث أسعار الوقود في محطة وقود. استخدِم حقول الردود هذه لإنشاء تجارب مستخدم ديناميكية.
تاريخ التعديل الأخير: 2025-09-05 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-09-05 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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\nIntroduction\n\nThe Places API lets you search for and retrieve information for a variety of\nplace types using a text string or by proximity. Places API (Legacy) is the legacy\nversion of\n[Places API (New)](/maps/documentation/places/web-service/op-overview).\n\nThe following table lists the corresponding versions of both APIs. Use this\nguide to understand the key differences between the two and migrate to\nPlaces API (New).\n\n| Places API (Legacy) | Places API (New) | Notes |\n|------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Find Place (Legacy)](/maps/documentation/places/web-service/search-find-place) | [Text Search (New)](/maps/documentation/places/web-service/text-search) | There is no new version of Find Place (Legacy). Text Search (New) has replaced it. |\n| [Nearby Search (Legacy)](/maps/documentation/places/web-service/search-nearby) | [Nearby Search (New)](/maps/documentation/places/web-service/nearby-search) | All requests using the legacy API that include a text query should use [Text Search (New)](/maps/documentation/places/web-service/text-search) because Nearby Search (New) does not support text input. |\n| [Text Search (Legacy)](/maps/documentation/places/web-service/search-text) | [Text Search (New)](/maps/documentation/places/web-service/text-search) | |\n| [Place Details (Legacy)](/maps/documentation/places/web-service/details) | [Place Details (New)](/maps/documentation/places/web-service/place-details) | |\n| [Place Photos (Legacy)](/maps/documentation/places/web-service/photos) | [Place Photos (New)](/maps/documentation/places/web-service/place-photos) | |\n| [Place Autocomplete (Legacy)](/maps/documentation/places/web-service/autocomplete) | [Autocomplete (New)](/maps/documentation/places/web-service/place-autocomplete) | |\n| [Query Autocomplete (Legacy)](/maps/documentation/places/web-service/query) | [Autocomplete (New)](/maps/documentation/places/web-service/place-autocomplete) | Capabilities added to Autocomplete (New). |\n\nMigrate to the new APIs\n\nTo migrate to the new APIs, see the following migration guides:\n\n- [Migrate to Nearby Search (New)](/maps/documentation/places/web-service/migrate-nearby)\n- [Migrate to Text Search (New)](/maps/documentation/places/web-service/migrate-text)\n- [Migrate to Place Details (New)](/maps/documentation/places/web-service/migrate-details)\n- [Migrate to Place Photos (New)](/maps/documentation/places/web-service/migrate-photo)\n- [Migrate to Autocomplete (New)](/maps/documentation/places/web-service/migrate-autocomplete)\n\nKey features added to Places API (New)\n\nThis section covers key features added to Places API (New).\n\nImplemented on the Google Cloud standard platform\n\nPlaces API (New) is implemented on the [service\ninfrastructure](https://cloud.google.com/service-infrastructure/docs/overview)\non Google Cloud. This implementation brings with it a more secure and trusted\nplatform with enhanced security options like\n[OAuth](/maps/documentation/places/web-service/oauth-token). This standard API\ndesign brings a level of consistency across the APIs that improve the efficiency\nof development with Places API (New).\n\nImproved performance\n\nPlaces API (New) provides improved performance, making it worthwhile to\nreplace apps that use the existing Places API.\n\nSimplified pricing\n\nPricing is simplified with Places API (New) so that you only pay for the\ndata you use. Simplified pricing is implemented using a [field\nmask](/maps/documentation/places/web-service/choose-fields).\n\nWith Place Details (New), Nearby Search (New), and\nText Search (New) you use the field mask to control the list of fields to\nreturn in the response. You are then only billed for the data requested. Using\nfield masking is a good design practice to ensure that you don't request\nunnecessary data, which helps to avoid unnecessary processing time and billing\ncharges.\n\nConsistent response data for a place\n\nWith the legacy APIs, the Place Details (Legacy), Nearby Search (Legacy), and\nText Search (Legacy) APIs returned different response data for a place.\nPlaces API (New) standardizes the response so these APIs all return the\nsame data for a place.\n\nExpanded place types\n\nThe API response can now contain a place's *primary type* . Every place can have\na single type value that is specified as the place's primary type, as listed in\n[Table A](/maps/documentation/places/web-service/place-types#table-a).\n\nThe new API also includes several new types. You can use these new types, and\nthe existing types, in a search with Nearby Search (New)\nand Text Search (New). The new types are all included in [Table\nA](/maps/documentation/places/web-service/place-types#table-a).\n\nDynamic place data\n\nPlaces API (New) supports dynamic response data, such as the availability\nof an EV charging station or the latest fuel prices for a gas station. Use these\nresponse fields to create dynamic user experiences."]]