PHPackages                             php-weather/openweathermap - 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. php-weather/openweathermap

ActiveLibrary

php-weather/openweathermap
==========================

OpenWeatherMap provider

0.2.1(2y ago)0171MITPHPPHP ^8

Since Aug 4Pushed 2y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (5)Versions (6)Used By (0)

PHP Weather Provider for OpenWeatherMap
=======================================

[](#php-weather-provider-for-openweathermap)

[![Packagist Version](https://camo.githubusercontent.com/b7bc58d03675964d452c33149d32b0ecc7efda1ae4f53a499b80a1c1aca188e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068702d776561746865722f6f70656e776561746865726d6170)](https://camo.githubusercontent.com/b7bc58d03675964d452c33149d32b0ecc7efda1ae4f53a499b80a1c1aca188e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068702d776561746865722f6f70656e776561746865726d6170)
[![PHP Weather Common Version](https://camo.githubusercontent.com/75ed5d37d86ecdd60e25bfdc05a613d4ea986c9c127116b1e2b62646488c8709/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706870776561746865722d2d636f72652d302e342e2a2d627269676874677265656e)](https://camo.githubusercontent.com/75ed5d37d86ecdd60e25bfdc05a613d4ea986c9c127116b1e2b62646488c8709/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706870776561746865722d2d636f72652d302e342e2a2d627269676874677265656e)[![PHP Weather HTTP Provider Version](https://camo.githubusercontent.com/58bc1486a43378bfb71eed9e785590d2efb55bf7a5052e2a76535e6d6a061f8c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706870776561746865722d2d687474702d2d70726f76696465722d302e362e2a2d627269676874677265656e)](https://camo.githubusercontent.com/58bc1486a43378bfb71eed9e785590d2efb55bf7a5052e2a76535e6d6a061f8c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706870776561746865722d2d687474702d2d70726f76696465722d302e362e2a2d627269676874677265656e)
[![GitHub Release Date](https://camo.githubusercontent.com/bf5b06563f21aebb96a5df0e46cb5dca443deb6903ead7ad2c172c6129692423/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f7068702d776561746865722f6f70656e776561746865726d6170)](https://camo.githubusercontent.com/bf5b06563f21aebb96a5df0e46cb5dca443deb6903ead7ad2c172c6129692423/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f7068702d776561746865722f6f70656e776561746865726d6170)[![GitHub commits since tagged version](https://camo.githubusercontent.com/8c885d5aed15a3c08d23fccdd343ec6615ecbf49515d3babea5b978c1e06f3a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d6974732d73696e63652f7068702d776561746865722f6f70656e776561746865726d61702f302e322e31)](https://camo.githubusercontent.com/8c885d5aed15a3c08d23fccdd343ec6615ecbf49515d3babea5b978c1e06f3a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d6974732d73696e63652f7068702d776561746865722f6f70656e776561746865726d61702f302e322e31)[![GitHub last commit](https://camo.githubusercontent.com/df296079d759a9601dece603048d0974dede9311eb66d1729bd45903f8e83a31/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f7068702d776561746865722f6f70656e776561746865726d6170)](https://camo.githubusercontent.com/df296079d759a9601dece603048d0974dede9311eb66d1729bd45903f8e83a31/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f7068702d776561746865722f6f70656e776561746865726d6170)
[![GitHub Workflow Status](https://camo.githubusercontent.com/e22820bd51cb0715b4e780704e2dfb0280f1dabf5a94ec8b43c22ba4d72c1e3c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7068702d776561746865722f6f70656e776561746865726d61702f7068702e796d6c3f6272616e63683d6d61696e)](https://camo.githubusercontent.com/e22820bd51cb0715b4e780704e2dfb0280f1dabf5a94ec8b43c22ba4d72c1e3c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7068702d776561746865722f6f70656e776561746865726d61702f7068702e796d6c3f6272616e63683d6d61696e)[![GitHub](https://camo.githubusercontent.com/0c0f3a0498210b9840d6ed58b6596160da5e8305986d47058cb111ed22bd80e5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7068702d776561746865722f6f70656e776561746865726d6170)](https://camo.githubusercontent.com/0c0f3a0498210b9840d6ed58b6596160da5e8305986d47058cb111ed22bd80e5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7068702d776561746865722f6f70656e776561746865726d6170)[![Packagist PHP Version Support](https://camo.githubusercontent.com/f8efa29fee9969df95b3846acda0be47d0f193afe43973a87df048f82e85b2ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7068702d776561746865722f6f70656e776561746865726d6170)](https://camo.githubusercontent.com/f8efa29fee9969df95b3846acda0be47d0f193afe43973a87df048f82e85b2ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7068702d776561746865722f6f70656e776561746865726d6170)

This is the [OpenWeatherMap](https://openweathermap.org/) provider from PHP Weather.

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

[](#installation)

Via Composer

```
composer require php-weather/openweathermap
```

Usage
-----

[](#usage)

```
$openWeatherMapKey = 'key';

$httpClient = new \Http\Adapter\Guzzle7\Client();
$openweathermap = new \PhpWeather\Provider\OpenWeatherMap\OpenWeatherMap($httpClient, $openWeatherMapKey);

$latitude = 47.873;
$longitude = 8.004;

$currentWeatherQuery = \PhpWeather\Common\WeatherQuery::create($latitude, $longitude);
$currentWeather = $openweathermap->getCurrentWeather($currentWeatherQuery);
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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

Total

4

Last Release

809d ago

PHP version history (2 changes)0.1.0PHP 8.0.\*|8.1.\*

0.2.0PHP ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/76531533d4ec8ef6b40757c24312a15f261e972240a60da68e254d4cd80d2e34?d=identicon)[lostfocus](/maintainers/lostfocus)

---

Top Contributors

[![lostfocus](https://avatars.githubusercontent.com/u/45055?v=4)](https://github.com/lostfocus "lostfocus (9 commits)")

---

Tags

openweathermapopenweathermap-apiphpweatherweatherOpenWeatherMap

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[cmfcmf/openweathermap-php-api

A PHP API to parse weather data from OpenWeatherMap.org. This wrapper tries to normalise and abstract the data and remove inconsistencies.

3471.3M7](/packages/cmfcmf-openweathermap-php-api)[gnahotelsolutions/laravel-weather

🌤️ A wrapper around Open Weather Map to get the current weather on a location.

385.3k](/packages/gnahotelsolutions-laravel-weather)[rakibdevs/openweather-laravel-api

Laravel package to connect https://openweathermap.org/ to get customized weather data for any location on the globe immediately

7648.2k](/packages/rakibdevs-openweather-laravel-api)[guhelski/forecast-php

Drop dead simple Dark Sky API wrapper in PHP

42143.8k](/packages/guhelski-forecast-php)[vemcogroup/laravel-weather

Weather package for Laravel to use different providers to get weather info

5525.0k](/packages/vemcogroup-laravel-weather)

PHPackages © 2026

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