Search for a place with the Autocomplete API and a restricted trial key.
✓
What you’ll achieve
You will receive structured place predictions for Siam that you can show in a search box.
1. Create a trial key
Create a publishable trial key for your first request. Trial keys include Autocomplete, Tiles and Static Maps; server-only products such as Geocoding and Routing need an account key with those products enabled.
2. Send the request
Export the returned key as MAPSCALE_API_KEY, then pass it in X-MapScale-Key. q is the partial place name, lang controls labels and session_token groups one search interaction.
A second example: a Thai romanisation
"Thong Lo" and "ทองหล่อ" both reach the same neighbourhood — Autocomplete matches on the romanised spelling as well as the Thai script.
3. Read the response
Render predictions[].description in your suggestion list and keep predictions[].place_id. Resolve the selected ID with Place Detail when your key has Geocoding enabled.
Your privacy, your choiceHelp us make the docs more useful.
With your permission, we use analytics to learn which guides and examples help. No ads or cross-site tracking, and the docs work the same either way. Read our privacy policy.