{"id":38590864,"url":"https://github.com/devmehq/world-countries","last_synced_at":"2026-01-17T08:23:57.708Z","repository":{"id":318542664,"uuid":"1039466623","full_name":"devmehq/world-countries","owner":"devmehq","description":"World Countries information in JSON","archived":false,"fork":false,"pushed_at":"2025-10-07T18:59:21.000Z","size":236,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-07T20:44:05.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/devmehq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-17T09:47:30.000Z","updated_at":"2025-08-19T14:08:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"233c7f43-5264-436c-9162-e3ca6baee101","html_url":"https://github.com/devmehq/world-countries","commit_stats":null,"previous_names":["devmehq/world-countries"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/devmehq/world-countries","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmehq%2Fworld-countries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmehq%2Fworld-countries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmehq%2Fworld-countries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmehq%2Fworld-countries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devmehq","download_url":"https://codeload.github.com/devmehq/world-countries/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmehq%2Fworld-countries/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-17T08:23:57.583Z","updated_at":"2026-01-17T08:23:57.662Z","avatar_url":"https://github.com/devmehq.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# World Countries\n\nComprehensive world countries data including names, codes, capitals, currencies, languages, and more. Available for TypeScript, PHP, Ruby, and Python.\n\n## Features\n\n- 🌍 **Complete Coverage**: Data for all world countries\n- 🏛️ **Rich Information**: Country names, native names, capitals, currencies, languages, phone codes, continents, and emoji flags\n- 🔍 **Smart Search**: Search by name, code, continent, currency, language, or phone code\n- 📦 **Multi-Language Support**: Available for TypeScript/JavaScript, PHP, Ruby, and Python\n- 🎯 **Type-Safe**: Full TypeScript support with type definitions\n- ⚡ **Lightweight**: Zero dependencies, pure JSON data\n- 🔄 **ISO Standards**: Follows ISO 3166-1 alpha-2 country codes\n\n## Installation\n\n### TypeScript/JavaScript (npm)\n\n```bash\nnpm install @devmehq/world-countries\n```\n\n### PHP (Composer)\n\n```bash\ncomposer require devmehq/world-countries\n```\n\n### Ruby (Gem)\n\n```bash\ngem install world_countries\n```\n\n### Python (pip)\n\n```bash\npip install world-countries\n```\n\n## Usage\n\n### TypeScript/JavaScript\n\n```typescript\nimport { WorldCountries } from '@devmehq/world-countries';\n\nconst countries = new WorldCountries();\n\n// Get all countries\nconst allCountries = countries.getAll();\n\n// Get country by code\nconst usa = countries.getByCode('US');\nconsole.log(usa);\n// { name: 'United States', native: 'United States', phone: [1], ... }\n\n// Search countries\nconst results = countries.search('united');\n\n// Get countries by continent\nconst europeanCountries = countries.getByContinent('EU');\n\n// Get countries by currency\nconst euroCountries = countries.getByCurrency('EUR');\n\n// Get countries by language\nconst spanishCountries = countries.getByLanguage('es');\n\n// Get countries by phone code\nconst countriesWithCode1 = countries.getByPhoneCode(1);\n```\n\n### PHP\n\n```php\n\u003c?php\nuse DevMe\\WorldCountries\\WorldCountries;\n\n$countries = new WorldCountries();\n\n// Get all countries\n$allCountries = $countries-\u003egetAll();\n\n// Get country by code\n$usa = $countries-\u003egetByCode('US');\n\n// Search countries\n$results = $countries-\u003esearch('united');\n\n// Get countries by continent\n$europeanCountries = $countries-\u003egetByContinent('EU');\n\n// Get countries by currency\n$euroCountries = $countries-\u003egetByCurrency('EUR');\n```\n\n### Ruby\n\n```ruby\nrequire 'world_countries'\n\ncountries = WorldCountries::Countries.new\n\n# Get all countries\nall_countries = countries.all\n\n# Get country by code\nusa = countries.get_by_code('US')\n\n# Search countries\nresults = countries.search('united')\n\n# Get countries by continent\neuropean_countries = countries.get_by_continent('EU')\n\n# Get countries by currency\neuro_countries = countries.get_by_currency('EUR')\n```\n\n### Python\n\n```python\nfrom world_countries import WorldCountries\n\ncountries = WorldCountries()\n\n# Get all countries\nall_countries = countries.get_all()\n\n# Get country by code\nusa = countries.get_by_code('US')\n\n# Search countries\nresults = countries.search('united')\n\n# Get countries by continent\neuropean_countries = countries.get_by_continent('EU')\n\n# Get countries by currency\neuro_countries = countries.get_by_currency('EUR')\n```\n\n## Data Structure\n\nEach country contains the following information:\n\n```json\n{\n  \"US\": {\n    \"name\": \"United States\",\n    \"native\": \"United States\",\n    \"phone\": [1],\n    \"continent\": \"NA\",\n    \"capital\": \"Washington D.C.\",\n    \"currency\": [\"USD\", \"USN\", \"USS\"],\n    \"languages\": [\"en\"],\n    \"emoji\": \"🇺🇸\",\n    \"emojiU\": \"U+1F1FA U+1F1F8\"\n  }\n}\n```\n\n### Fields\n\n- **name**: Country name in English\n- **native**: Country name in its native language\n- **phone**: Array of international calling codes\n- **continent**: Continent code (AF, AN, AS, EU, NA, OC, SA)\n- **capital**: Capital city name\n- **currency**: Array of currency codes (ISO 4217)\n- **languages**: Array of language codes (ISO 639-1)\n- **emoji**: Country flag emoji\n- **emojiU**: Unicode representation of the flag emoji\n\n## API Methods\n\nAll implementations provide these core methods:\n\n| Method | Description | Returns |\n|--------|-------------|---------|\n| `getAll()` / `get_all()` | Get all countries | Object/Dict with all countries |\n| `getByCode(code)` / `get_by_code(code)` | Get country by ISO code | Country object or null |\n| `getByName(name)` / `get_by_name(name)` | Get country by name | Country object with code or null |\n| `getByContinent(continent)` / `get_by_continent(continent)` | Get countries by continent | Object/Dict of matching countries |\n| `getByCurrency(currency)` / `get_by_currency(currency)` | Get countries by currency | Object/Dict of matching countries |\n| `getByLanguage(language)` / `get_by_language(language)` | Get countries by language | Object/Dict of matching countries |\n| `getByPhoneCode(code)` / `get_by_phone_code(code)` | Get countries by phone code | Object/Dict of matching countries |\n| `search(query)` | Search countries by name/code/capital | Object/Dict of matching countries |\n| `getAllCodes()` / `get_all_codes()` | Get all country codes | Array/List of codes |\n| `getAllNames()` / `get_all_names()` | Get all country names | Array/List of names |\n| `getAllCapitals()` / `get_all_capitals()` | Get all unique capitals | Array/List of capitals |\n| `getAllContinents()` / `get_all_continents()` | Get all unique continents | Array/List of continents |\n| `getAllCurrencies()` / `get_all_currencies()` | Get all unique currencies | Array/List of currencies |\n| `getAllLanguages()` / `get_all_languages()` | Get all unique languages | Array/List of languages |\n| `count()` | Get total number of countries | Number |\n\n## Continent Codes\n\n- **AF**: Africa\n- **AN**: Antarctica\n- **AS**: Asia\n- **EU**: Europe\n- **NA**: North America\n- **OC**: Oceania\n- **SA**: South America\n\n## Examples\n\n### Find Countries in Multiple Ways\n\n```javascript\nconst countries = new WorldCountries();\n\n// Get all English-speaking countries\nconst englishSpeaking = countries.getByLanguage('en');\n\n// Get all countries using US Dollar\nconst usdCountries = countries.getByCurrency('USD');\n\n// Get all Asian countries\nconst asianCountries = countries.getByContinent('AS');\n\n// Search for countries with \"island\" in the name\nconst islandNations = countries.search('island');\n\n// Get country by multiple criteria\nconst spain = countries.getByCode('ES');\nconst spainByName = countries.getByName('Spain');\n\n// Get statistics\nconsole.log(`Total countries: ${countries.count()}`);\nconsole.log(`Total currencies: ${countries.getAllCurrencies().length}`);\nconsole.log(`Total languages: ${countries.getAllLanguages().length}`);\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT License - see LICENSE file for details\n\n## Credits\n\nCreated and maintained by [DevMe](https://github.com/devmehq)\n\n## Related Projects\n\n- [World Currencies](https://github.com/devmehq/world-currencies) - Comprehensive world currencies data\n\n## Support\n\nFor issues and feature requests, please use the [GitHub issues page](https://github.com/devmehq/world-countries/issues).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmehq%2Fworld-countries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevmehq%2Fworld-countries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmehq%2Fworld-countries/lists"}