{"id":20522080,"url":"https://github.com/pannh/rest-countries","last_synced_at":"2025-03-06T00:28:31.880Z","repository":{"id":237908217,"uuid":"795188829","full_name":"PannH/rest-countries","owner":"PannH","description":"A type-safe and seamless wrapper for the REST Countries API v3.1 (https://restcountries.com/)","archived":false,"fork":false,"pushed_at":"2024-05-06T10:09:31.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T10:38:54.750Z","etag":null,"topics":["api","countries","easy-to-use","geography","library","npm","package","rest-countries","typesafe","typescript","wrapper"],"latest_commit_sha":null,"homepage":"https://pannh.github.io/rest-countries/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PannH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2024-05-02T18:54:54.000Z","updated_at":"2024-05-06T10:09:34.000Z","dependencies_parsed_at":"2024-05-03T15:18:35.103Z","dependency_job_id":"b0de55cc-88e6-4516-be14-240f878223e8","html_url":"https://github.com/PannH/rest-countries","commit_stats":null,"previous_names":["pannh/rest-countries"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PannH%2Frest-countries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PannH%2Frest-countries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PannH%2Frest-countries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PannH%2Frest-countries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PannH","download_url":"https://codeload.github.com/PannH/rest-countries/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242127461,"owners_count":20076117,"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","countries","easy-to-use","geography","library","npm","package","rest-countries","typesafe","typescript","wrapper"],"created_at":"2024-11-15T22:33:53.848Z","updated_at":"2025-03-06T00:28:31.859Z","avatar_url":"https://github.com/PannH.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST Countries\nThis library is a wrapper for the [REST Countries API (v3.1)](https://restcountries.com/) to access information about 250 countries around the world easily and is written in TypeScript to ensure type safety and provide a better developer experience.\n\n## Links\n- [REST Countries API](https://restcountries.com/)\n- [GitHub](https://github.com/PannH/rest-countries)\n- [npm](https://www.npmjs.com/package/rest-countries)\n- [Documentation](https://pannh.github.io/rest-countries/)\n- [Contact me](https://bento.me/pannh)\n\n## Installation\n```bash\nnpm i rest-countries\n\nyarn add rest-countries\n\npnpm add rest-countries\n\nbun add rest-countries\n```\n\n## Example\n```typescript\nimport { getAll, searchByName } from 'rest-countries';\n\n// Fetch all the countries\nconst countries = await getAll();\n\n// Fetch all the countries with filtered fields (this will make the request faster)\nconst countries = await getAll(['name', 'capital', 'population']);\n\n// Search amoung countries by their name\nconst countries = await searchByName('Vietnam');\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpannh%2Frest-countries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpannh%2Frest-countries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpannh%2Frest-countries/lists"}