Skip to content

Searches for keywords and returns a list of relevant places.

Endpoint

https://maps.track-asia.com/api/v1/search

Parameters

Parameter Values Require Description Example
text String Representing what a user has typed 2 Nguyen Hue, phuong Sai Gon, thanh pho Ho Chi Minh
key String API key (use your own key; public_key is limited and for testing only) public_key
lang Target language The target language code in the BCP47 standard. Only the language subtag information is used to set the target language e.g. en vi
size Number The number of results returned 5
focus.point.lat {latitude} Latitude to focus search based on geographic area 10.761
focus.point.lon {longitude} Longitude to focus search based a geographical area 106.68
new_admin true , false (default) Return address according to new administrative boundaries true
include_old_admin Boolean Return both old and new addresses in parallel (only available when new_admin=true) true

Example Code

Example 1: Return new administrative boundaries

https://maps.track-asia.com/api/v1/search?new_admin=true&lang=vi&text=2 Nguyen Hue, phuong Sai Gon, thanh pho Ho Chi Minh&key=public_key

Example 2: Return both old and new addresses with focus point

https://maps.track-asia.com/api/v1/search?new_admin=true&include_old_admin=true&lang=vi&text=2 Nguyen Hue, quan 1, thanh pho Ho Chi Minh&focus.point.lat=10.761&focus.point.lon=106.68&size=2&key=public_key
# Example 1: Return new administrative boundaries
curl -G "https://maps.track-asia.com/api/v1/search" \
--data-urlencode "lang=vi" \
--data-urlencode "text=2 Nguyen Hue, phuong Sai Gon, thanh pho Ho Chi Minh" \
--data-urlencode "key=public_key" \
--data-urlencode "new_admin=true"

# Example 2: Return both old and new addresses with focus point
curl -G "https://maps.track-asia.com/api/v1/search" \
--data-urlencode "lang=vi" \
--data-urlencode "text=2 Nguyen Hue, quan 1, thanh pho Ho Chi Minh" \
--data-urlencode "new_admin=true" \
--data-urlencode "include_old_admin=true" \
--data-urlencode "focus.point.lat=10.761" \
--data-urlencode "focus.point.lon=106.68" \
--data-urlencode "size=2" \
--data-urlencode "key=public_key"
// Example 1: Return new administrative boundaries
const response1 = await fetch("https://maps.track-asia.com/api/v1/search?new_admin=true&lang=vi&text=2 Nguyen Hue, phuong Sai Gon, thanh pho Ho Chi Minh&key=public_key")
const data1 = await response1.json()
console.log(data1)

// Example 2: Return both old and new addresses with focus point
const response2 = await fetch("https://maps.track-asia.com/api/v1/search?new_admin=true&include_old_admin=true&lang=vi&text=2 Nguyen Hue, quan 1, thanh pho Ho Chi Minh&focus.point.lat=10.761&focus.point.lon=106.68&size=2&key=public_key")
const data2 = await response2.json()
console.log(data2)

Response

JSON Response

The response is a JSON object with the following structure:

  • type: "FeatureCollection". Indicates the type of GeoJSON object.
  • geocoding: Metadata object of the response:

    • timestamp: Response timestamp (Unix timestamp, milliseconds).
  • features: An array of Feature objects, each representing a found place. Each Feature has:

    • type: "Feature".
    • geometry: The geometry of the feature:

      • type: "Point".
      • coordinates: An array of [longitude, latitude] for the point.
    • properties: An object with details about the place:

      • id: Unique identifier for the feature.
      • gid: Global identifier for the feature.
      • layer: The layer type (e.g., "venue", "address").
      • name: Name of the place.
      • housenumber: House number (if available).
      • street: Street address (if available).
      • postalcode: Postal code (if available).
      • distance: Distance in kilometers from the focus point (if focus.point is provided).
      • confidence: Confidence score for the result.
      • country, country_code, country_a, country_id: Country info.
      • region, region_a, region_id: Region info.
      • county, county_id: County info.
      • locality, locality_id: Locality info.
      • label: Formatted label for the place.
      • ...and other address-related fields as available.

      The following fields only appear when new_admin=true and include_old_admin=true:

      • old_region: Region name according to the old administrative boundaries (before merging/adjustment).
      • old_region_a: Abbreviation code of the old region.
      • old_region_id: ID of the old region.
      • old_county: County name according to old boundaries (if applicable).
      • old_county_id: ID of the old county (if applicable).
      • old_locality: Locality name according to old boundaries.
      • old_locality_id: ID of the old locality.
      • old_label: Full formatted address label according to old administrative boundaries (typically includes the old county name).
  • bbox: An array [minLon, minLat, maxLon, maxLat] representing the bounding box of the results.

Next steps