العثور على مكان (الإصدار القديم)

المطوّرون في المنطقة الاقتصادية الأوروبية

يتلقّى طلب Find Place (الإصدار القديم) إدخالاً نصيًا ويعرض مكانًا. يمكن أن يكون الإدخال أي نوع من البيانات النصية في "أماكن Google"، مثل الاسم أو العنوان أو رقم الهاتف. يجب أن يكون الطلب سلسلة. يؤدي طلب Find Place (Legacy) الذي يستخدم بيانات غير نصية، مثل إحداثيات خطوط الطول والعرض أو رمز موقع مفتوح، إلى حدوث خطأ.

طلبات Find Place (القديمة)

طلب Find Place (الإصدار القديم) هو عنوان URL بتنسيق HTTP على النحو التالي:

https://maps.googleapis.com/maps/api/place/findplacefromtext/output?parameters

حيث يمكن أن تكون output إحدى القيمتين التاليتين:

  • json (موصى به) يشير إلى الإخراج بتنسيق JavaScript Object Notation ‏ (JSON)
  • يشير xml إلى الناتج بتنسيق XML

يجب توفُّر مَعلمات معيّنة لبدء طلب Find Place (Legacy). وكما هو معتاد في عناوين URL، يتم الفصل بين جميع المَعلمات باستخدام رمز العطف اللاتيني (&).

المعلمات المطلوبة

  • إدخال

    سلسلة النص المطلوب البحث فيها، على سبيل المثال: "مطعم" أو "123 شارع رئيسي". يجب أن يكون اسم مكان أو عنوانًا أو فئة من المؤسسات. يمكن أن تؤدي أي أنواع أخرى من الإدخالات إلى حدوث أخطاء، ولا نضمن عرض نتائج صالحة. ستعرض Places API نتائج مطابقة محتملة استنادًا إلى هذه السلسلة، وسترتّب النتائج حسب مدى صلتها بموضوع البحث.

  • inputtype

    نوع الإدخال يمكن أن يكون ذلك أحد الخيارين textquery أو phonenumber. يجب أن تكون أرقام الهواتف بالتنسيق الدولي (تبدأ بعلامة زائد ("+")، متبوعة برمز البلد، ثم رقم الهاتف نفسه). يمكنك الاطّلاع على توصية الاتحاد الدولي للاتصالات E.164 لمزيد من المعلومات.

