Cities
Search 200k+ cities by name, country, or region. Filter by population, sort, paginate, and get multilingual names in one request.
Countries & Regions
Full country metadata — ISO codes, telephone codes, driving side, head of state — plus administrative regions per country.
Multilingual
Pass preferredLanguages=fr,es,en to get localized city, country, and region names back in your preferred language.
What is Geomelon?
Geomelon is a read-only REST API for geographic reference data. It is built for apps that need accurate, structured location information without managing their own database.
GET /cities/search?name=Barcelona&preferredLanguages=ca,es,en
GET /countries?name=Espa&preferredLanguages=es
GET /cities/byCoordinates/closest?lat=48.8566&lon=2.3522
All responses are JSON. Identifiers are stable UUIDs. The API is hosted on RapidAPI.
Quick start
import { GeomelonClient } from "geomelon";
const client = new GeomelonClient({ apiKey: "YOUR_RAPIDAPI_KEY" });
const cities = await client.cities.search({
name: "Barcelona",
preferredLanguages: "ca,es,en",
});
Or in Python:
from geomelon import GeomelonClient
client = GeomelonClient(api_key="YOUR_RAPIDAPI_KEY")
cities = client.cities.search(name="Barcelona", preferred_languages="ca,es,en")
Install: npm install geomelon · pip install geomelon
See the Libraries page for the full TypeScript and Python clients, MCP server, and n8n community node.
Free Autocomplete API
Need city autocomplete without an API key? Geomelon provides a free static-file endpoint — no auth required:
GET https://oneshot.geomelon.dev/{country}/{lang}/{prefix}
// User types "Bar" in a city field scoped to Spain
const res = await fetch("https://oneshot.geomelon.dev/es/es/bar");
const cities = await res.json();
// → [{ name: "Barcelona", population: 1636762, emoji: "🇪🇸", en: "Barcelona" }, ...]
# pip install geomelon — the Python client uses this endpoint with no key
from geomelon import GeomelonClient
cities = GeomelonClient().oneshot.search("es", "es", "bar")
Covers 203 countries and 50 languages — 2,497 country–language pairs served as pre-built JSON files. See the full coverage table and API details.