Free developer tool

Geocoding Tool

Convert an address into latitude and longitude. Try an address, inspect each match on the map, and copy the API request for your own application.

Address to coordinates

Enter an address and Mapsi returns the best matching locations.

Loading map…
Your results will appear here

Try “10 Downing Street, London”. Adding a country code helps with ambiguous addresses.

Address and road data © OpenStreetMap contributors (ODbL) and other open datasets.

How does geocoding work?

Geocoding converts a human-readable address into geographic coordinates. A geocoder searches address and place data, ranks the possible matches, and returns the best candidates together with metadata about how good each match is.

01

Submit a query

Send an address, place name or postcode as the q parameter.

02

Get ranked candidates

The API returns up to limit matches, best first, each with a confidence score.

03

Use the coordinates

Read coordinates.lat and coordinates.lon from the result you want.

Handling ambiguous addresses

An address such as “10 Downing Street, London” resolves to a point near 51.503, −0.128. Other queries are less clear: many street names exist in several countries. Restrict the search with the countries parameter, check confidence and accuracy, and show users the candidates when the top result is not clearly the best.

What can you use geocoding for?

Anything that starts with addresses rather than coordinates: delivery and logistics systems, store locators, territory management, mapping CRM records, and location search.

Frequently asked questions

Why should I add a country code?

Street and place names repeat across the world. Passing a two-letter country code in the countries parameter restricts matching to that country, which removes most ambiguous results.

What do confidence, accuracy and layer mean?

Confidence is a 0 to 1 score for how well the result matches your query. Layer tells you what kind of feature matched (for example an address rather than a street or a place) and accuracy describes how precisely the returned coordinates pin it down.

Where does the data come from?

Results come from open datasets such as OpenStreetMap and OpenAddresses. Every result includes a source field so you can see which dataset it came from.

Is the API free?

This tool is free to try. The Mapsi API has a free tier of 1,000 requests per day at 2 requests per second, with higher limits on paid plans.

API

Geocode an address with the API

GET /v1/geocode?q=10+Downing+Street%2C+London&countries=GB&limit=5
cURL
curl -H "X-API-Key: YOUR_MAPSI_API_KEY" \
  "https://mapsi.dev/v1/geocode?q=10+Downing+Street%2C+London&countries=GB&limit=5"
JavaScript
const response = await fetch(
  "https://mapsi.dev/v1/geocode?q=10+Downing+Street%2C+London&countries=GB&limit=5",
  { headers: { "X-API-Key": "YOUR_MAPSI_API_KEY" } }
);

const data = await response.json();

console.log(data.results[0].coordinates);
Python
import requests

response = requests.get(
    "https://mapsi.dev/v1/geocode",
    params={"q": "10 Downing Street, London", "countries": "GB", "limit": 5},
    headers={"X-API-Key": "YOUR_MAPSI_API_KEY"},
)

data = response.json()
print(data)
Example response
{
  "success": true,
  "results": [
    {
      "formatted_address": "10 Downing Street, London, England, United Kingdom",
      "house_number": "10",
      "street": "Downing Street",
      "city": "London",
      "region": "Greater London",
      "postcode": "SW1A 2AA",
      "country_code": "GB",
      "country": "United Kingdom",
      "coordinates": {
        "lat": 51.50333,
        "lon": -0.127603
      },
      "lat": 51.50333,
      "lon": -0.127603,
      "confidence": 0.9,
      "accuracy": "point",
      "layer": "address",
      "source": "openstreetmap"
    }
  ]
}