المعلمات الاختيارية

  • fields

    تنبيه: لا تعرض طلبات البحث عن الأماكن وطلبات تفاصيل المكان الحقول نفسها. تعرض طلبات البحث عن الأماكن مجموعة فرعية من الحقول التي تعرضها طلبات تفاصيل المكان. إذا لم يعرض طلب البحث عن الأماكن الحقل الذي تريده، يمكنك استخدام طلب البحث عن الأماكن للحصول على place_id، ثم استخدام معرّف المكان هذا لتقديم طلب تفاصيل المكان. لمزيد من المعلومات حول الحقول غير المتوفّرة في طلب بحث عن مكان، يُرجى الاطّلاع على الحقول المتوافقة مع Places API.

    استخدِم مَعلمة الحقول لتحديد قائمة بأنواع بيانات الأماكن مفصولة بفواصل، وذلك لعرضها. على سبيل المثال: fields=formatted_address,name,geometry. استخدِم شرطة مائلة للأمام عند تحديد قيم مركّبة. على سبيل المثال: opening_hours/open_now.

    تنقسم الحقول إلى ثلاث فئات للفوترة: أساسية جهة الاتصال الجو. تتم فوترة الحقول الأساسية بالسعر الأساسي، بينما تتم فوترة حقول "جهة الاتصال" و"الغلاف الجوي" بسعر أعلى. يتم تحصيل رسوم عن وحدات SKU الأساسية ووحدات SKU الخاصة بجهات الاتصال ووحدات SKU الخاصة بالأجواء، وذلك بالإضافة إلى وحدة SKU الأساسية (تفاصيل الأماكن أو البحث عن مكان أو البحث القريب أو البحث النصي) للطلب الذي أدى إلى ظهورها. لمزيد من المعلومات، يُرجى الاطّلاع على جدول الأسعار.

    أساسية

    تتضمّن الفئة "أساسية" الحقول التالية: address_components وadr_address وbusiness_status وformatted_address وgeometry وicon وicon_mask_base_uri وicon_background_color وname وpermanently_closed (تم إيقافه نهائيًا) وphoto وplace_id وplus_code وtype وurl وutc_offset وvicinity وwheelchair_accessible_entrance.

    التواصل

    تتضمّن فئة "جهة الاتصال" الحقول التالية: current_opening_hours وformatted_phone_number وinternational_phone_number وopening_hours وsecondary_opening_hours وwebsite

    الأجواء

    تتضمّن فئة "الغلاف الجوي" الحقول التالية: curbside_pickup وdelivery وdine_in وeditorial_summary وprice_level وrating وreservable وreviews وserves_beer وserves_breakfast وserves_brunch وserves_dinner وserves_lunch وserves_vegetarian_food وserves_wine وtakeout وuser_ratings_total.

    ملاحظة: يتم دائمًا عرض بيانات تحديد المصدر، html_attributions، مع كل طلب، بغض النظر عمّا إذا كان قد تم طلب الحقل.
  • language

    اللغة التي سيتم عرض النتائج بها

    • اطّلِع على قائمة اللغات المتاحة. يُجري محرّك بحث Google تحديثات على اللغات المتوافقة بشكل متكرر، لذا قد لا تكون هذه القائمة شاملة.
    • في حال عدم توفير language، تحاول واجهة برمجة التطبيقات استخدام اللغة المفضّلة كما هو محدّد في العنوان Accept-Language.
    • تبذل واجهة برمجة التطبيقات قصارى جهدها لتوفير عنوان شارع يمكن قراءته من قِبل المستخدمين والسكان المحليين. لتحقيق هذا الهدف، تعرض الخدمة عناوين الشوارع باللغة المحلية، مع ترجمتها إلى نص يمكن للمستخدم قراءته إذا لزم الأمر، مع مراعاة اللغة المفضّلة. ويتم عرض جميع العناوين الأخرى باللغة المفضّلة. يتم عرض جميع مكونات العنوان باللغة نفسها، والتي يتم اختيارها من المكون الأول.
    • إذا لم يتوفّر اسم باللغة المفضّلة، تستخدم واجهة برمجة التطبيقات أقرب نتيجة مطابِقة.
    • تؤثر اللغة المفضّلة بشكل طفيف في مجموعة النتائج التي تختار واجهة برمجة التطبيقات عرضها، وفي ترتيب عرضها. يفسّر برنامج الترميز الجغرافي الاختصارات بشكل مختلف حسب اللغة، مثل اختصارات أنواع الشوارع أو المرادفات التي قد تكون صالحة في لغة ما ولكن ليس في لغة أخرى. على سبيل المثال، utca وtér هما كلمتان مترادفتان لكلمة "شارع" باللغة الهنغارية.
  • locationbias

    تفضيل النتائج في منطقة محدّدة، وذلك من خلال تحديد إما نصف قطر بالإضافة إلى خطوط الطول والعرض، أو زوجَين من خطوط الطول والعرض يمثّلان نقطتَي مستطيل في حال عدم تحديد هذه المَعلمة، تستخدم واجهة برمجة التطبيقات ميزة "تفضيل عنوان IP" تلقائيًا.

    • تحيز عنوان IP: يوجّه واجهة برمجة التطبيقات إلى استخدام تحيز عنوان IP. مرِّر السلسلة ipbias (لا يتضمّن هذا الخيار أي مَعلمات إضافية).
    • دائري: سلسلة تحدّد نصف القطر بالأمتار، بالإضافة إلى خطوط الطول والعرض بالدرجات العشرية استخدِم التنسيق التالي: circle:radius@lat,lng.
    • مستطيل: سلسلة تحدّد زوجَين من خطوط الطول والعرض بالدرجات العشرية، يمثّلان النقطتَين الجنوبية الغربية والشمالية الشرقية من المستطيل. استخدِم التنسيق التالي:rectangle:south,west|north,east. يُرجى العِلم بأنّه يتم تقريب قيم الشرق/الغرب إلى النطاق -180، 180، ويتم تثبيت قيم الشمال/الجنوب في النطاق -90، 90.

أمثلة على Find Place (الإصدار القديم)

يعرض المثال التالي طلبًا من Find Place (الإصدار القديم) للمكان "متحف الفن المعاصر في أستراليا"، بما في ذلك الحقول photos وformatted_address وname وrating وopening_hours وgeometry:

عنوان URL

https://maps.googleapis.com/maps/api/place/findplacefromtext/json
  ?fields=formatted_address%2Cname%2Crating%2Copening_hours%2Cgeometry
  &input=Museum%20of%20Contemporary%20Art%20Australia
  &inputtype=textquery
  &key=YOUR_API_KEY

