PHPackages                             alzpk/restcountries-php-api-wrapper - 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. alzpk/restcountries-php-api-wrapper

ActiveLibrary[API Development](/categories/api)

alzpk/restcountries-php-api-wrapper
===================================

Restcountries.com API PHP wrapper

1.0.1(3y ago)05MITPHPPHP ^7.4|^8.0

Since Oct 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/alzpk/restcountries-php-api-wrapper)[ Packagist](https://packagist.org/packages/alzpk/restcountries-php-api-wrapper)[ RSS](/packages/alzpk-restcountries-php-api-wrapper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

PHP wrapper for Restcountries.com API
=====================================

[](#php-wrapper-for-restcountriescom-api)

Requirements
------------

[](#requirements)

```
{
  "php": "^7.4|^8.0",
  "guzzlehttp/guzzle": "^7.4",
  "ext-json": "*"
}
```

Installation
------------

[](#installation)

```
composer require alzpk/restcountries-php-api-wrapper
```

Usage examples
--------------

[](#usage-examples)

```
$client = new \Alzpk\RestCountriesPhpApiWrapper\RestCountriesClient();

// Fetch all countries
$countries = $client->all();

// Fetch countries by searching names
$countries = $client->searchByName('Denmark');
```

Client Map
----------

[](#client-map)

MethodParamsExample*all*`$client->all();`*searchByName*(string) Country name`$client->searchByName('Denmark');`*searchByCode*(string) Country code`$client->searchByCode('208');`*searchByCodes*(array) List of country codes`$client->searchByCodes(['208', '209']);`*searchByCurrency*(string) Country currency`$client->searchByCurrency('DKK');`*searchByLanguage*(string) Country language`$client->searchByLanguage('da');`*searchByCapital*(string) Country capital`$client->searchByCapital('Copenhagen');`*searchByRegion*(string) Country region`$client->searchByRegion('Europe');`*searchBySubregion*(string) Country subregion`$client->searchBySubregion('South');`More info
---------

[](#more-info)

*Check  for more info.*

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~276 days

Total

2

Last Release

1393d ago

PHP version history (2 changes)1.0.0PHP ^7.4

1.0.1PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce3d518bda28b34b8f8edbd7be003f25706e51fa3d1f8a80c523dbf99a5d2c47?d=identicon)[alzpk](/maintainers/alzpk)

---

Top Contributors

[![alzpk](https://avatars.githubusercontent.com/u/25452420?v=4)](https://github.com/alzpk "alzpk (3 commits)")[![ciungulete](https://avatars.githubusercontent.com/u/742128?v=4)](https://github.com/ciungulete "ciungulete (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alzpk-restcountries-php-api-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/alzpk-restcountries-php-api-wrapper/health.svg)](https://phpackages.com/packages/alzpk-restcountries-php-api-wrapper)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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