{"id":23732341,"url":"https://github.com/pooranjoyb/places-api","last_synced_at":"2026-05-05T11:38:07.287Z","repository":{"id":65759722,"uuid":"581859594","full_name":"pooranjoyb/places-API","owner":"pooranjoyb","description":"An API created using NodeJS to serve data of all the cities of the World","archived":false,"fork":false,"pushed_at":"2023-01-04T16:15:47.000Z","size":610,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-31T04:16:32.076Z","etag":null,"topics":["api","backend-api","database","javascript","json-server","nodejs","server"],"latest_commit_sha":null,"homepage":"https://places-api-q5mi.onrender.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pooranjoyb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-24T16:07:18.000Z","updated_at":"2022-12-25T07:57:36.000Z","dependencies_parsed_at":"2023-02-08T14:35:11.462Z","dependency_job_id":null,"html_url":"https://github.com/pooranjoyb/places-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooranjoyb%2Fplaces-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooranjoyb%2Fplaces-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooranjoyb%2Fplaces-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooranjoyb%2Fplaces-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pooranjoyb","download_url":"https://codeload.github.com/pooranjoyb/places-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239852644,"owners_count":19707730,"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","backend-api","database","javascript","json-server","nodejs","server"],"created_at":"2024-12-31T04:16:33.230Z","updated_at":"2026-05-05T11:38:07.243Z","avatar_url":"https://github.com/pooranjoyb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Places-API\n\nThis is a NodeJS API containing data for all the Cities of the World. It uses a **JSON file** as the database which is available at **[Datahub](https://datahub.io/core/world-cities#data)**\n\n## Documentation\n\nYou can use ***places-API*** to fetch data and use it in your projects.\n\nThe data is extracted from [geonames](https://geonames.org), a very exhaustive list of worldwide toponyms.\n\n## Using the Fetch API\n\nThe Fetch API provides a JavaScript interface for accessing and manipulating parts of the protocol, such as requests and responses. It also provides a global fetch() method that provides an easy, logical way to fetch resources asynchronously across the network.\n\n\u003cbr\u003e\n\n```js\n\nfetch(\"https://places-api-q5mi.onrender.com/placesData\")\n.then(response =\u003e response.json())\n.then(response =\u003e {\n    response.forEach(data =\u003e {\n        console.log(JSON.stringify(data, null, 2));\n    });\n})\n\n```\n\n    NOTE that the API will return an Array of Object hence JSON.stringify() method is used.\n\n\nThe following JSON file is available in the **/placesData** endpoint of the API\n\n\u003cbr\u003e\n\n```json\n{\n    \"placesData\": [\n        {\n            \"country\": \"India\",\"\"\n            \"geonameid\": 1275339,\n            \"name\": \"Mumbai\",\n            \"subcountry\": \"Maharashtra\"\n        },\n        {\n            \"country\": \"India\",\n            \"geonameid\": 1261481,\n            \"name\": \"New Delhi\",\n            \"subcountry\": \"NCT\"\n        },\n        ...\n    ]\n}\n```\n    Data is served as an Array of Object from the server to the HTTP request\n\u003cbr\u003e\n\nThis [datapackage](https://dataprotocols.org/data-packages/) only list cities above 15,000 inhabitants. Each city is associated with its country and subcountry to reduce the number of ambiguities. Subcountry can be the name of a state (eg in United Kingdom or the United States of America) or the major administrative section (eg ‘‘region’’ in France’’).\n\n## Usage\n\n- Open Gitbash/Terminal/Windows-Powershell\n\n- Copy the following command to clone this repository in your local storage:\n```\ngit clone https://github.com/pooranjoyb/places-API.git\n```\n- Hit the Enter key.\n\nIt would take a few seconds to clone the repository onto your system.\u003cbr\u003e\n**Note:** Cloning depends on the internet connection and the time would depend on your connection bandwidth. If Git is not able to clone due to a weak connection, it would display a fatal error and the user is requested to try again until the above message does not appear.\n\n- Check in the local drive by navigating to it manually.\n\n\n## Dependencies\n\n- Nodemon (v2.0.20)\n- JSON-server (v0.17.1)\n\nInstallation\n    \n    npm install\n\n- Run the following command to run the development server\n\n```js\nnpm start\n```\n\n## Contribution\n\nContributions and Commits are apppreciated. \u003cbr\u003e \n**ADD** your own city and create a **PULL REQUEST** to contribute \n\n## Agreement\n\nThis data is provided \"as is\" without warranty or any representation of accuracy, timeliness or completeness.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooranjoyb%2Fplaces-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpooranjoyb%2Fplaces-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooranjoyb%2Fplaces-api/lists"}