cURL

curl -L -X GET 'https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=Museum%20of%20Contemporary%20Art%20Australia&inputtype=textquery&fields=formatted_address%2Cname%2Crating%2Copening_hours%2Cgeometry&key=YOUR_API_KEY'

يعرض المثال التالي طلبًا إلى Find Place (الإصدار القديم) بشأن "مطعم Mongolian Grill"، باستخدام المَعلمة locationbias لتفضيل النتائج التي تقع ضمن 2,000 متر من الإحداثيات المحدّدة:

عنوان URL

https://maps.googleapis.com/maps/api/place/findplacefromtext/json
  ?fields=formatted_address%2Cname%2Crating%2Copening_hours%2Cgeometry
  &input=mongolian
  &inputtype=textquery
  &locationbias=circle%3A2000%4047.6918452%2C-122.2226413
  &key=YOUR_API_KEY

cURL

curl -L -X GET 'https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=mongolian&inputtype=textquery&locationbias=circle%3A2000%4047.6918452%2C-122.2226413&fields=formatted_address%2Cname%2Crating%2Copening_hours%2Cgeometry&key=YOUR_API_KEY'

يعرض المثال التالي طلب Find Place (Legacy) للحصول على رقم هاتف. يُرجى العِلم أنّه تم ترميز بادئة المكالمة الدولية "+" إلى %2B لكي يكون هذا الطلب عنوان URL متوافقًا. إذا لم يتم ترميز البادئة +، سيتم فك ترميزها إلى مسافة على الخادم، ما يؤدي إلى بحث غير صالح عن رقم الهاتف.

عنوان URL

https://maps.googleapis.com/maps/api/place/findplacefromtext/json
  ?input=%2B16502530000
  &inputtype=phonenumber
  &key=YOUR_API_KEY

cURL

curl -L -X GET 'https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=%2B16502530000&inputtype=phonenumber&key=YOUR_API_KEY'

ردود Find Place (الإصدار القديم)

لا تحتوي استجابة Find Place (الإصدار القديم) إلا على أنواع البيانات التي تم تحديدها باستخدام المَعلمة fields، بالإضافة إلى html_attributions. يعرض المثال التالي الردّ على طلب Find Place (الإصدار القديم) بشأن "متحف الفن المعاصر في أستراليا"، بما في ذلك الحقول formatted_address وgeometry وname وopening_hours وphotos وrating.

JSON

{
  "candidates":
    [
      {
        "formatted_address": "140 George St, The Rocks NSW 2000, Australia",
        "geometry":
          {
            "location": { "lat": -33.8599358, "lng": 151.2090295 },
            "viewport":
              {
                "northeast":
                  { "lat": -33.85824377010728, "lng": 151.2104386798927 },
                "southwest":
                  { "lat": -33.86094342989272, "lng": 151.2077390201073 },
              },
          },
        "name": "Museum of Contemporary Art Australia",
        "opening_hours": { "open_now": false },
        "rating": 4.4,
      },
    ],
  "status": "OK",
}

XML

<FindPlaceFromTextResponse>
 <candidates>
  <name>Museum of Contemporary Art Australia</name>
  <formatted_address>140 George St, The Rocks NSW 2000, Australia</formatted_address>
  <geometry>
   <location>
    <lat>-33.8599358</lat>
    <lng>151.2090295</lng>
   </location>
   <viewport>
    <southwest>
     <lat>-33.8609434</lat>
     <lng>151.2077390</lng>
    </southwest>
    <northeast>
     <lat>-33.8582438</lat>
     <lng>151.2104387</lng>
    </northeast>
   </viewport>
  </geometry>
  <rating>4.4</rating>
  <opening_hours>
   <open_now>false</open_now>
  </opening_hours>
 </candidates>
 <status>OK</status>
</FindPlaceFromTextResponse>

PlacesFindPlaceFromTextResponse

FieldRequiredTypeDescription
requiredArray<Place>

Contains an array of Place candidates.

Place Search requests return a subset of the fields that are returned by Place Details requests. If the field you want is not returned by Place Search, you can use Place Search to get a place_id, then use that Place ID to make a Place Details request.

See Place for more information.

requiredPlacesSearchStatus

Contains the status of the request, and may contain debugging information to help you track down why the request failed.

See PlacesSearchStatus for more information.

optionalstring

When the service returns a status code other than OK<, there may be an additional error_message field within the response object. This field contains more detailed information about thereasons behind the given status code. This field is not always returned, and its content is subject to change.

