Open world location datav2.0.15

Country.State.City.

World location data with a visible source, a stable package, and no mystery between the map and your code.

npm install @tansuasici/country-state-city
location.resolve/TR/34/107863
01
CountryTürkiye
TR
02
StateIstanbul
34
03
CityKadıköy
107863
resolved record Type-safe
Selected pathTürkiye / Istanbul / Kadıköy
01 {
 02 "name": "Kadıköy",
 03 "stateCode": "34",
 04 "countryCode": "TR",
 05 "latitude": "40.98229",
 06 "longitude": "29.09032"
 07 }
01250Countries
024,963States
03147,739Cities
Explore datasetOpen the interactive map

Dataset coverage

The essentials, right here.

Countries250

Country records with ISO codes, currencies, timezones, and center coordinates.

Administrative areas4,963

States, provinces, regions, and other first-level administrative divisions.

Cities147,739

Searchable places connected to their country and administrative area.

See coverage and known gaps

Built for developers

One dataset.Every surface.

Search it in an application, load it in Node, explore it on a map, or query it through MCP.
01

One typed API

Country, state, and city lookups with TypeScript definitions for browser and Node.

02

Four export formats

Move the same records through JSON, CSV, XML, or YAML without a second dataset.

03

Natural-language access

Use the included MCP server from compatible AI assistants and developer tools.

Quick start

From install to first lookup in three lines.

The same dataset powers typed APIs, raw JSON exports, and country shards.Read the API reference

location.ts

import { CountryStateCity }
 from '@tansuasici/country-state-city';

const turkey = CountryStateCity.
  getCountryByIso2('TR');
const states = CountryStateCity.
  getStatesByCountryId(turkey.id);
81 states returned · typed result

Open data. Clear provenance.

Put the world in your next build.