PHPackages                             bioudi/laravel-meta-weather-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. [API Development](/categories/api)
4. /
5. bioudi/laravel-meta-weather-api

ActiveLibrary[API Development](/categories/api)

bioudi/laravel-meta-weather-api
===============================

🌦 Simple laravel package Consume the MetaWeather API.

v0.1.2-alpha(6y ago)113.7k↓33.3%1[1 issues](https://github.com/bioudi/laravel-meta-weather-api/issues)MITPHP

Since Mar 24Pushed 6y ago2 watchersCompare

[ Source](https://github.com/bioudi/laravel-meta-weather-api)[ Packagist](https://packagist.org/packages/bioudi/laravel-meta-weather-api)[ RSS](/packages/bioudi-laravel-meta-weather-api/feed)WikiDiscussions master Synced 1mo ago

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

laravel-meta-weather-api
========================

[](#laravel-meta-weather-api)

Simple laravel package Consume the [MetaWeather API](https://www.metaweather.com/api/).

---

MetaWeather API Examples
------------------------

[](#metaweather-api-examples)

Please note that the MetaWeather API does not require any form of authentication. See the [MetaWeather API documentation](https://www.metaweather.com/api/) for all supported methods and parameters.

**Important:** the API does not support CORS.

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

[](#installation)

To get the latest version of laravel-meta-weather-api on your project, require it from "composer":

```
$ composer require bioudi/laravel-meta-weather-api

```

### Laravel

[](#laravel)

Register the provider directly in your app configuration file config/app.php `config/app.php`:

```
'providers' => [
	// ...

	Bioudi\LaravelMetaWeatherApi\WeatherserviceProvider::class
]
```

Usage
-----

[](#usage)

```
use Bioudi\LaravelMetaWeatherApi\Weather;
$weather = new Weather();
```

### Search by city name

[](#search-by-city-name)

```
$weather->getByCityName('casablanca');
```

#### Output

[](#output)

```
{
  "consolidated_weather": [
    {
      "id": 6739825128374272,
      "weather_state_name": "Light Cloud",
      "weather_state_abbr": "lc",
      "wind_direction_compass": "NE",
      "created": "2019-03-24T10:23:58.103425Z",
      "applicable_date": "2019-03-24",
      "min_temp": 11.86,
      "max_temp": 24.58,
      "the_temp": 23.2,
      "wind_speed": 4.869768947042604,
      "wind_direction": 35.5,
      "air_pressure": 1014.9549999999999,
      "humidity": 56,
      "visibility": 13.852227988546886,
      "predictability": 70
    }
  ],
  "time": "2019-03-24T11:40:48.477916Z",
  "sun_rise": "2019-03-24T06:29:23.305030Z",
  "sun_set": "2019-03-24T18:44:48.967938Z",
  "timezone_name": "LMT",
  "parent": {
    "title": "Morocco",
    "location_type": "Country",
    "woeid": 23424893,
    "latt_long": "31.434200,-6.402450"
  },
  "sources": [
    {
      "title": "BBC",
      "slug": "bbc",
      "url": "http://www.bbc.co.uk/weather/",
      "crawl_rate": 180
    },
    {
      "title": "Forecast.io",
      "slug": "forecast-io",
      "url": "http://forecast.io/",
      "crawl_rate": 480
    },
    {
      "title": "Met Office",
      "slug": "met-office",
      "url": "http://www.metoffice.gov.uk/",
      "crawl_rate": 180
    },
    {
      "title": "OpenWeatherMap",
      "slug": "openweathermap",
      "url": "http://openweathermap.org/",
      "crawl_rate": 360
    },
    {
      "title": "Weather Underground",
      "slug": "wunderground",
      "url": "https://www.wunderground.com/?apiref=fc30dc3cd224e19b",
      "crawl_rate": 720
    },
    {
      "title": "World Weather Online",
      "slug": "world-weather-online",
      "url": "http://www.worldweatheronline.com/",
      "crawl_rate": 360
    },
    {
      "title": "Yahoo",
      "slug": "yahoo",
      "url": "http://weather.yahoo.com/",
      "crawl_rate": 180
    }
  ],
  "title": "Casablanca",
  "location_type": "City",
  "woeid": 1532755,
  "latt_long": "33.596611,-7.619340",
  "timezone": "Africa/Casablanca"
}
```

### Search by city name and date

[](#search-by-city-name-and-date)

```
$weather->getByCityName('london', '2018/03/03');
```

### Search by coordinates

[](#search-by-coordinates)

```
$weather->getByCoordinates(36.96, -122.02);
```

### Search by coordinates and date

[](#search-by-coordinates-and-date)

```
$weather->getByCoordinates(36.96, -122.02, '2018/01/01');
```

Credits
-------

[](#credits)

- Thanks to [MetaWeather](https://www.metaweather.com/) for providing an Open API to the Internet.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

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

Total

2

Last Release

2453d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9685767?v=4)[Bioudi Mohamed Amine](/maintainers/bioudi)[@bioudi](https://github.com/bioudi)

---

Top Contributors

[![bioudi](https://avatars.githubusercontent.com/u/9685767?v=4)](https://github.com/bioudi "bioudi (14 commits)")

---

Tags

laravelmetaweatherpackagepackagistweatherweather-api

### Embed Badge

![Health badge](/badges/bioudi-laravel-meta-weather-api/health.svg)

```
[![Health](https://phpackages.com/badges/bioudi-laravel-meta-weather-api/health.svg)](https://phpackages.com/packages/bioudi-laravel-meta-weather-api)
```

###  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)
