PHPackages                             techguy/world-countries-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. techguy/world-countries-api

ActiveLibrary[API Development](/categories/api)

techguy/world-countries-api
===========================

This package has api pointing to https://restcountries.eu. Fetches and stores all the countries in your local database.

v1.1.9(4y ago)0837MITPHP

Since Jul 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/dev-techguy/world-countries)[ Packagist](https://packagist.org/packages/techguy/world-countries-api)[ RSS](/packages/techguy-world-countries-api/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (4)Dependencies (3)Versions (13)Used By (0)

[![](https://camo.githubusercontent.com/cbde220357336e7556d006310de315cee5ad3a8fc63af67bc802f94ad2bf20f5/68747470733a2f2f6b6e6f776c656467652e77686172746f6e2e7570656e6e2e6564752f77702d636f6e74656e742f75706c6f6164732f323031392f30312f636f756e7472792d666c6167732d72616e6b696e67732e6a7067)](#)

[](#)

**World Countries API**
-----------------------

[](#world-countries-api)

 [ ![](https://camo.githubusercontent.com/fbc20ed46fa3325430eb7e6f74ca418307447e574257e41f6479f3a3a253ba4b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6465762d746563686775792f776f726c642d636f756e74726965732e737667) ](https://github.com/dev-techguy/world-countries/issues) [ ![](https://camo.githubusercontent.com/ce9f8e3591ae833f52903becf8123b1a75261d746f0e569cf75d25c688586e49/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6465762d746563686775792f776f726c642d636f756e7472696573) ](https://github.com/dev-techguy/world-countries/network/members) [ ![](https://camo.githubusercontent.com/d8a8ec94c7d44dba4981f854e80fedd11ca03b0755b64ef142864f6b43d1a4f2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6465762d746563686775792f776f726c642d636f756e7472696573) ](https://github.com/dev-techguy/world-countries/stargazers) [ ![](https://camo.githubusercontent.com/0672e1b594714e666be76aeccd17e4c2f28b1f5f18df9b346888f1e796e366f2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6465762d746563686775792f776f726c642d636f756e74726965732e737667) ](https://github.com/dev-techguy/world-countries/blob/master/LICENSE) [ ![](https://camo.githubusercontent.com/b8c14a9bc4419a0cdea273e1cd96cb5fcb8e99762e353901bb8aebe523c5a10c/68747470733a2f2f706f7365722e707567782e6f72672f746563686775792f776f726c642d636f756e74726965732d6170692f76) ](https://packagist.org/packages/techguy/world-countries-api) [ ![](https://camo.githubusercontent.com/491781f88b6057fa7b3a40372659c4000472a38c8c6b736e4e8dcfa51704ab8e/68747470733a2f2f706f7365722e707567782e6f72672f746563686775792f776f726c642d636f756e74726965732d6170692f646f776e6c6f616473) ](https://packagist.org/packages/techguy/world-countries-api)

Introduction
------------

[](#introduction)

This package has api pointing to . Fetches and stores all the countries in your local database.

Installing
----------

[](#installing)

The recommended way to install *world-countries-api* is through. [Composer](http://getcomposer.org).

```
# Install package via composer
composer require techguy/world-countries-api
```

Next, run the Composer command to install the latest stable version of *techguy/world-countries-api*:

```
# Update package via composer
 composer update techguy/world-countries-api --lock
```

After installing, the package will be auto discovered, But if need you may run:

```
# run for auto discovery
composer dump-autoload
```

Then run this, to get the for your own configurations:

```
php artisan vendor:publish --provider="World\Countries\WorldCountriesServiceProvider"
```

You will have to add this in the *database/seeds/DatabaseSeeder*. Before using the package model seed data for the countries:

Set your *ACCESS\_KEY* in the **.env** file.

```
COUNTRY_ACCESS_KEY=
```

```
        /**
         * Seed the application's database.
         *
         * @return void
         */
        public function run()
        {
             // other seeds...
             $this->call(\World\Countries\Seeds\WorldCountriesTableSeeder::class);
        }

         /**
         * -------------------------------------
         * This is the sample data on how the
         * country data is stored in an object
         * -------------------------------------
         */
        {
        "id": "6ad0db80-c93b-11ea-9af5-bd4193f081f6",
        "name": "Kenya",
        "slug": "kenya",
        "data": {
            "flag": "https://restcountries.eu/data/ken.svg",
            "name": "Kenya",
            "capital": "Nairobi",
            "short2Code": "KE",
            "short3Code": "KEN",
            "callingCode": "254",
            "currencyCode": "KES",
            "currencyName": "Kenyan shilling"
        },
        "deleted_at": null,
        "created_at": "2020-07-18T21:12:42.000000Z",
        "updated_at": "2020-07-18T21:12:42.000000Z"
        }
```

Usage
-----

[](#usage)

Follow the steps below on how to use the *world-countries-api*:

Version Guidance
----------------

[](#version-guidance)

VersionStatusPackagistNamespaceRepo1.xLatest`techguy/world-countries-api``World\Countries`[v1.1.7](https://github.com/dev-techguy/world-countries/releases/tag/v1.1.7)Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

For any security vulnerabilities, please email to [Bugs Support](mailto:bugs@shiftech.co.ke).

License
-------

[](#license)

This package is open-source, licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 64.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~57 days

Recently: every ~71 days

Total

11

Last Release

1556d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3eb77101c156056b3f28161aa60d2f8acbe665ccef40a5f4701eeb06902cc01?d=identicon)[dev-techguy](/maintainers/dev-techguy)

---

Top Contributors

[![general-oisebe](https://avatars.githubusercontent.com/u/154009443?v=4)](https://github.com/general-oisebe "general-oisebe (18 commits)")[![dev-techguy](https://avatars.githubusercontent.com/u/36882600?v=4)](https://github.com/dev-techguy "dev-techguy (10 commits)")

---

Tags

laravelcountriesworld

### Embed Badge

![Health badge](/badges/techguy-world-countries-api/health.svg)

```
[![Health](https://phpackages.com/badges/techguy-world-countries-api/health.svg)](https://phpackages.com/packages/techguy-world-countries-api)
```

###  Alternatives

[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[dcblogdev/laravel-xero

A Laravel Xero package

53129.1k1](/packages/dcblogdev-laravel-xero)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
