> ## Documentation Index
> Fetch the complete documentation index at: https://docs.countrystatecity.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Country State City

> Complete geographical data ecosystem with API, database tools, and export utilities for developers worldwide

The most comprehensive geographical data platform providing accurate, up-to-date information for **250 countries**, **5,299+ states/provinces**, and **153,765+ cities** worldwide. Our ecosystem includes a powerful REST API, database tools, and export utilities designed for developers building location-aware applications.

<Note>
  All data includes ISO codes, coordinates, timezones, phone codes, currencies, and administrative hierarchies to support any geographical use case.
</Note>

## Quick Start

Get up and running with Country State City data in minutes.

<CardGroup cols={3}>
  <Card title="Get API Key" icon="key" href="https://app.countrystatecity.in?source=sdk_docs&campaign=sdk_api_migration">
    Register for free API access with 100 requests per day
  </Card>

  <Card title="API Introduction" icon="code" href="/api/introduction">
    Learn the basics and make your first API call
  </Card>

  <Card title="Encyclopedia" icon="book" href="https://countrystatecity.org">
    Browse and explore geographical data interactively
  </Card>
</CardGroup>

## Core Products

### 🌐 REST API

Production-ready API serving geographical data with sub-100ms response times globally.

<CardGroup cols={2}>
  <Card title="Countries API" icon="globe" href="/api/endpoints/get-all-countries">
    Access data for 250 countries with ISO codes, phone codes, and currencies
  </Card>

  <Card title="States API" icon="map" href="/api/endpoints/get-states-by-country">
    Get states, provinces, and regions for any country
  </Card>

  <Card title="Cities API" icon="building" href="/api/endpoints/get-cities-by-state">
    Access 153,765+ cities with coordinates and timezone data
  </Card>

  <Card title="Authentication" icon="shield" href="/api/authentication">
    Secure API access with API keys
  </Card>
</CardGroup>

### 🗄️ Database Tools

Self-hosted database solutions with installation guides for popular database systems.

<CardGroup cols={3}>
  <Card title="MySQL" icon="database" href="/database/installation/mysql">
    Complete MySQL setup and optimization guide
  </Card>

  <Card title="PostgreSQL" icon="server" href="/database/installation/postgresql">
    PostgreSQL installation with performance tuning
  </Card>

  <Card title="MongoDB" icon="leaf" href="/database/installation/mongodb">
    NoSQL setup for flexible geographical queries
  </Card>

  <Card title="SQLite" icon="hard-drive" href="/database/installation/sqlite">
    Lightweight database for mobile and desktop apps
  </Card>

  <Card title="DuckDB" icon="duck" href="/database/installation/duckdb">
    Analytics-focused in-process SQL database
  </Card>

  <Card title="SQL Server" icon="microsoft" href="/database/installation/sql-server">
    Enterprise-grade Microsoft SQL Server setup
  </Card>
</CardGroup>

### 🔧 Management Tools

Keep your geographical data current with our update and export tools.

<CardGroup cols={2}>
  <Card title="Update Tool" icon="arrows-rotate" href="/tools/update-tool">
    Submit and track geographical data updates
  </Card>

  <Card title="Export Tool" icon="download" href="/tools/export-tool">
    Export data in multiple formats (JSON, CSV, SQL, XML)
  </Card>
</CardGroup>

## Developer Resources

### 📦 Official Packages

Use our offline npm and Python packages for bundled data with no API key or network requests, or the TypeScript SDK to call the live API in code for always-current data and search.

<CardGroup cols={2}>
  <Card title="npm Packages" icon="npm" href="/api/sdks/npm">
    Offline data packages plus an API-backed CLI and TypeScript SDK
  </Card>

  <Card title="Python Packages" icon="python" href="/api/sdks/python">
    Type-safe Pydantic models with lazy loading for countries, states, and cities
  </Card>

  <Card title="TypeScript SDK" icon="js" href="/api/sdks/typescript">
    Live API client for Node.js and browser — search, usage tracking, and always-current data
  </Card>
</CardGroup>

### SDKs & Integration

<CardGroup cols={3}>
  <Card title="Python API SDK" icon="python" href="/api/sdks/python#live-api-sdk">
    Build against live managed data with typed sync and async clients
  </Card>

  <Card title="All SDKs" icon="code" href="/api/sdks">
    JavaScript/TypeScript and Python packages shipped today, more languages planned
  </Card>

  <Card title="Code Examples" icon="brackets-curly" href="/api/examples">
    Real-world examples and integration patterns
  </Card>
</CardGroup>

## Use Cases

<AccordionGroup>
  <Accordion title="E-commerce & Shipping">
    Build location-aware checkout flows, shipping calculators, and address validation systems with accurate geographical data and timezone support.
  </Accordion>

  <Accordion title="Analytics & Business Intelligence">
    Enhance your analytics dashboards with geographical insights, regional performance metrics, and location-based user segmentation.
  </Accordion>

  <Accordion title="Mobile & Web Applications">
    Create location pickers, store locators, weather apps, and travel applications with comprehensive city and coordinate data.
  </Accordion>

  <Accordion title="Government & Research">
    Support policy analysis, demographic studies, and administrative systems with standardized geographical hierarchies and ISO codes.
  </Accordion>
</AccordionGroup>

## Getting Started

<Steps>
  <Step title="Choose Your Integration">
    Decide whether you need API access, self-hosted database, or data exports based on your use case and requirements.
  </Step>

  <Step title="Get API Access">
    [Register for a free API key](https://app.countrystatecity.in?source=sdk_docs\&campaign=sdk_api_migration) to start with 100 requests per day, or explore database installation guides for self-hosted solutions.
  </Step>

  <Step title="Explore the Data">
    Review our [API documentation](/api/introduction) or [database schema](/database/schema) to understand the available data structure and relationships.
  </Step>

  <Step title="Start Building">
    Follow our [code examples](/api/examples) or use one of our [official SDKs](/api/sdks) to integrate geographical data into your application.
  </Step>
</Steps>

## Support the Project

<CardGroup cols={1}>
  <Card title="Contribute" icon="code-pull-request" href="/database/contributing">
    Help improve geographical data accuracy
  </Card>
</CardGroup>

***

<Info>
  **Need help?** Reach out to our team at [api@countrystatecity.in](mailto:api@countrystatecity.in).
</Info>


## Related topics

- [Get Cities by State](/api/endpoints/get-cities-by-state.md)
- [Country State City API](/api/introduction.md)
- [Frequently Asked Questions](/api/faq.md)
- [Fuzzy Search](/api/endpoints/fuzzy-search.md)
- [Nearby Search](/api/endpoints/get-search-nearby.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.