optionalArray<string>

When the service returns additional information about the request specification, there may be an additional info_messages field within the response object. This field is only returned for successful requests. It may not always be returned, and its content is subject to change.

PlacesSearchStatus

Status codes returned by service.

  • OK indicating the API request was successful.
  • ZERO_RESULTS indicating that the search was successful but returned no results. This may occur if the search was passed a latlng in a remote location.
  • INVALID_REQUEST indicating the API request was malformed, generally due to missing required query parameter (location or radius).
  • OVER_QUERY_LIMIT indicating any of the following:
    • You have exceeded the QPS limits.
    • Billing has not been enabled on your account.
    • The monthly $200 credit, or a self-imposed usage cap, has been exceeded.
    • The provided method of payment is no longer valid (for example, a credit card has expired).
    See the Maps FAQ for more information about how to resolve this error.
  • REQUEST_DENIED indicating that your request was denied, generally because:
    • The request is missing an API key.
    • The key parameter is invalid.
  • UNKNOWN_ERROR indicating an unknown error.

Place

Attributes describing a place. Not all attributes will be available for all place types.

FieldRequiredTypeDescription
optional Array<AddressComponent>

An array containing the separate components applicable to this address.

See AddressComponent for more information.

optionalstring

A representation of the place's address in the adr microformat.

optionalstring

Indicates the operational status of the place, if it is a business. If no data exists, business_status is not returned.

The allowed values include: OPERATIONAL, CLOSED_TEMPORARILY, and CLOSED_PERMANENTLY
optionalboolean

Specifies if the business supports curbside pickup.

optionalPlaceOpeningHours

Contains the hours of operation for the next seven days (including today). The time period starts at midnight on the date of the request and ends at 11:59 pm six days later. This field includes the special_days subfield of all hours, set for dates that have exceptional hours.

See PlaceOpeningHours for more information.

optionalboolean

Specifies if the business supports delivery.

optionalboolean

Specifies if the business supports indoor or outdoor seating options.

optionalPlaceEditorialSummary

Contains a summary of the place. A summary is comprised of a textual overview, and also includes the language code for these if applicable. Summary text must be presented as-is and can not be modified or altered.

See PlaceEditorialSummary for more information.

optionalstring

A string containing the human-readable address of this place.

Often this address is equivalent to the postal address. Note that some countries, such as the United Kingdom, do not allow distribution of true postal addresses due to licensing restrictions.

The formatted address is logically composed of one or more address components. For example, the address "111 8th Avenue, New York, NY" consists of the following components: "111" (the street number), "8th Avenue" (the route), "New York" (the city) and "NY" (the US state).

Do not parse the formatted address programmatically. Instead you should use the individual address components, which the API response includes in addition to the formatted address field.

optionalstring

Contains the place's phone number in its local format.

optionalGeometry

Contains the location and viewport for the location.

See Geometry for more information.

optionalstring

Contains the URL of a suggested icon which may be displayed to the user when indicating this result on a map.

optionalstring

Contains the default HEX color code for the place's category.

optionalstring

Contains the URL of a recommended icon, minus the .svg or .png file type extension.

optionalstring

Contains the place's phone number in international format. International format includes the country code, and is prefixed with the plus, +, sign. For example, the international_phone_number for Google's Sydney, Australia office is +61 2 9374 4000.

optionalstring

Contains the human-readable name for the returned result. For establishment results, this is usually the canonicalized business name.

optionalPlaceOpeningHours

Contains the regular hours of operation.

See PlaceOpeningHours for more information.

optionalboolean

Use business_status to get the operational status of businesses.

optional Array<PlacePhoto>

An array of photo objects, each containing a reference to an image. A request may return up to ten photos. More information about place photos and how you can use the images in your application can be found in the Place Photos documentation.

See PlacePhoto for more information.

optionalstring

A textual identifier that uniquely identifies a place. To retrieve information about the place, pass this identifier in the place_id field of a Places API request. For more information about place IDs, see the place ID overview.

optionalPlusCode

An encoded location reference, derived from latitude and longitude coordinates, that represents an area: 1/8000th of a degree by 1/8000th of a degree (about 14m x 14m at the equator) or smaller. Plus codes can be used as a replacement for street addresses in places where they do not exist (where buildings are not numbered or streets are not named). See Open Location Code and plus codes.

See PlusCode for more information.

optionalnumber

