MapScale Docs
Start here
Start here · 3 minutes

Make your first API request

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.

Edit the inputs, send a real request, and inspect the live response.

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.

Edit the inputs, send a real request, and inspect the live response.

Editable inputs

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.

Edit the inputs, send a real request, and inspect the live response.

Editable inputs

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.

Next stepExplore Search & Geocoding →

On this page

Analytics settings