Address autocomplete API

Address suggestions, free on every keystroke.

Complete addresses and places while the last word is still being typed. Autocomplete calls spend no credits; retrieving the place a user selects costs one.

50,000 free credits a month. No credit card.

Node.js
// Server-side, with a secret key. In a web page, use a browser key instead.
const call = (path, body) =>
  fetch(`https://api.opengeocoding.com${path}`, {
    method: 'POST',
    headers: {
      'x-api-key': process.env.OPENGEOCODING_API_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(body)
  }).then((response) => response.json());

// On each (debounced) keystroke: no credits spent.
const { suggestions = [] } = await call('/v1/autocomplete', {
  text: 'Copenh',
  countryCode: 'dk'
});

// When the user picks one: one credit, and you get coordinates.
const place = await call('/v1/retrieve', { id: picked.id });

Fewer typos in, cleaner addresses out.

Suggestions spend no credits

Every keystroke is free. You spend one credit only when a user picks a suggestion and you retrieve its coordinates.

Countries down to house numbers

Suggestions cover countries, regions, cities, streets, postcodes and addresses, with an optional set of notable landmarks.

Filter and bias

Restrict to one country, or pass the user's position so nearby places rank higher.

Unit text kept, not invented

Floor or apartment text the user typed stays in the label and is flagged as unverified, while the ID still points at the building.

Size for your peak typing traffic.

Autocomplete is authenticated and shares your account's per-second limit with every other call. Debounce keystrokes, and call it from the page with a browser key restricted to your site, or proxy requests through your backend with a secret key. The free plan allows 2 requests per second; Starter allows 5 and Growth allows 25. Enterprise capacity is sized to your traffic.

Add autocomplete to your form.

The same key covers forward geocoding, reverse geocoding and bulk jobs.

Get a free API key