{"id":13405162,"url":"https://github.com/dr5hn/countries-states-cities-database","last_synced_at":"2025-05-10T05:21:55.482Z","repository":{"id":37534467,"uuid":"141720301","full_name":"dr5hn/countries-states-cities-database","owner":"dr5hn","description":"🌍 Discover our global repository of countries, states, and cities!  🏙️ Get comprehensive data in JSON, SQL, PSQL, SQLSERVER, MONGODB, SQLITE, XML, YAML, and CSV formats. Access ISO2, ISO3 codes, country code, capital, native language, timezones (for countries), and more. #countries #states #cities","archived":false,"fork":false,"pushed_at":"2025-05-07T12:05:34.000Z","size":1935025,"stargazers_count":8249,"open_issues_count":34,"forks_count":2765,"subscribers_count":123,"default_branch":"master","last_synced_at":"2025-05-08T18:17:08.176Z","etag":null,"topics":["api","cities","countries","countries-states-cities","country","country-state-city","csv","geographical-data","hacktoberfest","json","mysql","psql","region","regions","sql","state","states","world-regions","xml","yaml"],"latest_commit_sha":null,"homepage":"http://demo.countrystatecity.in/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"odbl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dr5hn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"dr5hn","ko_fi":"dr5hn"}},"created_at":"2018-07-20T14:13:45.000Z","updated_at":"2025-05-08T13:05:45.000Z","dependencies_parsed_at":"2023-02-14T08:46:03.121Z","dependency_job_id":"3131ebdf-f49d-4aaa-861a-2cf0b812828b","html_url":"https://github.com/dr5hn/countries-states-cities-database","commit_stats":{"total_commits":571,"total_committers":67,"mean_commits":8.522388059701493,"dds":0.5446584938704029,"last_synced_commit":"b9d0d70c2cc3d23fbd76a5c91f29f59359541258"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr5hn%2Fcountries-states-cities-database","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr5hn%2Fcountries-states-cities-database/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr5hn%2Fcountries-states-cities-database/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dr5hn%2Fcountries-states-cities-database/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dr5hn","download_url":"https://codeload.github.com/dr5hn/countries-states-cities-database/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253124570,"owners_count":21857697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cities","countries","countries-states-cities","country","country-state-city","csv","geographical-data","hacktoberfest","json","mysql","psql","region","regions","sql","state","states","world-regions","xml","yaml"],"created_at":"2024-07-30T19:01:56.737Z","updated_at":"2025-05-08T22:30:36.539Z","avatar_url":"https://github.com/dr5hn.png","language":"PHP","funding_links":["https://github.com/sponsors/dr5hn","https://ko-fi.com/dr5hn"],"categories":["Python","PHP","TSQL","武器库"],"sub_categories":["其他"],"readme":"![banner](https://github.com/dr5hn/countries-states-cities-database/raw/master/.github/banner.png)\n\n# 🌍 Countries States Cities Database\n![release](https://img.shields.io/github/v/release/dr5hn/countries-states-cities-database?style=flat-square)\n![size](https://img.shields.io/github/repo-size/dr5hn/countries-states-cities-database?label=size\u0026style=flat-square)\n\nFull Database of city state country available in JSON, MYSQL, PSQL, SQLITE, XML, YAML, MONGODB \u0026 CSV format.\nAll Countries, States \u0026 Cities are Covered \u0026 Populated with Different Combinations \u0026 Versions.\n## API 🚀\n🎉 Introducing **API** for Countries States Cities Database.\n\n[API Documentation](https://countrystatecity.in/)\n\n[![banner](.github/api.png)](https://countrystatecity.in/)\n\n## Available Formats\n- JSON\n- MYSQL\n- PSQL\n- SQLITE\n- SQLSERVER\n- MONGODB\n- XML\n- YAML\n- CSV\n\n## Distribution Files Info\n| File                       | JSON               | MYSQL              | PSQL               | SQLITE             | SQLSERVER          | MONGODB            | XML                | YAML               | CSV                |\n| :------------------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- |\n| Regions                    | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |\n| Subregions                 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |\n| Countries                  | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |\n| States                     | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |\n| Cities                     | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |\n| Country+States             | :white_check_mark: | NA                 | NA                 | NA                 | NA                 | NA                 | NA                 | NA                 | NA                 | NA                 |\n| Country+Cities             | :white_check_mark: | NA                 | NA                 | NA                 | NA                 | NA                 | NA                 | NA                 | NA                 | NA                 |\n| Country+State+Cities/World | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | NA                 | NA                 | NA                 | NA                 |\n\n## Demo\nhttps://dr5hn.github.io/countries-states-cities-database/\n\n## Insights\nTotal Regions : 6 \u003cbr\u003e\nTotal Sub Regions : 22 \u003cbr\u003e\nTotal Countries : 250 \u003cbr\u003e\nTotal States/Regions/Municipalities : 5,038 \u003cbr\u003e\nTotal Cities/Towns/Districts : 151,024 \u003cbr\u003e\n\nLast Updated On : 01th Apr 2025\n\n## Next API Database Update\n\nThe API database is regularly updated to ensure the latest data is available to users. The next scheduled update is on:\n\n**Upcoming API Database Update Date:** 8th April 2025\n\nPlease note that this date is subject to change based on unforeseen circumstances. Although we strive to adhere to the schedule, there may be instances where the update date is missed. We apologize for any inconvenience caused in such cases.\n\nWe appreciate your understanding and patience. Thank you for using the Countries States Cities Database!\n\n## Import MongoDB\n\nHow to import MongoDB database?\n\n```bash\n# First extract the tar.gz file\ntar -xzvf world-mongodb-dump.tar.gz\n\n# Then restore the MongoDB dump\nmongorestore --host localhost:27017 --db world mongodb-dump/world\n```\n\n## License\nThis **Countries States Cities Database** is made available under the [Open Database License](https://github.com/dr5hn/countries-states-cities-database/blob/master/LICENSE). Any rights in individual contents of the database are licensed under the [Database Contents License](https://github.com/dr5hn/countries-states-cities-database/blob/master/.github/CONTENT_LICENSE).\n\n## Contributing\n\n:+1::tada: First off, thanks for your interest in contributing! :tada::+1:\n\n### Using Our Database Update Tool\n\nWe've launched a dedicated web tool to make contributing to this database easier than ever!\n\n**[CSC Update Tool](https://manager.countrystatecity.in/)** - Our official tool to submit database change requests\n\n[![banner](.github/update-tool.png)](https://manager.countrystatecity.in/)\n\nThe update tool allows you to:\n- Browse and search through all regions, subregions, countries, states, and cities\n- Easily identify and correct outdated or inaccurate data\n- Submit change requests through a streamlined review process\n- Track the status of your submissions\n\n### Alternative Manual Process\n\nIf you prefer to contribute directly through GitHub, you can still follow these steps:\n\n1. Fork the repository and clone it to your local machine\n2. Make the necessary changes to the data:\n   - To fix cities records, update the `sql/world.sql` \u003e cities Table\n   - To fix states/provinces records, update the `sql/world.sql` \u003e states Table\n   - To fix countries records, update the `sql/world.sql` \u003e countries Table\n   - To fix regions records, update the `sql/world.sql` \u003e regions Table\n   - To fix subregions records, update the `sql/world.sql` \u003e subregions Table\n3. Once you've made the changes, create a pull request with a clear description of the modifications you've made\n\nPlease ensure your contributions align with our data standards and formatting. You can find the detailed contribution guidelines [here](https://github.com/dr5hn/countries-states-cities-database/blob/master/.github/CONTRIBUTING.md).\n\nWe review all submissions carefully to maintain data quality and appreciate your help in making this database more accurate and comprehensive.\n\n## Repo Activity\n\n![Repo Activity](https://repobeats.axiom.co/api/embed/635051d1a8be17610a967b7b07b65c0148f13654.svg \"Repobeats analytics image\")\n\nAs always, thanks to our amazing contributors!\n\n\u003ca href=\"https://github.com/dr5hn/countries-states-cities-database/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=dr5hn/countries-states-cities-database\u0026anon=1\" /\u003e\n\u003c/a\u003e\n\nMade with [contrib.rocks](https://contrib.rocks).\n\n## Sponsors\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cdn.jsdelivr.net/gh/dr5hn/static/sponsors.svg\"\u003e\n    \u003cimg src='https://cdn.jsdelivr.net/gh/dr5hn/static/sponsors.svg'/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Make the world more Greener 🌴\nContribute towards better earth [**buy the world a tree**](https://ecologi.com/darshangada?r=60f2a36e67efcb18f734ffb8)\n\n## Other Publishings\nFind this project on \n* [data.world](https://data.world/dr5hn/country-state-city)\n* [kaggle](https://www.kaggle.com/datasets/darshangada/countries-states-cities-database/data)\n\n\n## Follow me at\n\u003ca href=\"https://github.com/dr5hn/\"\u003e\u003cimg alt=\"Github @dr5hn\" src=\"https://img.shields.io/static/v1?logo=github\u0026message=Github\u0026color=black\u0026style=flat-square\u0026label=\" /\u003e\u003c/a\u003e \u003ca href=\"https://twitter.com/dr5hn/\"\u003e\u003cimg alt=\"Twitter @dr5hn\" src=\"https://img.shields.io/static/v1?logo=twitter\u0026message=Twitter\u0026color=black\u0026style=flat-square\u0026label=\" /\u003e\u003c/a\u003e \u003ca href=\"https://www.linkedin.com/in/dr5hn/\"\u003e\u003cimg alt=\"LinkedIn @dr5hn\" src=\"https://img.shields.io/static/v1?logo=linkedin\u0026message=LinkedIn\u0026color=black\u0026style=flat-square\u0026label=\u0026link=https://twitter.com/dr5hn\" /\u003e\u003c/a\u003e\n\n## 🙋‍♂️ Support My Work\n[![Github Sponsorship](https://raw.githubusercontent.com/dr5hn/dr5hn/main/.github/resources/github_sponsor_btn.svg)](https://github.com/sponsors/dr5hn)\n\n[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/dr5hn)\n\n\n## Suggestions / Feedbacks\n```\nSuggestions \u0026 Feedbacks are Most Welcome\ngadadarshan[at]gmail[dot]com\n```\n\n## Disclaimer\nPlease note that while every effort has been made to ensure the accuracy and completeness of the Countries States Cities Database, it may still contain errors or omissions. The database is continuously being refined and improved based on user feedback and contributions.\n\nContributors are encouraged to review the Contribution Guidelines and follow the specified guidelines for updating and correcting data in the database. However, due to the collaborative nature of the project, we cannot guarantee the absolute accuracy or reliability of the information provided.\n\nThe Countries States Cities Database is made available under the Open Database License, and any rights in individual contents of the database are licensed under the Database Contents License. Users are responsible for independently verifying the data and using it at their own discretion.\n\nWe appreciate the efforts of contributors in identifying and addressing issues in the database, and we encourage users to report any inaccuracies or suggest improvements through creating issues. However, please note that the database may not always reflect the latest geopolitical changes or political status.\n\nIt is recommended that users consult official sources and corroborate the data from the Countries States Cities Database with other reliable references for critical applications or decision-making processes.\n\nBy accessing and using the Countries States Cities Database, users acknowledge and agree to the aforementioned disclaimer and the terms of the Open Database License and the Database Contents License.\n\nThat's all Folks. Enjoy.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdr5hn%2Fcountries-states-cities-database","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdr5hn%2Fcountries-states-cities-database","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdr5hn%2Fcountries-states-cities-database/lists"}