The price level of the place, on a scale of 0 to 4. The exact amount indicated by a specific value will vary from region to region. Price levels are interpreted as follows:

  • 0 Free
  • 1 Inexpensive
  • 2 Moderate
  • 3 Expensive
  • 4 Very Expensive
optionalnumber

Contains the place's rating, from 1.0 to 5.0, based on aggregated user reviews.

optionalstring
optionalboolean

Specifies if the place supports reservations.

optional Array<PlaceReview>

A JSON array of up to five reviews. By default, the reviews are sorted in order of relevance. Use the reviews_sort request parameter to control sorting.

  • For most_relevant (default), reviews are sorted by relevance; the service will bias the results to return reviews originally written in the preferred language.
  • For newest, reviews are sorted in chronological order; the preferred language does not affect the sort order.

Google recommends indicating to users whether results are ordered by most_relevant or newest.

See PlaceReview for more information.

optionalstring
optional Array<PlaceOpeningHours>

Contains an array of entries for the next seven days including information about secondary hours of a business. Secondary hours are different from a business's main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. This field populates the type subfield, which draws from a predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place. This field includes the special_days subfield of all hours, set for dates that have exceptional hours.

See PlaceOpeningHours for more information.

optionalboolean

Specifies if the place serves beer.

optionalboolean

Specifies if the place serves breakfast.

optionalboolean

Specifies if the place serves brunch.

optionalboolean

Specifies if the place serves dinner.

optionalboolean

Specifies if the place serves lunch.

optionalboolean

Specifies if the place serves vegetarian food.

optionalboolean

Specifies if the place serves wine.

optionalboolean

Specifies if the business supports takeout.

optionalArray<string>

Contains an array of feature types describing the given result. See the list of supported types.

optionalstring

Contains the URL of the official Google page for this place. This will be the Google-owned page that contains the best available information about the place. Applications must link to or embed this page on any screen that shows detailed results about the place to the user.

optionalnumber

The total number of reviews, with or without text, for this place.

optionalnumber

Contains the number of minutes this place’s current timezone is offset from UTC. For example, for places in Sydney, Australia during daylight saving time this would be 660 (+11 hours from UTC), and for places in California outside of daylight saving time this would be -480 (-8 hours from UTC).

optionalstring

For establishment (types:["establishment", ...]) results only, the vicinity field contains a simplified address for the place, including the street name, street number, and locality, but not the province/state, postal code, or country.

For all other results, the vicinity field contains the name of the narrowest political (types:["political", ...]) feature that is present in the address of the result.

This content is meant to be read as-is. Do not programmatically parse the formatted address.

optionalstring

The authoritative website for this place, such as a business' homepage.

optionalboolean

Specifies if the place has an entrance that is wheelchair-accessible.

AddressComponent

FieldRequiredTypeDescription
requiredstring

The full text description or name of the address component as returned by the Geocoder.

requiredstring

An abbreviated textual name for the address component, if available. For example, an address component for the state of Alaska may have a long_name of "Alaska" and a short_name of "AK" using the 2-letter postal abbreviation.

requiredArray<string>

An array indicating the type of the address component. See the list of supported types.

PlaceEditorialSummary

Contains a summary of the place. A summary is comprised of a textual overview, and also includes the language code for these if applicable. Summary text must be presented as-is and can not be modified or altered.

FieldRequiredTypeDescription
optionalstring

The language of the previous fields. May not always be present.

optionalstring

A medium-length textual summary of the place.

Geometry

An object describing the location.

FieldRequiredTypeDescription
requiredLatLngLiteral See LatLngLiteral for more information.
requiredBounds See Bounds for more information.

LatLngLiteral

An object describing a specific location with Latitude and Longitude in decimal degrees.

FieldRequiredTypeDescription
requirednumber

Latitude in decimal degrees

requirednumber

Longitude in decimal degrees

Bounds

A rectangle in geographical coordinates from points at the southwest and northeast corners.

FieldRequiredTypeDescription
requiredLatLngLiteral See LatLngLiteral for more information.
requiredLatLngLiteral See LatLngLiteral for more information.

PlaceOpeningHours

An object describing the opening hours of a place.

FieldRequiredTypeDescription
optionalboolean

A boolean value indicating if the place is open at the current time.

optional Array<PlaceOpeningHoursPeriod>

An array of opening periods covering seven days, starting from Sunday, in chronological order.

See PlaceOpeningHoursPeriod for more information.

optional Array<PlaceSpecialDay>

An array of up to seven entries corresponding to the next seven days.

See PlaceSpecialDay for more information.

optionalstring

