### Place Details XML Response Example Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details This XML snippet illustrates the Place Details (Legacy) response format, detailing elements such as name, address, geometry, ratings, and individual reviews. ```xml OK Google Workplace 6 48 Pirrama Road, Pyrmont point_of_interest establishment (02) 9374 4000 48 Pirrama Rd, Pyrmont NSW 2009, Australia 48 48 street_number Pirrama Road Pirrama Rd route Pyrmont Pyrmont locality political City of Sydney City of Sydney administrative_area_level_2 political New South Wales NSW administrative_area_level_1 political Australia AU country political 2009 2009 postal_code -33.8664890 151.1958561 -33.8682092 151.1944177 -33.8655113 151.1971156 4.0 https://maps.google.com/?cid=10281119596374313554 https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png ChIJN1t_tDeuEmsRUsoyG83frY4 +61 2 9374 4000 http://google.com/ Beautiful building with a great view. Luke Archibald https://www.google.com/maps/contrib/113389359827989670652/reviews 1.0 en https://lh3.googleusercontent.com/a-/AOh14GhGGmTmvtD34HiRgwHdXVJUTzVbxpsk5_JnNKM5MA=s128-c0x00000000-cc-rp-mo a week ago Conference rooms were well equipped. Joe Schmoe https://www.google.com/maps/contrib/105937236918123663309/reviews 1.0 en https://lh3.googleusercontent.com/a/AATXAJwZANdRSSg96QeZG--6BazG5uv_BJMIvpZGqwSz=s128-c0x00000000-cc-rp-mo 6 months ago The staff is very friendly. Jordy Baker https://www.google.com/maps/contrib/102582237417399865640/reviews 1.0 en https://lh3.googleusercontent.com/a/AATXAJwgg1tM4aVA4nJCMjlfJtHtFZuxF475Vb6tT74S=s128-c0x00000000-cc-rp-mo 4 months ago The location is convenient and easy to find. Prem Rathod https://www.google.com/maps/contrib/115981614018592114142/reviews 1.0 en https://lh3.googleusercontent.com/a/AATXAJyEQpqs4YvPPzMPG2dnnRTFPC4jxJfn8YXnm2gz=s128-c0x00000000-cc-rp-mo 4 months ago A modern and impressive facility. ``` -------------------------------- ### Place Details (Legacy) JSON Response Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details Example of a JSON response for a Place Details (Legacy) request. This format includes detailed information about a specific place. ```json { "html_attributions": [], "result": { "address_components": [ { "long_name": "48", "short_name": "48", "types": ["street_number"] }, { "long_name": "Pirrama Road", "short_name": "Pirrama Rd", "types": ["route"], }, { "long_name": "Pyrmont", "short_name": "Pyrmont", "types": ["locality", "political"], }, { "long_name": "City of Sydney", "short_name": "City of Sydney", "types": ["administrative_area_level_2", "political"], }, { "long_name": "New South Wales", "short_name": "NSW", "types": ["administrative_area_level_1", "political"], }, { "long_name": "Australia", "short_name": "AU", "types": ["country", "political"], }, { "long_name": "2009", "short_name": "2009", "types": ["postal_code"], }, ], "adr_address": "48 Pirrama Rd, Pyrmont NSW 2009, Australia", "business_status": "OPERATIONAL", "formatted_address": "48 Pirrama Rd, Pyrmont NSW 2009, Australia", "formatted_phone_number": "(02) 9374 4000", "geometry": { "location": { "lat": -33.866489, "lng": 151.1958561 }, "viewport": { "northeast": { "lat": -33.8655112697085, "lng": 151.1971156302915 }, "southwest": { "lat": -33.86820923029149, "lng": 151.1944176697085 }, }, }, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "international_phone_number": "+61 2 9374 4000", "name": "Google Workplace 6", "opening_hours": { "open_now": false, "periods": [ { "close": { "day": 1, "time": "1700" }, "open": { "day": 1, "time": "0900" }, }, { "close": { "day": 2, "time": "1700" }, "open": { "day": 2, "time": "0900" }, }, { "close": { "day": 3, "time": "1700" }, "open": { "day": 3, "time": "0900" }, }, { "close": { "day": 4, "time": "1700" }, "open": { "day": 4, "time": "0900" }, }, { "close": { "day": 5, "time": "1700" }, "open": { "day": 5, "time": "0900" }, }, ], "weekday_text": [ "Monday: 9:00 AM – 5:00 PM", "Tuesday: 9:00 AM – 5:00 PM", "Wednesday: 9:00 AM – 5:00 PM", "Thursday: 9:00 AM – 5:00 PM", "Friday: 9:00 AM – 5:00 PM", "Saturday: Closed", "Sunday: Closed", ], }, "photos": [ { "height": 3024, "html_attributions": [ "Cynthia Wei", ], "photo_reference": "Aap_uEC6jqtpflLS8GxQqPHBjlcwBf2sri0ZErk9q1ciHGZ6Zx5HBiiiEsPEO3emtB1PGyWbBQhgPL2r9CshoVlJEG4xzB71QMhGBTqqeaCNk1quO3vTTiP50aM1kmOaBQ-DF1ER7zpu6BQOEtnusKMul0m4KA45wfE3h6Xh2IxjLNzx-IiX", "width": 4032, }, { "height": 3264, "html_attributions": [ "Heyang Li", ], "photo_reference": "Aap_uECyRjHhOQgGaKTW6Z3ZfTEaDhNc44m0F6GrNSFIMffixwI5xqD35QhecdzVY-FUuDtVE1huu8-2HkxgI9Gwvy6W18fU-_E3UUkdSFBQqGK8_slKlT8BZZc66sTX53IEcTDrZfT-E5_YUBYBOm13yxOTOfWfEDABhaxCGC5Hu_XYh0fI", "width": 4912, }, { "height": 3036, "html_attributions": [ "Anna Linetsky", ], "photo_reference": "Aap_uEAumTzSdhRHDutPAj6wVPSZZmBV-brI6TPFwI0tcQlbSR74z44mUPr4aXMQKck_AzHaKmbfR3P2c1qsu45i1RQPHrcpIXxrA78FmDjCdWYYZWUnFozdcmEj9OQ_V0G08adpKivMKZyeaQ1NuwRy9GhSopeKpzkzkFZG5vXMYPPSgpa1", "width": 4048, }, { "height": 4016, "html_attributions": [ "Jonah Dell", ], "photo_reference": "Aap_uECC7cSbDkh-TdmXr6m5d5pgVXJmvXg8dF2jzhL0b0Ko4CtnVll6-tIvdz7vhbCsd3hl2u9EgZ4Y30FBxKmFcimfeYUgW2XJyv8JY5IYGuXsKkCLqpV3QH9dIGwoUv2uX0eosDsUsTN2DOlyOasUgVxcYqzIzEmrL5ofIssThQWZeozD", "width": 6016, }, { "height": 3024, ``` -------------------------------- ### Place Details JSON Response Example Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details This JSON snippet shows a typical response from the Place Details (Legacy) API, including information about a place's name, address, geometry, rating, and reviews. ```json { "profile_photo_url": "https://lh3.googleusercontent.com/a/AATXAJwRkyvoSlgd06ahkF9XI9D39o6Zc_Oycm5EKuRg=s128-c0x00000000-cc-rp-mo", "rating": 5, "relative_time_description": "7 months ago", "text": "A modern and impressive facility.", "time": 1633197305 } ], "types": ["point_of_interest", "establishment"], "url": "https://maps.google.com/?cid=10281119596374313554", "user_ratings_total": 939, "utc_offset": 600, "vicinity": "48 Pirrama Road, Pyrmont", "website": "http://google.com/" }, "status": "OK" } ``` -------------------------------- ### Place Details (Legacy) Request URL Structure Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details This is the base URL structure for making a Place Details (Legacy) request. Specify 'json' or 'xml' for the output format and include required parameters. ```URL https://maps.googleapis.com/maps/api/place/details/_output_?_parameters_ ``` -------------------------------- ### PlaceOpeningHoursPeriodDetail Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details Specifies the day and time for opening or closing hours. ```APIDOC ### PlaceOpeningHoursPeriodDetail Field | Required | Type | Description ---|---|---|--- #### `day` | **required** | number | A number from 0–6, corresponding to the days of the week, starting on Sunday. For example, 2 means Tuesday. ``` -------------------------------- ### PlaceOpeningHours Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details An object detailing the opening hours of a place, including current status, periods, and special day information. ```APIDOC ### PlaceOpeningHours An object describing the opening hours of a place. Field | Required | Type | Description ---|---|---|--- #### `open_now` | optional | boolean | A boolean value indicating if the place is open at the current time. #### `periods` | optional | Array | An array of opening periods covering seven days, starting from Sunday, in chronological order. See PlaceOpeningHoursPeriod for more information. #### `special_days` | optional | Array | An array of up to seven entries corresponding to the next seven days. See PlaceSpecialDay for more information. #### `type` | optional | string | 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. #### `weekday_text` | optional | Array | An array of strings describing in human-readable text the hours of the place. ``` -------------------------------- ### Place Photo API URL Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details Construct the URL to access a place photo using the Place Photo API. Ensure you replace 'photo_reference' and 'YOUR_API_KEY' with actual values. ```URL https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photo_reference=photo_reference&key=YOUR_API_KEY ``` -------------------------------- ### Place Details Fields Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details This section details various optional fields that can be returned for a place, providing specific information such as types, URLs, user ratings, and timezone offsets. ```APIDOC ## Place Details Fields ### `types` | optional | Array | Contains an array of feature types describing the given result. See the list of supported types. ### `url` | optional | string | 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. ### `user_ratings_total` | optional | number | The total number of reviews, with or without text, for this place. ### `utc_offset` | optional | number | 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). ### `vicinity` | optional | string | 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. Don't programmatically parse the formatted address. ### `website` | optional | string | The authoritative website for this place, such as a business' homepage. ### `wheelchair_accessible_entrance` | optional | boolean | Specifies if the place has an entrance that is wheelchair-accessible. ``` -------------------------------- ### Place Details (Legacy) Request Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details Initiate a Place Details (Legacy) request to retrieve comprehensive information about a specific place using its place ID. ```APIDOC ## GET https://maps.googleapis.com/maps/api/place/details/_output_?_parameters_ ### Description Requests detailed information about a specific place, identified by its `place_id`. ### Method GET ### Endpoint `https://maps.googleapis.com/maps/api/place/details/json` ### Parameters #### Query Parameters - **place_id** (string) - Required - A textual identifier that uniquely identifies a place, typically obtained from a Place Search. - **fields** (string) - Optional - Specifies the types of place data to return. If this parameter is omitted, the API returns all fields. - **language** (string) - Optional - The language in which to return results. - **region** (string) - Optional - The region to which the query is sensitive. - **reviews_no_translations** (boolean) - Optional - If true, reviews will be returned in the original language. - **reviews_sort** (string) - Optional - Specifies the order of reviews to return. Possible values are `‘Relevancy’` and `‘Newest’`. - **sessiontoken** (string) - Optional - A string that identifies an autocompletion session for which the place details are being requested. ### Request Example ``` https://maps.googleapis.com/maps/api/place/details/json?place_id=ChIJN1t_tDeuEmsRUsoyG83frY4&fields=name,rating,formatted_phone_number ``` ### Response #### Success Response (200) - **html_attributions** (array) - Contains attribution links for the place. - **result** (object) - Contains detailed information about the place. - **status** (string) - Indicates the success of the request. Possible values include `OK`, `ZERO_RESULTS`, `OVER_QUERY_LIMIT`, `REQUEST_DENIED`, `INVALID_REQUEST`, `UNKNOWN_ERROR`. #### Response Example ```json { "html_attributions": [], "result": { "name": "Google" }, "status": "OK" } ``` ``` -------------------------------- ### Request Place Details with cURL Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details Use this cURL command to request details for a specific place ID, including specified fields. Replace YOUR_API_KEY with your actual Google Maps API key. ```shell curl -L -X GET 'https://maps.googleapis.com/maps/api/place/details/json?place_id=ChIJN1t_tDeuEmsRUsoyG83frY4&fields=name%2Crating%2Cformatted_phone_number&key=YOUR_API_KEY' ``` -------------------------------- ### Place Details Request URL Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details This is the URL structure for requesting place details, showing the parameters for fields, place ID, and API key. Ensure your API key is valid and included. ```http https://maps.googleapis.com/maps/api/place/details/json ?fields=name%2Crating%2Cformatted_phone_number &place_id=ChIJN1t_tDeuEmsRUsoyG83frY4 &key=YOUR_API_KEY ``` -------------------------------- ### PlaceOpeningHoursPeriod Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details Represents a period of opening or closing hours for a place. ```APIDOC ### PlaceOpeningHoursPeriod Field | Required | Type | Description ---|---|---|--- #### `open` | **required** | PlaceOpeningHoursPeriodDetail | Contains a pair of day and time objects describing when the place opens. See PlaceOpeningHoursPeriodDetail for more information. #### `close` | optional | PlaceOpeningHoursPeriodDetail | 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. ``` -------------------------------- ### PlaceEditorialSummary Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details Provides a summary of the place, including a textual overview and its language code. ```APIDOC ### 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't be modified or altered. Field | Required | Type | Description ---|---|---|--- #### `language` | optional | string | The language of the previous fields. May not always be present. #### `overview` | optional | string | A medium-length textual summary of the place. ``` -------------------------------- ### Place Object Structure Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details The `Place` object contains detailed attributes describing a specific place. Not all attributes are available for all place types. ```APIDOC ## Place ### Description Attributes describing a place. Not all attributes will be available for all place types. ### Fields - **`address_components`** (Array) - Optional - An array containing the separate components applicable to this address. - **`adr_address`** (string) - Optional - A representation of the place's address in the adr microformat. - **`business_status`** (string) - Optional - Indicates the operational status of the place (e.g., `OPERATIONAL`, `CLOSED_TEMPORARILY`, `CLOSED_PERMANENTLY`). - **`curbside_pickup`** (boolean) - Optional - Specifies if the business supports curbside pickup. - **`current_opening_hours`** (PlaceOpeningHours) - Optional - Contains the hours of operation for the next seven days. - **`delivery`** (boolean) - Optional - Specifies if the business supports delivery. - **`dine_in`** (boolean) - Optional - Specifies if the business supports indoor or outdoor seating options. - **`editorial_summary`** (PlaceEditorialSummary) - Optional - Contains a summary of the place, including textual overview and language code. - **`formatted_address`** (string) - Optional - A human-readable address of the place. Do not parse programmatically; use `address_components` instead. - **`formatted_phone_number`** (string) - Optional - The place's phone number in its local format. - **`geometry`** (Geometry) - Optional - Contains the location and viewport for the location. ``` -------------------------------- ### PlaceSpecialDay Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details Details about exceptional opening hours for a specific day. ```APIDOC ### PlaceSpecialDay Field | Required | Type | Description ---|---|---|--- #### `date` | optional | string | A date expressed in RFC3339 format in the local timezone for the place, for example 2010-12-31. #### `exceptional_hours` | optional | boolean | 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. ``` -------------------------------- ### PlacesDetailsResponse Structure Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details The `PlacesDetailsResponse` object is the root element returned by the Places Details API. It contains the status of the request and the detailed information about the requested place. ```APIDOC ## PlacesDetailsResponse ### Description Represents the response from the Places Details API. ### Fields - **`html_attributions`** (Array) - Optional - Contains attributions about the listing that must be displayed to the user. - **`result`** (Place) - Required - Contains the detailed information about the place requested. - **`status`** (PlacesDetailsStatus) - Required - Contains the status of the request and debugging information. - **`info_messages`** (Array) - Optional - Returned for successful requests when the service provides additional information about the request specification. ### Notes In a JSON response, these are represented as root elements. In an XML response, these appear as top-level elements beneath ``. ``` -------------------------------- ### PlacesDetailsStatus Codes Source: https://developers.google.com/maps/documentation/places/web-service/legacy/details Defines the possible status codes returned by the Places Details API service. ```APIDOC ## PlacesDetailsStatus ### Description Status codes returned by the Places Details service. ### Status Codes - **`OK`**: The API request was successful. - **`ZERO_RESULTS`**: The referenced location or `place_id` was valid but no longer refers to a valid result (e.g., establishment is no longer in business). - **`NOT_FOUND`**: The referenced location or `place_id` was not found in the Places database. - **`INVALID_REQUEST`**: The API request was malformed. - **`OVER_QUERY_LIMIT`**: You have exceeded query-per-second limits, billing has not been enabled, a usage cap has been exceeded, or the payment method is invalid. - **`REQUEST_DENIED`**: The request was denied, generally due to a missing or invalid API key. - **`UNKNOWN_ERROR`**: An unknown error occurred. ### Notes See the Maps FAQ for more information about how to resolve errors. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.