Retrieves detailed information about a specific place using its unique place_id.
Endpoint
https://maps.track-asia.com/api/v2/place/details/{outputFormat}
Output Format
outputFormat | Description |
---|---|
json (recommended) | indicates output in JavaScript Object Notation (JSON) |
xml | indicates output in XML |
Parameters
Parameter | Value | Description | Example |
---|---|---|---|
key | String (required) | Your API key. | public_key |
place_id | String (required) | A unique identifier for a place. Used to retrieve details about a specific place. | 17:venue:67addea7-6e98-5a17-8769-8399bbcea42f |
new_admin | Boolean | Return address according to new administrative boundaries | true |
include_old_admin | Boolean | (Use with new_admin) Return both new and old addresses | true |
Code Examples
This example demonstrates how to request data in JSON format:
https://maps.track-asia.com/api/v2/place/details/json?place_id=17:venue:67addea7-6e98-5a17-8769-8399bbcea42f&key=public_key&new_admin=true
This example demonstrates how to request data in XML format:
https://maps.track-asia.com/api/v2/place/details/xml?place_id=17:venue:67addea7-6e98-5a17-8769-8399bbcea42f&key=public_key&new_admin=true&include_old_admin=true
# JSON
curl -G "https://maps.track-asia.com/api/v2/place/details//json" \
--data-urlencode "place_id=17:venue:67addea7-6e98-5a17-8769-8399bbcea42f" \
--data-urlencode "key=public_key" \
--data-urlencode "new_admin=true" \
--data-urlencode "include_old_admin=true"
# XML
curl -G "https://maps.track-asia.com/api/v2/place/details//xml" \
--data-urlencode "place_id=17:venue:67addea7-6e98-5a17-8769-8399bbcea42f" \
--data-urlencode "key=public_key" \
--data-urlencode "new_admin=true" \
--data-urlencode "include_old_admin=true"
// JSON
const response = await fetch("https://maps.track-asia.com/api/v2/place/details/json?place_id=17:venue:67addea7-6e98-5a17-8769-8399bbcea42f&key=public_key&new_admin=true")
const data = await response.json()
console.log(data)
// XML
const response = await fetch("https://maps.track-asia.com/api/v2/place/details/xml?place_id=17:venue:67addea7-6e98-5a17-8769-8399bbcea42f&key=public_key&new_admin=true&include_old_admin=true")
const data = await response.text()
console.log(data)
Response
JSON Response
The response is a JSON object with the following structure:
status
: String status (e.g., "OK")html_attributions
: Array of HTML attribution stringsresult
: Object containing detailed information about the place, such as:place_id
: Unique identifier for the placename
: Name of the placeformatted_address
: The standardized, human-readable addressvicinity
: Short address or vicinity (if available)adr_address
: Address string with HTML tags for UI formatting (if available)editorial_summary
: Object with anoverview
field (if available)address_components
: Array of objects with:long_name
: Full text description or nameshort_name
: Abbreviated nametypes
: Array of types for the address component
geometry
: Object with:location
: Latitude and longitude coordinates (lat/lng)location_type
: Type of locationviewport
: Preferred viewport (northeast/southwest)
plus_code
: Object with:compound_code
: A compound codeglobal_code
: A global code
types
: Array of feature typesicon
: Name of the iconicon_background_color
: Background color for the iconphotos
: Array of photo objects (if available)url
: URL to the photo
opening_hours
: Object with opening hours info (if available)rating
: Place rating (if available)user_ratings_total
: Number of user ratings (if available)website
: Place website (if available)phone_number
: Place phone number (if available)socials
: Array of social media URLs (if available)url
: Link to the place on TrackAsia Maps (if available)utc_offset
: Offset from UTC in minutes (if available)old_address_components
: (Only present when include_old_admin=true) Array of address components according to the old boundaries, same structure as address_components.old_formatted_address
: (Only present when include_old_admin=true) Full formatted address according to the old boundaries.
XML Response
The XML response has a similar structure; fields will be corresponding XML tags to the JSON fields above. Some differences:
- The XML results are wrapped in a
<PlaceDetailResponse>
root element - Arrays in JSON will be repeating elements in XML
- Empty fields are represented by empty arrays in JSON but will have no elements in XML
Status
Status | Description |
---|---|
OK | indicates that no errors occurred; the request was successful and details were returned. |
ZERO_RESULTS | indicates that the request was successful but returned no results. |
INVALID_REQUEST | indicates that the API request was malformed (e.g., missing required parameters, invalid parameter values). |
Error
When the API 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 the reasons behind the given status code.
Next steps
- Try the API playground