DEV.co
Open-Source Databases · uiwjs

province-city-china

province-city-china is a JavaScript dataset package providing complete administrative division data for China (provinces, cities, counties, towns) in JSON, CSV, and SQL formats. It is sourced from official Chinese government records and regularly updated, making it suitable for location-based services and address validation in Chinese applications.

Source: GitHub — github.com/uiwjs/province-city-china
3k
GitHub stars
576
Forks
JavaScript
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryuiwjs/province-city-china
Owneruiwjs
Primary languageJavaScript
LicenseMIT — OSI-approved
Stars3k
Forks576
Open issues21
Latest releasev8.5.8 (2024-09-05)
Last updated2026-04-21
Sourcehttps://github.com/uiwjs/province-city-china

What province-city-china is

A zero-dependency Node.js/JavaScript module exporting hierarchical Chinese administrative boundary data with GB2260 codes. Data is available in multiple formats (JSON, CSV, SQL) and covers five administrative levels per PRC standards, with version history showing periodic updates against official government sources.

Quickstart

Get the province-city-china source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/uiwjs/province-city-china.gitcd province-city-china# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Address validation and form completion

Use the hierarchical province-city-county-town structure to validate user-entered addresses and provide autocomplete dropdowns in Chinese e-commerce, logistics, or financial applications.

Geographic data imports for regional reporting

Import the SQL or CSV formats directly into databases to support regional segmentation, regional compliance checks, or geographic analytics in SaaS platforms serving Chinese markets.

Shipping and logistics route planning

Leverage the administrative boundary codes and hierarchical relationships to optimize routing, regional delivery zones, and address standardization in logistics platforms.

Implementation considerations

  • No dependencies simplifies bundling and reduces supply chain risk; however, ensure data freshness aligns with your business requirements (last explicit update in README is 2021/03/22).
  • Multiple export formats (JSON, CSV, SQL) allow flexible integration; verify the JSON structure and hierarchical depth match your application's address model before committing.
  • The data reflects PRC administrative divisions; users or regulators in disputed territories may require custom handling or disclaimers.
  • The package is language-agnostic (data is structured, not code); integration in non-JavaScript stacks requires only parsing JSON/CSV/SQL, but no official SDKs exist for other runtimes.
  • Repository activity shows the project was last pushed in 2026 (likely system-date artifact); examine recent issue and PR activity to gauge actual maintenance momentum.

When to avoid it — and what to weigh

  • Real-time geographic or boundary updates required — The dataset is static and sourced periodically from government records; it is not suitable for applications requiring real-time boundary or administrative division changes.
  • Multi-country or global administrative data needed — This package is China-specific. If your application requires international or multi-region administrative data, you will need supplementary or alternative sources.
  • High-precision geospatial mapping or GIS analysis — The dataset provides administrative codes and hierarchy but does not include geographic coordinates, shapefiles, or boundary polygons needed for GIS or mapping applications.
  • Frequent updates with minimal vendor control — Data updates depend on community and maintainer contributions; if your compliance or business logic requires guaranteed SLA-backed data freshness, consider commercial alternatives or official government APIs.

License & commercial use

MIT License. Permissive, OSI-approved license allows unrestricted use, modification, and redistribution in commercial and proprietary applications, provided the original license notice is retained.

MIT License permits commercial use without fee or license agreement; however, the underlying data is sourced from PRC government records. Verify that your use case and jurisdiction do not impose additional restrictions on derived works or data redistribution. No commercial warranty or indemnification is provided by the maintainer; assess liability and data accuracy risks internally.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceModerate
DocumentationAdequate
License clarityClear
Deployment complexityLow
DEV.co fitGood
Assessment confidenceMedium
Security considerations

The package contains no executable code or network functionality; security risk is minimal from the code itself. The primary consideration is data provenance: verify that the official Chinese government sources (mca.gov.cn, stats.gov.cn) are trustworthy for your use case. If bundling administrative data in a public API or client-side application, ensure no sensitive inferences or privacy risks arise from publishing region codes. No additional encryption, authentication, or access controls are provided by the package.

Alternatives to consider

Alibaba AliGenie (Chinese administrative data APIs)

Commercial, API-based alternative with real-time updates and higher SLA. Requires authentication and fees. Suitable if you need guaranteed freshness and vendor support.

Official PRC Government Administrative Division APIs (mca.gov.cn, stats.gov.cn)

Authoritative, up-to-date source directly from Chinese government ministries. May require custom parsing and integration. Preferred for compliance-critical applications but no official public API published.

Mapbox or Google Maps administrative boundary datasets

Global, well-maintained alternatives with geographic coordinates and GIS support. Higher cost and broader feature set; preferable if you need international coverage or mapping capabilities.

Software development agency

Build on province-city-china with DEV.co software developers

Evaluate whether this dataset meets your freshness, compliance, and feature requirements. If you need real-time updates, GIS support, or commercial SLA guarantees, consider Mapbox, Google Maps, or official Chinese government APIs. For static, hierarchical address lookups in Chinese applications, this package offers a low-dependency, permissively licensed solution.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

province-city-china FAQ

Is the data current and compliant with the latest PRC administrative divisions?
The README cites government sources updated as recently as 2021-12-30 (stats.gov.cn). However, the npm package's last explicit data update in the README is 2021/03/22. Verify against official government records (mca.gov.cn, stats.gov.cn) before deploying to production, especially if your application has regulatory or compliance requirements.
Can I use this data in a commercial SaaS product?
Yes, the MIT License permits commercial use. However, you must retain the license notice and assess any liability related to data accuracy and currency. The maintainer provides no warranty; you assume responsibility for data correctness in your application.
What format should I choose: JSON, CSV, or SQL?
JSON is easiest for JavaScript/Node.js applications and client-side use. CSV is suitable for imports into spreadsheet tools or as an intermediate format. SQL is ideal for direct database seeding. All three represent the same data; choose based on your integration tooling and deployment pipeline.
Does this package include geographic coordinates or map boundaries?
No. The package provides administrative codes, names, and hierarchical relationships only. If you need map visualization, geospatial queries, or coordinates, you must integrate a supplementary GIS library or dataset (e.g., Mapbox, Google Maps, or a dedicated geospatial database).

Work with a software development agency

DEV.co helps companies turn open-source tools like province-city-china into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source databases stack.

Ready to integrate Chinese administrative data?

Evaluate whether this dataset meets your freshness, compliance, and feature requirements. If you need real-time updates, GIS support, or commercial SLA guarantees, consider Mapbox, Google Maps, or official Chinese government APIs. For static, hierarchical address lookups in Chinese applications, this package offers a low-dependency, permissively licensed solution.