{"id":15538172,"url":"https://github.com/ejnshtein/restcountries-js","last_synced_at":"2025-03-05T23:30:37.832Z","repository":{"id":33185053,"uuid":"154396018","full_name":"ejnshtein/restcountries-js","owner":"ejnshtein","description":"restcountries api wrapper for javascript","archived":false,"fork":false,"pushed_at":"2022-07-20T01:32:31.000Z","size":291,"stargazers_count":3,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-23T13:25:55.861Z","etag":null,"topics":["countries","restcountries-api"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/restcountries-js","language":"JavaScript","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/ejnshtein.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}},"created_at":"2018-10-23T20:58:44.000Z","updated_at":"2021-03-24T10:34:01.000Z","dependencies_parsed_at":"2022-08-07T20:15:16.093Z","dependency_job_id":null,"html_url":"https://github.com/ejnshtein/restcountries-js","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejnshtein%2Frestcountries-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejnshtein%2Frestcountries-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejnshtein%2Frestcountries-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejnshtein%2Frestcountries-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ejnshtein","download_url":"https://codeload.github.com/ejnshtein/restcountries-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242122663,"owners_count":20075339,"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":["countries","restcountries-api"],"created_at":"2024-10-02T12:02:20.741Z","updated_at":"2025-03-05T23:30:37.482Z","avatar_url":"https://github.com/ejnshtein.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Restcountries-js\n\nThis is a Javascript wrapper around API provided by [Restcountries](https://restcountries.eu).  \n\n## Installation\n\n    npm i restcountries-js\n\n## Example in Node.js\n\n```js\n    const restcountries = require('restcoutries-js')\n    restcountries().all()\n        .then(data =\u003e {\n            console.log(data)\n        })\n```\n\n## ES6 import\n\n```js\n    import restcountries from 'restcoutries-js'\n    restcoutries().all().then(data =\u003e {\n        console.log(data)\n    })\n```\n\n## Webrowser\n\n```html\n    \u003cscript src=\"/node_modules/restcountries-js/dist/restcountries.min.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n        restcoutries().all().then(data =\u003e {\n            console.log(data)\n        })\n    \u003c/script\u003e\n```\n\n## restcountries-js API\n\nYou can use your own API server, but it will work only with clone of [this](https://github.com/apilayer/restcountries). This wrapper uses https://restcountries.eu endpoint as default.\n\n#### restcountries(baseUrl)\n\n```js\n    restcountries('http://my.path.to/api').all()\n        .then(data =\u003e {\n            console.log(data)\n        })\n```\n\n### restcountries method aliases\n\n#### restcountries.all([extra])\n#### restcountries.name(name[, fullText[, extra]])\n#### restcountries.code(code[, extra])\n#### restcountries.codes(codes[, extra])\n#### restcountries.currency(currency[, extra])\n#### restcountries.capital(capital[, extra])\n#### restcountries.callingCode(callingCode[, extra])\n#### restcountries.region(region[, extra])\n#### restcountries.regionalBloc(regionalBloc[, extra])\n\nThese methods full description availble here: https://github.com/apilayer/restcountries\n\n## Contact\n\n[Telegram](https://t.me/ejnshtein) or by [email](mailto:ejnshtein@dsgstng.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejnshtein%2Frestcountries-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fejnshtein%2Frestcountries-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejnshtein%2Frestcountries-js/lists"}