PHPackages                             waqidevs/waqi-php-client - 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. waqidevs/waqi-php-client

ActiveLibrary[API Development](/categories/api)

waqidevs/waqi-php-client
========================

PHP wrapper for the AQICN (air quality) APIs

2.0.0(2y ago)15294MITPHPPHP ^7.2 || ^8.0

Since Sep 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/waqi-dev-community/waqi-php-client)[ Packagist](https://packagist.org/packages/waqidevs/waqi-php-client)[ Docs](https://github.com/waqi-dev-community/waqi-php-client)[ RSS](/packages/waqidevs-waqi-php-client/feed)WikiDiscussions master Synced 1mo ago

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

WAQI PHP Client
===============

[](#waqi-php-client)

PHP client library for the World Air Quality Index (WAQI) APIs. See documentation [here](https://aqicn.org/json-api/doc/). All available API modules are supported - City feed, Geolocalized feed, Search, and Map Queries.

### Installation

[](#installation)

You can install this package with composer using the command below

```
 composer require waqidevs/waqi-php-client
```

### Get API key

[](#get-api-key)

Sign up for an API key [here](https://aqicn.org/data-platform/token/)

### Making Requests

[](#making-requests)

The primary `WAQI\API` class is a factory class that creates objects for each of the API modules, allowing you to make requests to any of them with your desired request parameters. You have to first create an object for it, then access your desired API module via the object. See the code snippets below:

```
$api = new WAQI\API(WAQI_TOKEN);
```

**For City Feed:**

```
$response = $api->cityFeed()
    ->setCity("Munich")
    ->fetch();
```

**For Search:**

```
$response = $api->search()
    ->setKeyword("Johannesburg")
    ->fetch();
```

**For Lat/Lng based Geolocalized feed:**

```
$response = $api->geoFeed()
    ->setCoordinates(37.7749, -122.4194)
    ->fetch();
```

**For IP based Geolocalized feed:**

```
$response = $api->ipFeed()
    ->setIP("MY_IP")
    ->fetch();
```

**For Map Queries:**

```
$response = $api->mapStation()
    ->setMapBounds(40.712, -74.006, 34.052, -118.243)
    ->fetch();
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.9% 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

Unknown

Total

1

Last Release

964d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/658280e9b0c53401d9874ba06d593d8938ad0525e540a82b1b2921619ff3e72b?d=identicon)[omoniyi](/maintainers/omoniyi)

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

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

---

Top Contributors

[![niyiomotoso](https://avatars.githubusercontent.com/u/6876434?v=4)](https://github.com/niyiomotoso "niyiomotoso (117 commits)")[![Kingdageek](https://avatars.githubusercontent.com/u/22563387?v=4)](https://github.com/Kingdageek "Kingdageek (5 commits)")

---

Tags

airqualityandroidaqiaqicndev-communitydevsiosopensourcewaqiwebapiwrapperair qualityWAQIAQICN

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/waqidevs-waqi-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/waqidevs-waqi-php-client/health.svg)](https://phpackages.com/packages/waqidevs-waqi-php-client)
```

###  Alternatives

[gabrielbull/ups-api

PHP UPS API

4642.4M10](/packages/gabrielbull-ups-api)[azuyalabs/waqi

Simple PHP Wrapper for the World Air Quality Index API

2423.1k](/packages/azuyalabs-waqi)[dariusiii/tmdb-laravel

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

1821.1k](/packages/dariusiii-tmdb-laravel)[walle89/swedbank-json

Unofficial API client for the Swedbank's and Sparbanken's mobile apps in Sweden.

752.5k](/packages/walle89-swedbank-json)[lasserafn/laravel-economic

Economic REST wrapper for Laravel

1118.5k](/packages/lasserafn-laravel-economic)[sysmoh/nextcloud-api-wrapper

A simple wrapper around nextcloud user provisioning api

177.3k2](/packages/sysmoh-nextcloud-api-wrapper)

PHPackages © 2026

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