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

ActiveLibrary[API Development](/categories/api)

iarcadia/magic-api-php-wrapper
==============================

An awesome API PHP wrapper.

1.0.0(8y ago)09MITPHPPHP &gt;=7.1.7

Since Feb 6Pushed 8y agoCompare

[ Source](https://github.com/iArcadia/magic-api-php-wrapper)[ Packagist](https://packagist.org/packages/iarcadia/magic-api-php-wrapper)[ RSS](/packages/iarcadia-magic-api-php-wrapper/feed)WikiDiscussions master Synced 4d ago

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

MagicApiPhpWrapper
------------------

[](#magicapiphpwrapper)

[![Packagist License](https://camo.githubusercontent.com/1094f96a39cb20b6df22bad3cf62c5efcffb3fc99a13490228d6bacce1546134/68747470733a2f2f706f7365722e707567782e6f72672f69617263616469612f6d616769632d6170692d7068702d777261707065722f6c6963656e73652e706e67)](http://choosealicense.com/licenses/mit/)[![Latest Stable Version](https://camo.githubusercontent.com/9c2525bef47b910bb493b71ca4c54a5de4a9fed2937998cdab8670839cce0e46/68747470733a2f2f706f7365722e707567782e6f72672f69617263616469612f6d616769632d6170692d7068702d777261707065722f76657273696f6e2e706e67)](https://packagist.org/packages/iarcadia/magic-api-php-wrapper)[![Total Downloads](https://camo.githubusercontent.com/611ad467b9e753982a4f76e4c494a77902e766b3f7d0a074f56b2cd8816a27b1/68747470733a2f2f706f7365722e707567782e6f72672f69617263616469612f6d616769632d6170692d7068702d777261707065722f642f746f74616c2e706e67)](https://packagist.org/packages/iarcadia/magic-api-php-wrapper)

This package is a POO-oriented **AND** procedural API PHP wrapper. With MagicApiPhpWrapper, you can easily obtain data from online API. The package includes a built-in caching system.

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

[](#installation)

Require this package with composer:

```
composer require iarcadia/magic-api-php-wrapper

```

POO-oriented usage
------------------

[](#poo-oriented-usage)

### Overview

[](#overview)

```
// "MAPW" stands for "Magic API PHP Wrapper"... of course!

// First, create your MAPW object with your configuration.
$api = new MAPW(
[
    'api.base_url' => 'https://www.your-awesome-url.com/api/',
    'api.key' => 'YourAwesomeApiKeyIfNeeded',
    'cache.use' => false,
    // ...
]);

// Second, get your data!
// Here, data will be from "https://www.your-awesome-url.com/api/countries":
$data = $api->get('countries');
// Here, data will be from "https://www.your-awesome-url.com/api/countries?from=Asia":
$data = $api->get('countries', ['from' => 'Asia']);
// Here, data will be from "https://www.your-awesome-url.com/api/cities?from=Spain&from=Italia":
$data = $api->get('https://www.your-awesome-url.com/api/cities?from=Spain&from=Italia');
```

Don't forget to `include` files or to `use` classes. (e.g. `use iArcadia\MagicApiPhpWrapper\MAPW`)

Procedural usage
----------------

[](#procedural-usage)

### Overview

[](#overview-1)

```
// First, initialize the MAPW object with your configuration.
// In background, it will create a global variable with the newly created object : $GLOBALS['MAPW_INSTANCE'] = new MAPW(...)
mapw_initialize(
[
    'api.base_url' => 'https://www.your-awesome-url.com/api/',
    'api.key' => 'YourAwesomeApiKeyIfNeeded',
    'cache.use' => false,
    // ...
])

// Second, get your data!
// Here, data will be from "https://www.your-awesome-url.com/api/countries":
$data = mapw_get('countries');
// Here, data will be from "https://www.your-awesome-url.com/api/countries?from=Asia":
$data = mapw_get('countries', ['from' => 'Asia']);
// Here, data will be from "https://www.your-awesome-url.com/api/cities?from=Spain&from=Italia":
$data = mapw_get('https://www.your-awesome-url.com/api/cities?from=Spain&from=Italia');
```

Don't forget to `include` files.

CHANGELOGS
----------

[](#changelogs)

See [CHANGELOGS.md](https://github.com/iArcadia/magic-api-php-wrapper/blob/master/CHANGELOGS.md)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3021d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0cff9d129ded6d43ac69f8862744e7ed9359f39f3c2bb89c49d736c94a4b483a?d=identicon)[iArcadia](/maintainers/iArcadia)

---

Top Contributors

[![iArcadia](https://avatars.githubusercontent.com/u/25928721?v=4)](https://github.com/iArcadia "iArcadia (5 commits)")

---

Tags

phpapiwrapper

### Embed Badge

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

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

###  Alternatives

[php-tmdb/symfony

Symfony Bundle for TMDB (The Movie Database) API. Provides easy access to the php-tmdb/api library.

3649.7k](/packages/php-tmdb-symfony)

PHPackages © 2026

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