A type string used to identify the type of secondary hours (for example, DRIVE_THROUGH, HAPPY_HOUR, DELIVERY, TAKEOUT, KITCHEN, BREAKFAST, LUNCH, DINNER, BRUNCH, PICKUP, SENIOR_HOURS). Set for secondary_opening_hours only.

optionalArray<string>

An array of strings describing in human-readable text the hours of the place.

PlaceOpeningHoursPeriod

FieldRequiredTypeDescription
requiredPlaceOpeningHoursPeriodDetail

Contains a pair of day and time objects describing when the place opens.

See PlaceOpeningHoursPeriodDetail for more information.

optionalPlaceOpeningHoursPeriodDetail

May contain a pair of day and time objects describing when the place closes. If a place is always open, the close section will be missing from the response. Clients can rely on always-open being represented as an open period containing day with value 0 and time with value 0000, and no close.

See PlaceOpeningHoursPeriodDetail for more information.

PlaceSpecialDay

FieldRequiredTypeDescription
optionalstring

A date expressed in RFC3339 format in the local timezone for the place, for example 2010-12-31.

optionalboolean

True if there are exceptional hours for this day. If true, this means that there is at least one exception for this day. Exceptions cause different values to occur in the subfields of current_opening_hours and secondary_opening_hours such as periods, weekday_text, open_now. The exceptions apply to the hours, and the hours are used to generate the other fields.

PlaceOpeningHoursPeriodDetail

FieldRequiredTypeDescription
requirednumber

A number from 0–6, corresponding to the days of the week, starting on Sunday. For example, 2 means Tuesday.

requiredstring

May contain a time of day in 24-hour hhmm format. Values are in the range 0000–2359. The time will be reported in the place’s time zone.

optionalstring

A date expressed in RFC3339 format in the local timezone for the place, for example 2010-12-31.

optionalboolean

True if a given period was truncated due to a seven-day cutoff, where the period starts before midnight on the date of the request and/or ends at or after midnight on the last day. This property indicates that the period for open or close can extend past this seven-day cutoff.

PlacePhoto

A photo of a Place. The photo can be accesed via the Place Photo API using an url in the following pattern:

https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photo_reference=photo_reference&key=YOUR_API_KEY

See Place Photos for more information.

FieldRequiredTypeDescription
requirednumber

The height of the photo.

requiredArray<string>

The HTML attributions for the photo.

requiredstring

A string used to identify the photo when you perform a Photo request.

requirednumber

The width of the photo.

PlusCode

An encoded location reference, derived from latitude and longitude coordinates, that represents an area, 1/8000th of a degree by 1/8000th of a degree (about 14m x 14m at the equator) or smaller. Plus codes can be used as a replacement for street addresses in places where they do not exist (where buildings are not numbered or streets are not named).

FieldRequiredTypeDescription
requiredstring

The global_code is a 4 character area code and 6 character or longer local code (849VCWC8+R9).

optionalstring

The compound_code is a 6 character or longer local code with an explicit location (CWC8+R9, Mountain View, CA, USA). Some APIs may return an empty string if the compound_code is not available.

PlaceReview

A review of the place submitted by a user.

FieldRequiredTypeDescription
requiredstring

The name of the user who submitted the review. Anonymous reviews are attributed to "A Google user".

requirednumber

The user's overall rating for this place. This is a whole number, ranging from 1 to 5.

requiredstring

The time that the review was submitted in text, relative to the current time.

requirednumber

The time that the review was submitted, measured in the number of seconds since since midnight, January 1, 1970 UTC.

optionalstring

The URL to the user's Google Maps Local Guides profile, if available.

optionalstring

An IETF language code indicating the language of the returned review.This field contains the main language tag only, and not the secondary tag indicating country or region. For example, all the English reviews are tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty if there is only a rating with no review text.

optionalstring

An IETF language code indicating the original language of the review. If the review has been translated, then original_language != language.This field contains the main language tag only, and not the secondary tag indicating country or region. For example, all the English reviews are tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty if there is only a rating with no review text.

optionalstring

The URL to the user's profile photo, if available.

optionalstring

The user's review. When reviewing a location with Google Places, text reviews are considered optional. Therefore, this field may be empty. Note that this field may include simple HTML markup. For example, the entity reference &amp; may represent an ampersand character.

optionalboolean

A boolean value indicating if the review was translated from the original language it was written in.If a review has been translated, corresponding to a value of true, Google recommends that you indicate this to your users. For example, you can add the following string, “Translated by Google”, to the review.