MetaWeather provides an API that delivers JSON over HTTPS for access to our data.
Drop me an email if you're going to make more than maybe a request a minute to this. We also ask that you link back to MetaWeather.com where appropriate, in a sensible way that's useful to the user.
Name | Abbreviation | Icon |
---|---|---|
Snow | sn | |
Sleet | sl | |
Hail | h | |
Thunderstorm | t | |
Heavy Rain | hr | |
Light Rain | lr | |
Showers | s | |
Heavy Cloud | hc | |
Light Cloud | lc | |
Clear | c |
Feel free to hotlink these images. Replace "X" in the table below with the weather state abbreviation.
Type | URL | Example |
---|---|---|
SVG (preferred) | /static/img/weather/X.svg | |
ICO | /static/img/weather/ico/X.ico | |
PNG (600x600 px) | /static/img/weather/png/X.png | ![]() |
PNG (64x64 px) | /static/img/weather/png/64/X.png | ![]() |
/api/location/search/?query=(query)
/api/location/search/?lattlong=(latt),(long)
Either query or lattlong need to be present.
Field | Type | Unit | Description |
---|---|---|---|
title | string | Name of the location | |
location_type | string | (City|Region / State / Province|Country|Continent) | |
latt_long | floats, comma separated | ||
woeid | integer | Where On Earth ID | |
distance | integer | Metres | Only returned on a lattlong search |
/api/location/(woeid)/
Field | Type | Unit | Description |
---|---|---|---|
title | string | Name of the location | |
location_type | string | (City|Region / State / Province|Country|Continent) | |
latt_long | floats, comma separated | ||
time | datetime | Time in location | |
sun_(rise|set) | datetime | ||
timezone_name | string | Name of the timezone that the location is in | |
parent | |||
title | string | Name of the parent location | |
location_type | string | (City|Region / State / Province|Country|Continent) | |
latt_long | floats, comma separated | ||
woeid | integer | Where On Earth ID | |
consolidated_weather | |||
id | integer | Internal identifier for the forecast | |
applicable_date | date | Date that the forecast or observation pertains to | |
weather_state_name | string | Text description of the weather state | |
weather_state_abbr | string | One or two letter abbreviation of the weather state | |
wind_speed | float | mph | |
wind_direction | float | degrees | |
wind_direction_compass | string | compass point | Compass point of the wind direction |
(min|max|the)_temp | integer | centigrade | |
air_pressure | float | mbar | |
humidity | float | percentage | |
visibility | float | miles | |
predictability | integer | percentage | Our interpretation of the level to which the forecasters agree with each other - 100% being a complete consensus. |
sources | |||
title | string | Name of the source | |
url | string | URL of the source |
/api/location/(woeid)/(date)/
Returns a date ordered list of fields as described in the consolidated_weather section of the location method.