PHPackages                             programmatordev/openweathermap-php-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. [HTTP &amp; Networking](/categories/http)
4. /
5. programmatordev/openweathermap-php-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

programmatordev/openweathermap-php-api
======================================

OpenWeatherMap PHP library that provides convenient access to the OpenWeatherMap API

v3.0.2(3mo ago)3201MITPHPPHP &gt;=8.1CI passing

Since Jul 18Pushed 3mo agoCompare

[ Source](https://github.com/programmatordev/openweathermap-php-api)[ Packagist](https://packagist.org/packages/programmatordev/openweathermap-php-api)[ RSS](/packages/programmatordev-openweathermap-php-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (19)Used By (0)

OpenWeatherMap PHP API
======================

[](#openweathermap-php-api)

[![Latest Version](https://camo.githubusercontent.com/d2dddb3354830509d889ebadc67569cc0bf72b05ce2064cc820229cdf6334157/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f70726f6772616d6d61746f726465762f6f70656e776561746865726d61702d7068702d6170692e7376673f7374796c653d666c61742d737175617265)](https://github.com/programmatordev/openweathermap-php-api/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Tests](https://github.com/programmatordev/openweathermap-php-api/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/programmatordev/openweathermap-php-api/actions/workflows/ci.yml?query=branch%3Amain)

OpenWeatherMap PHP library that provides convenient access to the OpenWeatherMap API.

Supports [PSR-18 HTTP clients](https://www.php-fig.org/psr/psr-18), [PSR-17 HTTP factories](https://www.php-fig.org/psr/psr-17), [PSR-6 caches](https://www.php-fig.org/psr/psr-6) and [PSR-3 logs](https://www.php-fig.org/psr/psr-3).

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

[](#requirements)

- PHP 8.1 or higher.

API Key
-------

[](#api-key)

A key is required to be able to make requests to the API. You must sign up for an [OpenWeatherMap account](https://openweathermap.org/appid#signup) to get one.

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

[](#installation)

Install the library via [Composer](https://getcomposer.org/):

```
composer require programmatordev/openweathermap-php-api
```

Basic Usage
-----------

[](#basic-usage)

Simple usage looks like:

```
use ProgrammatorDev\OpenWeatherMap\OpenWeatherMap;

// initialize
$api = new OpenWeatherMap('yourapikey');

// get current weather by coordinate (latitude, longitude)
$weather = $api->weather()->getCurrent(50, 50);
// show current temperature
echo $weather->getTemperature();
```

Documentation
-------------

[](#documentation)

- [Usage](docs/01-usage.md)
- [Configuration](docs/02-configuration.md)
- [Supported APIs](docs/03-supported-apis.md)
- [Error Handling](docs/04-error-handling.md)
- [Entities](docs/05-entities.md)

Contributing
------------

[](#contributing)

Any form of contribution to improve this library (including requests) will be welcome and appreciated. Make sure to open a pull request or issue.

License
-------

[](#license)

This project is licensed under the MIT license. Please see the [LICENSE](LICENSE) file distributed with this source code for further information regarding copyright and licensing.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance82

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~59 days

Recently: every ~157 days

Total

17

Last Release

90d ago

Major Versions

v1.4.2 → v2.0.02024-05-14

2.x-dev → v3.0.02025-11-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/831bb375fc093d45e6f6ed3d7fb1d15656db5e0a8fca6ef3e212e60aa6e698b3?d=identicon)[programmatordev](/maintainers/programmatordev)

---

Top Contributors

[![andrepimpao](https://avatars.githubusercontent.com/u/41913452?v=4)](https://github.com/andrepimpao "andrepimpao (318 commits)")

---

Tags

apiopenweathermapopenweathermap-apiphpphp8psr-17psr-18psr-3psr-6weather-apipsr-3phpapipsr-17sdkpsr-18psr-6OpenWeatherMapphp8

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/programmatordev-openweathermap-php-api/health.svg)

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

###  Alternatives

[claude-php/claude-php-sdk

A universal, framework-agnostic PHP SDK for the Anthropic Claude API with PSR compliance

13920.7k2](/packages/claude-php-claude-php-sdk)

PHPackages © 2026

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