Geocoded

Free Country, State, City & Location API

Open-source REST API with 252 countries, 3,800+ states, and 230,000+ cities. No API key required. Deployed on the edge for instant responses worldwide.

$ curl https://api.geocoded.me
252
Countries
5,084+
States
232K+
Cities
312
Timezones

Why Geocoded

Built for developers who ship fast

No signup, no API key, no rate limits. Just clean JSON over HTTPS.

Free & Open Source

No API key, no signup, no rate limits. Data sourced from official institutions (GeoNames, CLDR, Wikidata, IANA) under CC BY 4.0.

Global Edge Network

Powered by Cloudflare Workers with near-zero cold starts. Cached at the edge for millisecond responses from the closest POP.

Rich Data

252 countries, 3,800+ states, and 230,000+ cities with translations, timezones, coordinates, phone codes, currencies, and more.

Field Selection

Pick exactly the fields you need with ?fields= parameter. Supports dot notation for nested objects. Smaller payloads, faster apps.

See the Data

Explore the full dataset

Interactive tools to browse, visualize, and analyze geography data from the API.

Quick Start

Simple endpoints, zero config

Every response is JSON with aggressive cache headers. Try these from your terminal right now.

Your location from IP

GET

Request

$ curl https://api.geocoded.me

Response

{
  "ip": "203.0.113.42",
  "country": "US",
  "region": "California",
  "city": "San Francisco",
  "latitude": "37.7749",
  "longitude": "-122.4194",
  "timezone": "America/Los_Angeles"
}

Countries with field selection

GET

Request

$ curl https://api.geocoded.me/countries/US?fields=name,iso2,capital,currency

Response

{
  "name": "United States",
  "iso2": "US",
  "capital": "Washington",
  "currency": "USD"
}

Drill down to states and cities

GET

Request

$ curl https://api.geocoded.me/countries/US/states/CA/cities?fields=name,latitude,longitude

Response

[
  {
    "name": "Los Angeles",
    "latitude": "34.05223420",
    "longitude": "-118.24368490"
  },
  {
    "name": "San Francisco",
    "latitude": "37.77492950",
    "longitude": "-122.41941550"
  }
]

Search across all entities

GET

Request

$ curl https://api.geocoded.me/search?q=tokyo

Response

{
  "data": [...],
  "meta": {
    "total": "12",
    "hasMore": "false"
  }
}

List timezones

GET

Request

$ curl https://api.geocoded.me/timezones?limit=2&fields=timezone,countryCodes

Response

{
  "data": [
    {
    "timezone": "America/New_York",
    "countryCodes": ["US"]
    },
    {
    "timezone": "Europe/London",
    "countryCodes": ["GB"]
    }
  ],
  "meta": { ... }
}

List currencies

GET

Request

$ curl https://api.geocoded.me/currencies?limit=2&fields=code,name,symbol,countries

Response

{
  "data": [
    {
    "code": "USD",
    "name": "US Dollar",
    "symbol": "$",
    "countries": ["US"]
    },
    {
    "code": "EUR",
    "name": "Euro",
    "symbol": "€",
    "countries": ["AD","AT","BE"]
    }
  ],
  "meta": { ... }
}