Searches for keywords and returns a list of relevant places.
Endpoint
https://sg-maps.track-asia.com/api/v1/search
Parameters
| Parameter | Values | Description | Example |
|---|---|---|---|
text | String (required) | Representing what a user has typed | KFC |
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 | en |
size | Number | The number of results returned | 5 |
focus.point.lat | {latitude} | Latitude to focus search based on geographic area | 1.761 |
focus.point.lon | {longitude} | Longitude to focus search based a geographical area | 103.68 |
key | String (required) | API key | public_key |
Example Code
https://sg-maps.track-asia.com/api/v1/search?lang=eb&text=KFC&focus.point.lat=1.761&focus.point.lon=103.68&size=2&key=public_key
Response
JSON Response
The response is a JSON object with the following structure:
type: "FeatureCollection". Indicates the type of GeoJSON object.features: An array ofFeatureobjects, each representing a found place. EachFeaturehas: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.street: Street address (if available).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.
bbox: An array[minLon, minLat, maxLon, maxLat]representing the bounding box of the results.
Next steps
- Try API playground