Location search is one of those features that sounds simple until you actually implement it. You add a search box, user types an address, you need coordinates back. That's it — but the solutions on the market are either expensive, require heavy SDKs, or both.
If all you need is an address → coordinates (or coordinates → address), you don't need a full maps platform. You need a clean HTTP endpoint.
That's exactly what the Mapsi Geocoding API is.
What Is the Mapsi Geocoding API?
The Mapsi Geocoding API is an HTTP endpoint that converts addresses into coordinates (forward geocoding) and coordinates into addresses (reverse geocoding). No JavaScript SDK, no client-side library — just a GET request and a JSON response.
One API call costs 1 credit. The free tier gives you 3,000 credits per day, enough to prototype and ship a real product without entering a credit card.
Forward Geocoding: Address → Coordinates
Say a user types "Brooklyn, New York" into your app's search box. Here's how you turn that into lat/lng:
GET https://mapsi.dev/v1/geocode?q=Brooklyn%2C%20New%20York&limit=5
X-API-Key: YOUR_API_KEY
Response:
{
"success": true,
"results": [
{
"formatted_address": "Brooklyn, New York, NY, US",
"coordinates": { "lat": 40.6782, "lon": -73.9442 },
"city": "Brooklyn",
"region": "New York",
"country": "United States",
"confidence": 0.95
}
],
"query": "Brooklyn, New York"
}
Use results[0].coordinates.lat and results[0].coordinates.lon — plug them straight into MapLibre, Leaflet, or any map library.
Reverse Geocoding: Coordinates → Address
Got a GPS coordinate from a device and need a human-readable address? Flip it:
GET https://mapsi.dev/v1/reverse?lat=40.7580&lon=-73.9855&limit=1
X-API-Key: YOUR_API_KEY
Response:
{
"success": true,
"results": [
{
"formatted_address": "Times Square, New York, NY, US",
"street": "Broadway",
"city": "New York",
"region": "New York",
"country": "United States"
}
]
}
One call, clean structured data, no parsing gymnastics.
Three Real-World Use Cases
1. Delivery Address Validation
Your checkout form has an address field. Before saving it to your database, you want to check it's a real, resolvable address — and store the coordinates alongside it for downstream routing.
async function validateAddress(userInput) {
const res = await fetch(
`https://mapsi.dev/v1/geocode?q=${encodeURIComponent(userInput)}&limit=1`,
{ headers: { 'X-API-Key': API_KEY } }
);
const data = await res.json();
if (!data.results?.length) return { valid: false };
const { lat, lon } = data.results[0].coordinates;
const label = data.results[0].formatted_address;
return { valid: true, lon, lat, label };
}
Now you have verified coordinates stored with every order — useful for your delivery routing, dispatch systems, and analytics dashboards later.
2. "Show on Map" from a List View
You have a list of locations (stores, agents, properties) stored as addresses. You want to render them on a map. Rather than load a geocoding SDK, batch-call the API once at data-import time and store the coordinates.
async function geocodeAll(addresses) {
const results = [];
for (const address of addresses) {
const res = await fetch(
`https://mapsi.dev/v1/geocode?q=${encodeURIComponent(address)}&limit=1`,
{ headers: { 'X-API-Key': API_KEY } }
);
const data = await res.json();
if (data.results?.length) {
const { lat, lon } = data.results[0].coordinates;
results.push({ address, lon, lat });
}
await new Promise(r => setTimeout(r, 100));
}
return results;
}
Run this once when you import data, persist the coordinates, and your map renders instantly from your own database — zero geocoding calls at render time.
3. Autocomplete Search Box
The autocomplete endpoint powers live search suggestions. Hit it on every keypress (debounced), show the results as suggestions, and resolve to coordinates on selection.
let debounceTimer;
searchInput.addEventListener('input', (e) => {
clearTimeout(debounceTimer);
debounceTimer = setTimeout(async () => {
const query = e.target.value.trim();
if (query.length < 3) return;
const res = await fetch(
`https://mapsi.dev/v1/autocomplete?text=${encodeURIComponent(query)}&limit=5`,
{ headers: { 'X-API-Key': API_KEY } }
);
const data = await res.json();
const suggestions = data.suggestions.map(s => ({
label: s.text,
lon: s.lon,
lat: s.lat,
}));
renderSuggestions(suggestions);
}, 250);
});
A full address autocomplete in ~20 lines. No external library, no SDK, no vendor lock-in.
When to Use Mapsi Over Google Maps Geocoding
Mapsi makes sense when:
- You want predictable billing — 1 credit per call, 3,000 free per day, no surprise invoices. Paid plans start at $15/month.
- You need a simple HTTP API without initializing a full maps SDK.
- You're shipping a B2B or internal tool where raw geocoding is all you actually need.
Google's Geocoding API charges $5 per 1,000 requests after the free tier. At 3,000 calls/day, Mapsi's free tier gives you more than most side projects and early-stage products will ever need.
Get Started
- Sign up at mapsi.dev and grab your API key from the dashboard.
- Hit the geocode endpoint with any US address — you'll have coordinates in your terminal in under a minute.
- Check the docs for filtering by country, language, and result type.
No SDK to install. No quota forms to fill. Just an API key and a fetch.
