CountryStateCity

Maps & Geocoding · Data Validation

CountryStateCity is a free, open-source geographic reference database exposed as a REST API, providing structured data for all 250 countries in the world, their states and provinces, and their cities and local government areas. For Nigerian developers, it is particularly valuable because it includes all 36 Nigerian states plus the Federal Capital Territory (FCT), all 774 Local Government Areas (LGAs), and major Nigerian cities — providing the authoritative administrative geography of Nigeria in a machine-readable format.

freemium

API Key (Header: X-CSCAPI-KEY)

100 requests/hour on free plan.

✓ Available

Best For

Developers building registration forms, address pickers, and location dropdowns who need a structured global database of all countries, states/provinces, and cities — with full Nigerian states and LGA data included.

Pricing

CountryStateCity provides a fully structured JSON database of all 250 countries, their states/regions, and cities. Nigeria's 36 states + FCT and all 774 LGAs are included. Also available as a free npm package for offline/bundled use.

Key Highlights

  • 250 countries, all states, all cities covered
  • Nigeria: 36 states + FCT + all 774 LGAs
  • Free npm package for offline/bundled use
  • 100 requests/hour free API plan
  • ISO2/ISO3 country codes included
  • Latitude/longitude for each entry
  • State flag emoji and timezone data
  • Active maintenance with regular updates

Required Access Documents

  • API Key RegistrationOptional
    Register at countrystatecity.in to get a free API key. Alternatively, install the npm package (csc-js) for completely offline use with no API key needed.

Use Cases

  • Nigerian Address Form with State and LGA Dropdowns:Use CountryStateCity to populate a dynamic three-tier dropdown (Country > State > LGA) for Nigerian user registration forms — ensuring users select valid Nigerian states and local government areas from a validated list rather than typing free text.
  • Multi-Country Checkout Form:Build a checkout form for a Nigerian e-commerce platform that ships internationally — use CountryStateCity to dynamically populate state/province dropdowns when users select any of 250 countries, ensuring valid address entry for cross-border orders.
  • Field Force App Location Picker:Build a location picker for Nigerian field agents (sales reps, delivery drivers, healthcare workers) that lets them quickly select their current state and LGA from a validated list, storing standardized location data for reporting and routing.
  • Nigerian Business Directory with LGA Filtering:Build a business directory for Nigerian SMEs where users can filter by state and LGA using CountryStateCity's full 774 LGA dataset, enabling granular geographic search across Nigeria's administrative divisions.

Discover similar API's

View All Alternatives →