Skip to content

Retrieves detailed information about a specific place using its unique place_id.

Request

Endpoint

https://dplace-api.themap.world/maps/api/place/details/json

Query params

ParamRequiredDescription
place_idRequiredA single ID in the format source:layer:id, for example: osm:venue:b467e12f.... If the ID has an invalid format or an unsupported layer, the request fails with 400
has_deprecated_adminOptionaltrue if you want to return old_formatted_address, old_address_components

Example

curl --location 'https://dplace-api.themap.world/maps/api/place/details/json?place_id=4:venue:b467e12f599e45838c0924d8e85c5fd9&has_deprecated_admin=true&key=YOUR_API_KEY'

Response

details/json wraps the response in the following top-level fields:

FieldWhen presentContent
statusalwaysOK, ZERO_RESULTS, NOT_FOUND, INVALID_REQUEST, or UNKNOWN_ERROR
error_messageon INVALID_REQUEST / UNKNOWN_ERRORerror description
info_messageswhen there is a parameter warningarray of strings
html_attributionsalways[] — no third-party attribution data

status

ValueMeaning
OKsuccess, place found
NOT_FOUNDplace_id does not exist
INVALID_REQUESTmissing or invalid parameter (HTTP 400)
UNKNOWN_ERRORserver-side error: timeout, backend unreachable (HTTP 502/500)

result

The fields shown in the example response body above:

FieldWhen presentContent
place_idalwaysunique identifier for the place
sourcealwaysnumeric source ID for the place data
namealwaysplace name
formatted_addressalwaysstandardized full address
address_componentsalwaysarray of {long_name, short_name, types} components of formatted_address
old_formatted_addressalwaysaddress before an administrative merge, or "" if none
old_address_componentswhen old_formatted_address is non-emptyarray of {long_name, short_name, types} components of old_formatted_address
geometryalwayslocation (lat/lng) and viewport (northeast/southwest bounds)
typesalwaysarray of place type classifications
categoryalwaystop-level place category
subcategoryalwaysplace subcategory
plus_codewhen available in the source dataOpen Location Code for the place
business_statuswhen available in the source datae.g. OPERATIONAL

When place_id does not exist, status is NOT_FOUND and result is an empty object (not null):

{
  "status": "NOT_FOUND",
  "html_attributions": [],
  "result": {}
}

When the request has an invalid parameter, /api/v3/ still returns HTTP 200 with status: "INVALID_REQUEST" and keeps result in the body:

{
  "status": "INVALID_REQUEST",
  "error_message": "id `abc is invalid: must be of the format source:layer:id for ex: '4:venue:ffb627dc81f845e59b5c0259582ad101'",
  "result": {},
  "html_attributions": [],
}

Example:

{
  "status": "OK",
  "result": {
    "place_id": "4:venue:ffb627dc81f845e59b5c0259582ad101",
    "source": 4,
    "name": "Cơm tấm Huyền Trang",
    "formatted_address": "3 Đường Lương Văn Can, Phường Phú Định, Thành phố Hồ Chí Minh, Việt Nam",
    "address_components": [
      {
        "long_name": "3",
        "short_name": "3",
        "types": [
          "street_number"
        ]
      },
      {
        "long_name": "Đường Lương Văn Can",
        "short_name": "Đường Lương Văn Can",
        "types": [
          "route"
        ]
      },
      {
        "long_name": "Phường Phú Định",
        "short_name": "Phường Phú Định",
        "types": [
          "administrative_area_level_2"
        ]
      },
      {
        "long_name": "Thành phố Hồ Chí Minh",
        "short_name": "Thành phố Hồ Chí Minh",
        "types": [
          "administrative_area_level_1"
        ]
      },
      {
        "long_name": "Việt Nam",
        "short_name": "VN",
        "types": [
          "country"
        ]
      }
    ],
    "old_formatted_address": "3 Đường Lương Văn Can, Phường 15, Quận 8, Thành phố Hồ Chí Minh, Việt Nam",
    "old_address_components": [
      {
        "long_name": "3",
        "short_name": "3",
        "types": [
          "street_number"
        ]
      },
      {
        "long_name": "Đường Lương Văn Can",
        "short_name": "Đường Lương Văn Can",
        "types": [
          "route"
        ]
      },
      {
        "long_name": "Phường 15",
        "short_name": "Phường 15",
        "types": [
          "administrative_area_level_3"
        ]
      },
      {
        "long_name": "Quận 8",
        "short_name": "Quận 8",
        "types": [
          "administrative_area_level_2"
        ]
      },
      {
        "long_name": "Thành phố Hồ Chí Minh",
        "short_name": "Thành phố Hồ Chí Minh",
        "types": [
          "administrative_area_level_1"
        ]
      },
      {
        "long_name": "Việt Nam",
        "short_name": "VN",
        "types": [
          "country"
        ]
      }
    ],
    "geometry": {
      "location": {
        "lat": 10.73602,
        "lng": 106.63923
      },
      "viewport": {
        "northeast": {
          "lat": 10.73692,
          "lng": 106.64043
        },
        "southwest": {
          "lat": 10.73512,
          "lng": 106.63803
        }
      }
    },
    "types": [
      "food_and_drink",
      "restaurant"
    ],
    "category": "food_and_drink",
    "subcategory": "restaurant",
    "plus_code": "7P28PJPQCM5",
    "business_status": "OPERATIONAL"
  },
  "html_attributions": []
}