API documentation

Welcome to the Meteosource documentation. It’s quick and easy to get weather data from Meteosource up and running on your website or project. If you already have an account, you can check our interactive documentation, where you can try your requests live and see the results immediately.

Overview

The Meteosource API allows you to look up the weather anywhere on the globe, returning:
  • Current weather conditions
  • Minute-by-minute forecasts for the next hour
  • Hour-by-hour and day-by-day forecasts out to 30 days
  • Severe weather alerts in the USA, EU, and Canada
  • Hour-by-hour observations going 10 years back

Weather API Endpoints - Call Types

We provide more API endpoints to retrieve the weather for any location on Earth:
  • Point: Current weather and forecast for single location (specified by GPS or place_id).
  • Map: Receive various PNG weather maps for a given variable and rectangle.
  • Time machine: Returns observed weather conditions for a date in the past.
  • Location endpoints: Endpoints to help you find the location you want and detailed information about it.

Authentication

You will need your unique API Key to authenticate using the API. You will find this in your Dashboard when you sign up for your account. Keep it safe and secret as this is your unique identification. All requests using your API Key either as a parameter in the URL or an "X-API-Key" header will count towards your account limit.

Error codes

If your API request fails, you will receive an error object in JSON format. Each error can be identified with an error code and details about the error that has occurred. You will find a list of all possible errors in the interactive documentation.

Example error response:

{
   "detail":"Neither the \"key\" query parameter nor the X-API-Key header was specified"
}

API Endpoints

point

Current weather and forecast for single location

Location specification

The location of the weather data is the only parameter that is required and must be specified. There are two ways to do this:

  1. Specify the GPS coordinates of the location using the parameters lat and lon.
  2. Specify the name of the place using the parameter place_id. To obtain the place_id for the location you want, please use endpoints /find_places_prefix (search by prefix) or /find_places (search by full name).

Note: For mountains, it is usually better to specify the place_id rather than the lat and lon. When you use place_id, you are guaranteed to receive forecasts for the precise elevation of the peak. When you specify the coordinates, the elevation can be less precise.

Sections

The endpoint can return multiple sections of data. To obtain the best performance, we advise only requesting the sections you actually need. The available sections are as follows:

  • Current weather situation
  • Hourly forecast (for 24/48/96/168 hours, depending on the tier)
  • Daily forecast (for 7/10/30 days, depending on the tier)
  • Minutely precipitation forecast (for 60 minutes in the following hour, only for higher tiers)

By default, only the current and hourly sections are returned. The division into daily parts (morning, afternoon and evening) is only available for the first 7 days of the forecast. For details regarding available parameters, see the parameter description below.

Notes
  • For a detailed description of variables (e.g. icons), please consult API documentation or schema of the response (link next to Example value in the Responses section).
  • Variables can be instantaneous, averaged, or accumulated over certain time. For example, precipitation forecast provides the precipitation accumulated since the previous hour (data with timestamp as 12:00:00 is rain accumulated from 11:00:00 to 12:00:00).
  • Do not make any assumptions about the number and ordering of the variables. New variables and sections may be introduced in the future. Always check the data are present before you try to use them.
  • The response contains an Expires header, which defines the point at which the API response will not change for the same request. We highly recommend using this to avoid unnecessary requests and increase the performance of your app.
  • When daylight saving time starts, one hourly record will be missing (typically 2:00:00 AM). When daylight saving time ends, the hourly forecast will contain two records with duplicate times (typically 2:00:00 AM).

Example API request

https://www.meteosource.com/api/v1/premium/point?place_id=london&sections=all&timezone=UTC&language=en&units=metric&key=YOUR-API-KEY

Parameters

NameDescription
place_id

Identifier of a place. To obtain the place_id for the location you want, please use endpoints /find_places_prefix (search by prefix) or /find_places (search by full name).

lat

Latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.4

lon

Longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.4

sections
timezone

Timezone to be used for the date fields. If not specified, local timezone of the forecast location will be used. The format is according to the tzinfo database, so values like Europe/Prague or UTC can be used. Alternatively you may use the value auto in which case the local timezone of the location is used. The full list of valid timezone strings can be found here.

language
units

Unit system to be used. The available values are:

  • auto: Select the system automatically, based on the forecast location
  • metric: Metric (SI) units
  • us: Imperial units
  • uk: Same as metric, except that visibility is in miles and wind speeds are in miles per hour
  • ca: Same as metric, except that wind speeds are in kilometers per hour

Response

You will receive a response based on the requested parameters. The example below shows that each response starts with location specification (GPS, elevation, and timezone). Requested sections follow - first, current weather for a given place followed by a minute-by-minute forecast. There is also an hourly section and daily section that is shown either for each whole day or divided into morning/afternoon/evening.

{
    "lat": "51.50853N",
    "lon": "0.12574W",
    "elevation": 25,
    "timezone": "UTC",
    "units": "metric",
    "current": {
        "icon": "mostly_cloudy",
        "icon_num": 5,
        "summary": "Mostly cloudy",
        "temperature": 7.5,
        "feels_like": 2.5,
        "wind_chill": 5.2,
        "dew_point": 3.2,
        "wind": {
            "speed": 6.4,
            "gusts": null,
            "angle": 296,
            "dir": "WNW"
        },
        "precipitation": {
            "total": 0,
            "type": "none"
        },
        "cloud_cover": 70,
        "irradiance": 94.08,
        "ozone": 326.13,
        "pressure": 990,
        "uv_index": 0.13,
        "humidity": 70,
        "visibility": 24.13
    },
    "minutely": {
        "summary": "Mostly rainy for the next hour.",
        "data": [
            {
                "date": "2021-11-26T15:45:00",
                "precipitation": 0.3
            },
            {
                "date": "2021-11-26T15:46:00",
                "precipitation": 0.3
            },
            {
                "date": "2021-11-26T15:47:00",
                "precipitation": 0.3
            },
            {
                "date": "2021-11-26T15:48:00",
                "precipitation": 0.4
            },
            {
                "date": "2021-11-26T15:49:00",
                "precipitation": 0.4
            }
        ]
    },
    "hourly": {
        "data": [
            {
                "date": "2021-11-26T15:00:00",
                "weather": "mostly_cloudy",
                "icon": 5,
                "summary": "Mostly cloudy",
                "temperature": 7.5,
                "feels_like": 2.5,
                "soil_temperature": 9.5,
                "wind_chill": 5.2,
                "dew_point": 3.2,
                "surface_temperature": 8.8,
                "wind": {
                    "speed": 6.4,
                    "gusts": 12.4,
                    "dir": "WNW",
                    "angle": 296
                },
                "cloud_cover": {
                    "total": 70,
                    "low": 88,
                    "middle": 81,
                    "high": 0
                },
                "pressure": 990,
                "precipitation": {
                    "total": 0,
                    "type": "none",
                    "convective": 0,
                    "rainspot": "#...###\n...###.\n#####..\n####...\n###...#\n.......\n.......\n"
                },
                "probability": {
                    "precipitation": 40,
                    "storm": 0,
                    "freeze": 7
                },
                "cape": 12,
                "evaporation": 0.12,
                "irradiance": 94.08,
                "lftx": 1.4,
                "ozone": 326.13,
                "uv_index": 0.13,
                "humidity": 68,
                "snow_depth": 0,
                "sunshine_duration": 3600,
                "visibility": 10.88
            },
            {
                "date": "2021-11-26T16:00:00",
                "weather": "rain_shower",
                "icon": 32,
                "summary": "Rain shower",
                "temperature": 6.8,
                "feels_like": 1.5,
                "soil_temperature": 8,
                "wind_chill": 3.8,
                "dew_point": 2.5,
                "surface_temperature": 7.2,
                "wind": {
                    "speed": 6.1,
                    "gusts": 12,
                    "dir": "NW",
                    "angle": 305
                },
                "cloud_cover": {
                    "total": 76,
                    "low": 67,
                    "middle": 87,
                    "high": 0
                },
                "pressure": 989,
                "precipitation": {
                    "total": 0.9,
                    "type": "rain",
                    "convective": 0.1,
                    "rainspot": "..#####\n....##.\n.......\n...##..\n.#..#..\n####...\n#####..\n"
                },
                "probability": {
                    "precipitation": 67,
                    "storm": 0,
                    "freeze": 11
                },
                "cape": 7,
                "evaporation": -0.08,
                "irradiance": 2.2,
                "lftx": 1.57,
                "ozone": 327.32,
                "uv_index": 0,
                "humidity": 70,
                "snow_depth": 0,
                "sunshine_duration": 240,
                "visibility": 24.14
            }
        ]
    },
    "daily": {
        "data": [
            {
                "day": "2021-11-26",
                "weather": "psbl_rain",
                "icon": 12,
                "summary": "Possible rain changing to mostly cloudy by evening. Temperature 3/9 °C, but a feels-like temperature of only 3 °C. Wind from NW.",
                "predictability": 1,
                "all_day": {
                    "weather": "psbl_rain",
                    "icon": 12,
                    "temperature": 6.2,
                    "temperature_min": 3.2,
                    "temperature_max": 9,
                    "feels_like": 0.2,
                    "feels_like_min": -3.2,
                    "feels_like_max": 3,
                    "soil_temperature": 6,
                    "soil_temperature_min": 3.8,
                    "soil_temperature_max": 9.5,
                    "wind_chill": 2.2,
                    "wind_chill_min": -1.2,
                    "wind_chill_max": 5.5,
                    "dew_point": 2,
                    "dew_point_min": -1.5,
                    "dew_point_max": 4.8,
                    "surface_temperature": 5.8,
                    "surface_temperature_min": 3,
                    "surface_temperature_max": 8.8,
                    "wind": {
                        "speed": 6.2,
                        "gusts": 13.2,
                        "dir": "WNW",
                        "angle": 282
                    },
                    "cloud_cover": {
                        "total": 78,
                        "low": 61,
                        "middle": 63,
                        "high": 3
                    },
                    "pressure": 993,
                    "precipitation": {
                        "total": 2.8,
                        "type": "rain"
                    },
                    "probability": {
                        "precipitation": 33,
                        "storm": 0,
                        "freeze": 18
                    },
                    "evaporation": 0.08,
                    "irradiance": 45.61,
                    "ozone": 320.97,
                    "humidity": 75,
                    "snow_depth": 0,
                    "sunshine_duration": 18240,
                    "visibility": 22.55
                },
                "morning": {
                    "weather": "Possible rain",
                    "icon": 12,
                    "temperature": 7,
                    "feels_like": 0,
                    "soil_temperature": 5,
                    "wind_chill": 2,
                    "dew_point": 4,
                    "surface_temperature": 5.5,
                    "wind": {
                        "speed": 6.1,
                        "gusts": 12.1,
                        "dir": "WSW",
                        "angle": 248
                    },
                    "cloud_cover": {
                        "total": 99,
                        "low": 61,
                        "middle": 85,
                        "high": 9
                    },
                    "pressure": 999,
                    "precipitation": {
                        "total": 1.6,
                        "type": "rain"
                    },
                    "probability": {
                        "precipitation": 54,
                        "storm": 0,
                        "freeze": 20
                    },
                    "evaporation": 0.08,
                    "irradiance": 12.03,
                    "ozone": 315.21,
                    "humidity": 85,
                    "snow_depth": 0,
                    "sunshine_duration": 3600,
                    "visibility": 24.08
                },
                "afternoon": {
                    "weather": "Possible rain",
                    "icon": 12,
                    "temperature": 7.2,
                    "feels_like": 1.8,
                    "soil_temperature": 8,
                    "wind_chill": 4.2,
                    "dew_point": 2.5,
                    "surface_temperature": 7.5,
                    "wind": {
                        "speed": 6.4,
                        "gusts": 13.2,
                        "dir": "WNW",
                        "angle": 298
                    },
                    "cloud_cover": {
                        "total": 77,
                        "low": 78,
                        "middle": 64,
                        "high": 0
                    },
                    "pressure": 990,
                    "precipitation": {
                        "total": 1.2,
                        "type": "rain"
                    },
                    "probability": {
                        "precipitation": 40,
                        "storm": 0,
                        "freeze": 5
                    },
                    "evaporation": 0.23,
                    "irradiance": 131.51,
                    "ozone": 321.4,
                    "humidity": 69,
                    "snow_depth": 0,
                    "sunshine_duration": 14640,
                    "visibility": 19.15
                },
                "evening": {
                    "weather": "Mostly cloudy",
                    "icon": 5,
                    "temperature": 4,
                    "feels_like": -1.8,
                    "soil_temperature": 5.2,
                    "wind_chill": -0.2,
                    "dew_point": -1,
                    "surface_temperature": 3.5,
                    "wind": {
                        "speed": 5.9,
                        "gusts": 12.4,
                        "dir": "WNW",
                        "angle": 301
                    },
                    "cloud_cover": {
                        "total": 54,
                        "low": 43,
                        "middle": 36,
                        "high": 0
                    },
                    "pressure": 989,
                    "precipitation": {
                        "total": 0,
                        "type": "none"
                    },
                    "probability": {
                        "precipitation": 1,
                        "storm": 0,
                        "freeze": 27
                    },
                    "evaporation": -0.08,
                    "irradiance": 0,
                    "ozone": 327.45,
                    "humidity": 69,
                    "snow_depth": 0,
                    "sunshine_duration": 0,
                    "visibility": 24.14
                },
                "astro": {
                    "sun": {
                        "rise": "2021-11-26T07:36:43",
                        "set": "2021-11-26T15:59:31",
                        "always_up": false,
                        "always_down": false
                    },
                    "moon": {
                        "phase": "full_moon",
                        "rise": "2021-11-26T22:13:48",
                        "set": "2021-11-26T13:08:00",
                        "always_up": false,
                        "always_down": false
                    }
                },
                "statistics": {
                    "temperature": {
                        "avg": 6.2,
                        "avg_min": 4,
                        "avg_max": 8.5,
                        "record_min": -4.5,
                        "record_max": 13.8
                    },
                    "wind": {
                        "avg_speed": 4.1,
                        "avg_angle": 268,
                        "avg_dir": "W",
                        "max_speed": 9.9,
                        "max_gust": 22.8
                    },
                    "precipitation": {
                        "avg": 1.7,
                        "probability": 29
                    }
                }
            },
            {
                "day": "2021-11-27",
                "weather": "psbl_rain",
                "icon": 12,
                "summary": "Possible rain changing to cloudy by evening. Temperature falling to 4 °C. Wind from NW.",
                "predictability": 3,
                "all_day": {
                    "weather": "psbl_rain",
                    "icon": 12,
                    "temperature": 3.2,
                    "temperature_min": 2.5,
                    "temperature_max": 4,
                    "feels_like": -4,
                    "feels_like_min": -4.5,
                    "feels_like_max": -3,
                    "soil_temperature": 4.5,
                    "soil_temperature_min": 3.5,
                    "soil_temperature_max": 5.8,
                    "wind_chill": -1.5,
                    "wind_chill_min": -2.2,
                    "wind_chill_max": -0.8,
                    "dew_point": 0.2,
                    "dew_point_min": -0.5,
                    "dew_point_max": 1,
                    "surface_temperature": 3.8,
                    "surface_temperature_min": 2.2,
                    "surface_temperature_max": 4.5,
                    "wind": {
                        "speed": 8,
                        "gusts": 18.8,
                        "dir": "NNW",
                        "angle": 341
                    },
                    "cloud_cover": {
                        "total": 98,
                        "low": 90,
                        "middle": 69,
                        "high": 7
                    },
                    "pressure": 993,
                    "precipitation": {
                        "total": 1.5,
                        "type": "rain"
                    },
                    "probability": {
                        "precipitation": 42,
                        "storm": 0,
                        "freeze": 30
                    },
                    "evaporation": -0.05,
                    "irradiance": 7.25,
                    "ozone": 335.09,
                    "humidity": 78,
                    "snow_depth": 0,
                    "sunshine_duration": 9797,
                    "visibility": 10.18
                },
                "morning": {
                    "weather": "Possible rain",
                    "icon": 12,
                    "temperature": 3,
                    "feels_like": -4,
                    "soil_temperature": 4,
                    "wind_chill": -2,
                    "dew_point": 0,
                    "surface_temperature": 3.2,
                    "wind": {
                        "speed": 7,
                        "gusts": 18.8,
                        "dir": "NNW",
                        "angle": 346
                    },
                    "cloud_cover": {
                        "total": 98,
                        "low": 98,
                        "middle": 68,
                        "high": 0
                    },
                    "pressure": 989,
                    "precipitation": {
                        "total": 0.9,
                        "type": "rain"
                    },
                    "probability": {
                        "precipitation": 51,
                        "storm": 0,
                        "freeze": 33
                    },
                    "evaporation": -0.05,
                    "irradiance": 4.72,
                    "ozone": 343.1,
                    "humidity": 80,
                    "snow_depth": 0,
                    "sunshine_duration": 3773,
                    "visibility": 7.62
                },
                "afternoon": {
                    "weather": "Possible rain",
                    "icon": 12,
                    "temperature": 2.8,
                    "feels_like": -4,
                    "soil_temperature": 5.2,
                    "wind_chill": -1.2,
                    "dew_point": 0.2,
                    "surface_temperature": 4.2,
                    "wind": {
                        "speed": 8.9,
                        "gusts": 17.6,
                        "dir": "NNW",
                        "angle": 336
                    },
                    "cloud_cover": {
                        "total": 96,
                        "low": 86,
                        "middle": 68,
                        "high": 21
                    },
                    "pressure": 994,
                    "precipitation": {
                        "total": 0.4,
                        "type": "rain"
                    },
                    "probability": {
                        "precipitation": 40,
                        "storm": 0,
                        "freeze": 28
                    },
                    "evaporation": -0.06,
                    "irradiance": 17.55,
                    "ozone": 330.25,
                    "humidity": 76,
                    "snow_depth": 0,
                    "sunshine_duration": 6024,
                    "visibility": 9.31
                },
                "evening": {
                    "weather": "Overcast",
                    "icon": 7,
                    "temperature": 3.5,
                    "feels_like": -4.2,
                    "soil_temperature": 4,
                    "wind_chill": -1.8,
                    "dew_point": 0.2,
                    "surface_temperature": 3.5,
                    "wind": {
                        "speed": 8.4,
                        "gusts": 17.5,
                        "dir": "NNW",
                        "angle": 340
                    },
                    "cloud_cover": {
                        "total": 99,
                        "low": 84,
                        "middle": 71,
                        "high": 2
                    },
                    "pressure": 998,
                    "precipitation": {
                        "total": 0.2,
                        "type": "rain"
                    },
                    "probability": {
                        "precipitation": 32,
                        "storm": 0,
                        "freeze": 29
                    },
                    "evaporation": -0.02,
                    "irradiance": 0,
                    "ozone": 330.33,
                    "humidity": 77,
                    "snow_depth": 0,
                    "sunshine_duration": 0,
                    "visibility": 14.12
                },
                "astro": {
                    "sun": {
                        "rise": "2021-11-27T07:38:14",
                        "set": "2021-11-27T15:58:40",
                        "always_up": false,
                        "always_down": false
                    },
                    "moon": {
                        "phase": "last_quarter",
                        "rise": "2021-11-27T23:30:08",
                        "set": "2021-11-27T13:27:15",
                        "always_up": false,
                        "always_down": false
                    }
                },
                "statistics": {
                    "temperature": {
                        "avg": 6.5,
                        "avg_min": 4,
                        "avg_max": 8.8,
                        "record_min": -3.2,
                        "record_max": 13.8
                    },
                    "wind": {
                        "avg_speed": 4.1,
                        "avg_angle": 245,
                        "avg_dir": "WSW",
                        "max_speed": 14,
                        "max_gust": 25.6
                    },
                    "precipitation": {
                        "avg": 2,
                        "probability": 46
                    }
                }
            }
        ]
    }
}
        

Most of the variables in response are self-explanatory, however, you can find a complete list including icons in our description of variables.

find_places

Search for places

You can use this endpoint to obtain place_id of the location you want, to be used in point endpoint. The response also contains detailed information about the location, such as coordinates, timezone and the country the place belongs to.

Unlike the /find_place_prefix endpoint, complete words are required here. You can search for cities, mountains, lakes, countries, etc. The response can contain multiple places, sorted by relevance. You can then identify the one you want by coordinates, country, or the administrative area.

Example API request

https://www.meteosource.com/api/v1/premium/find_places?text=london&key=YOUR-API-KEY

Parameters

NameDescription
text

Place name

language

Response

[
    {
        "name": "London",
        "place_id": "london",
        "adm_area1": "England",
        "adm_area2": "Greater London",
        "country": "United Kingdom",
        "lat": "51.50853N",
        "lon": "-0.12574W",
        "timezone": "Europe/London"
    },
    {
        "name": "London",
        "place_id": "london-6058560",
        "adm_area1": "Ontario",
        "adm_area2": null,
        "country": "Canada",
        "lat": "42.98339N",
        "lon": "-81.23304W",
        "timezone": "America/Toronto"
    },
    {
        "name": "London",
        "place_id": "london-4517009",
        "adm_area1": "Ohio",
        "adm_area2": "Madison County",
        "country": "United States of America",
        "lat": "39.88645N",
        "lon": "-83.44825W",
        "timezone": "America/New_York"
    },
    {
        "name": "London",
        "place_id": "london-4298960",
        "adm_area1": "Kentucky",
        "adm_area2": "Laurel County",
        "country": "United States of America",
        "lat": "37.12898N",
        "lon": "-84.08326W",
        "timezone": "America/New_York"
    },
    {
        "name": "London",
        "place_id": "london-5367815",
        "adm_area1": "California",
        "adm_area2": "Tulare County",
        "country": "United States of America",
        "lat": "36.47606N",
        "lon": "-119.44318W",
        "timezone": "America/Los_Angeles"
    },
    {
        "name": "London",
        "place_id": "london-4119617",
        "adm_area1": "Arkansas",
        "adm_area2": "Pope County",
        "country": "United States of America",
        "lat": "35.32897N",
        "lon": "-93.25296W",
        "timezone": "America/Chicago"
    },
    {
        "name": "London",
        "place_id": "london-4707414",
        "adm_area1": "Texas",
        "adm_area2": "Kimble County",
        "country": "United States of America",
        "lat": "30.67685N",
        "lon": "-99.57645W",
        "timezone": "America/Chicago"
    },
    {
        "name": "London",
        "place_id": "london-2331921",
        "adm_area1": "Delta",
        "adm_area2": "Okpe",
        "country": "Nigeria",
        "lat": "5.72349N",
        "lon": "5.78761E",
        "timezone": "Africa/Lagos"
    },
    {
        "name": "London",
        "place_id": "london-1705729",
        "adm_area1": "Soccsksargen",
        "adm_area2": "Province of South Cotabato",
        "country": "Philippines",
        "lat": "6.00972N",
        "lon": "125.12944E",
        "timezone": "Asia/Manila"
    },
    {
        "name": "London",
        "place_id": "london-11876643",
        "adm_area1": "England",
        "adm_area2": "Greater London",
        "country": "United Kingdom",
        "lat": "51.50654N",
        "lon": "-0.08476W",
        "timezone": "Europe/London"
    }
]
        

find_places_prefix

Search for places by prefix

You can use this endpoint to obtain place_id of the location you want, to be used in point endpoint. The response also contains detailed information about the location, such as coordinates, timezone and the country the place belongs to.

Unlike the /find_places endpoint, you should only specify the prefix of the place you are looking for. This is particularly useful for autocomplete forms. You can search for cities, mountains, lakes, countries, etc. The response can contain multiple places, sorted by relevance. You can then identify the one you want by coordinates, country, or the administrative area.

Example API request

https://www.meteosource.com/api/v1/premium/find_places_prefix?text=london&key=YOUR-API-KEY

Parameter

NameDescription
text

Place name

language

Response

[
    {
        "name": "London",
        "place_id": "london",
        "adm_area1": "England",
        "adm_area2": "Greater London",
        "country": "United Kingdom",
        "lat": "51.50853N",
        "lon": "-0.12574W",
        "timezone": "Europe/London"
    },
    {
        "name": "Londrina",
        "place_id": "londrina-3458449",
        "adm_area1": "Paraná",
        "adm_area2": "Londrina",
        "country": "Brazil",
        "lat": "-23.31028S",
        "lon": "-51.16278W",
        "timezone": "America/Sao_Paulo"
    },
    {
        "name": "London",
        "place_id": "london-6058560",
        "adm_area1": "Ontario",
        "adm_area2": null,
        "country": "Canada",
        "lat": "42.98339N",
        "lon": "-81.23304W",
        "timezone": "America/Toronto"
    },
    {
        "name": "Brent",
        "place_id": "brent",
        "adm_area1": "England",
        "adm_area2": "Greater London",
        "country": "United Kingdom",
        "lat": "51.55306N",
        "lon": "-0.3023W",
        "timezone": "Europe/London"
    },
    {
        "name": "Greater London",
        "place_id": "greater-london",
        "adm_area1": "England",
        "adm_area2": "Greater London",
        "country": "United Kingdom",
        "lat": "51.5N",
        "lon": "-0.16667W",
        "timezone": "Europe/London"
    },
    {
        "name": "Londrina",
        "place_id": "londrina",
        "adm_area1": "Paraná",
        "adm_area2": "Londrina",
        "country": "Brazil",
        "lat": "-23.58643S",
        "lon": "-51.08739W",
        "timezone": "America/Sao_Paulo"
    },
    {
        "name": "Barnet",
        "place_id": "barnet",
        "adm_area1": "England",
        "adm_area2": "Greater London",
        "country": "United Kingdom",
        "lat": "51.65736N",
        "lon": "-0.21423W",
        "timezone": "Europe/London"
    },
    {
        "name": "Croydon",
        "place_id": "croydon",
        "adm_area1": "England",
        "adm_area2": "Greater London",
        "country": "United Kingdom",
        "lat": "51.37664N",
        "lon": "-0.10574W",
        "timezone": "Europe/London"
    },
    {
        "name": "Newham",
        "place_id": "newham",
        "adm_area1": "England",
        "adm_area2": "Greater London",
        "country": "United Kingdom",
        "lat": "51.51667N",
        "lon": "0.03333E",
        "timezone": "Europe/London"
    },
    {
        "name": "Enfield",
        "place_id": "enfield",
        "adm_area1": "England",
        "adm_area2": "Greater London",
        "country": "United Kingdom",
        "lat": "51.64875N",
        "lon": "-0.0974W",
        "timezone": "Europe/London"
    }
]
        

nearest_place

Search for nearest place by coordinates

You can use this endpoint to find the nearest place from given coordinates.

Note: If you specify coordinates of a secluded place (e.g. middle of the ocean), the nearest point can be very far from the coordinates.

Example API request

https://www.meteosource.com/api/v1/premium/nearest_place?lat=51.5&lon=0&key=YOUR-API-KEY

Parameters

NameDescription
lat

Latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.4

lon

Longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.4

language

Response

{
    "name": "Blackwall and Cubitt Town",
    "place_id": "blackwall-and-cubitt-town",
    "adm_area1": "England",
    "adm_area2": "Greater London",
    "country": "United Kingdom",
    "lat": "51.50004N",
    "lon": "0.00656W",
    "timezone": "Europe/London"
}
        

Description of variables

NameDescription
weather

String identifier of the weather icon, e.g. 'light_rain'.

icon

Numeric identifier of the weather icon. The following values can appear:

  • 1 - Not available
  • 2 - Sunny
  • 3 - Mostly sunny
  • 4 - Partly sunny
  • 5 - Mostly cloudy
  • 6 - Cloudy
  • 7 - Overcast
  • 8 - Overcast with low clouds
  • 9 - Fog
  • 10 - Light rain
  • 11 - Rain
  • 12 - Possible rain
  • 13 - Rain shower
  • 14 - Thunderstorm
  • 15 - Local thunderstorms
  • 16 - Light snow
  • 17 - Snow
  • 18 - Possible snow
  • 19 - Snow shower
  • 20 - Rain and snow
  • 21 - Possible rain and snow
  • 22 - Rain and snow
  • 23 - Freezing rain
  • 24 - Possible freezing rain
  • 25 - Hail
  • 26 - Clear (night)
  • 27 - Mostly clear (night)
  • 28 - Partly clear (night)
  • 29 - Mostly cloudy (night)
  • 30 - Cloudy (night)
  • 31 - Overcast with low clouds (night)
  • 32 - Rain shower (night)
  • 33 - Local thunderstorms (night)
  • 34 - Snow shower (night)
  • 35 - Rain and snow (night)
  • 36 - Possible freezing rain (night)

You can download our sets of icons
summary

Short text summary of the weather, e.g. 'Light rain'.

temperature

Temperature 2 metres above ground.

feels_like

Feels like temperature

soil_temperature

Soil temperature.

wind_chill

Windchill temperature.

dew_point

Dew point temperature.

surface_temperature

Surface air temperature.

wind.speed

Wind speed 10 metres above the ground.

wind.gusts

Wind gust speed.

wind.dir

Wind direction in 'N', 'NNE', 'NE', ..., 'NNW' format.

wind.angle

Wind direction angle in degrees, 180° means wind from the south.

cloud_cover.total

Percentage of sky covered by clouds.

cloud_cover.low

Percentage of sky covered by low clouds.

cloud_cover.middle

Percentage of sky covered by middle clouds.

cloud_cover.high

Percentage of sky covered by high clouds.

pressure

Atmospheric pressure at mean sea level.

precipitation.total

Total precipitation amount accumulated since last hour.

precipitation.type

Precipitation type, one of 'rain', 'snow', 'rain_snow' or 'none' if there is no precipitation.

precipitation.convective

Total convective precipitation amount accumulated since last hour.

precipitation.rainspot

Precipitation in the surrounding of queried location. The data is 7x7 ASCII art string, queried location being in the center. Character '#' means there is precipitation, '.' means no precipitation. The distance between neighboring cells is 0.25°.

probability.precipitation

Probability of non-zero precipitation.

probability.storm

Probability of thunderstorm.

probability.freeze

Probability the temperature drops below 0 °C.

cape

Convective available potential energy.

evaporation

Evaporation of liquid water into water vapor.

irradiance

Global downward short-wave radiation flux.

lftx

Surface lifted index.

ozone

Total column of ozone.

uv_index

UV index, values from zero (low risk of harm) to 11+ (extreme risk of harm).

humidity

Relative humidity.

snow_depth

Snow depth.

sunshine_duration

Sunshine duration since start of previous hour.

visibility

Visibility.

astro.sun.rise

Datetime of the sunrise or null during polar day/night.

astro.sun.set

Datetime of the sunset or null during polar day/night.

astro.sun.always_up

True if the sun never sets on given day (polar day), false otherwise.

astro.sun.always_down

True if the sun never rises on given day (polar night), false otherwise.

astro.moon.rise

Datetime of the moonrise or null if the moon does not rise on given day.

astro.moon.set

Datetime of the moonset or null if the moon does not set on given day.

astro.moon.always_up

True if the moon never sets on given day, false otherwise.

astro.moon.always_down

True if the moon never rises on given day, false otherwise.

astro.moon.phase

Number of the moon phase, from 0 to 3 (inclusive), meaning 'new_moon', 'first_quarter', 'full_moon', 'last_quarter', respectively.

map

PNG weather forecast maps for given area and variable

Area specification

There are two ways to specify geographical area you need for your map:

  1. Specify X and Y coordinates and zoom level Z of desired tile in Google Maps Tile notation.
  2. Specify latitude and longitude bounds of the area you want to cover.
Notes
  • The resulting PNG maps are always in Google Mercator projection (EPSG:3857).
  • As Meteosource only covers areas between latitudes 80° and -80°, you can only request maps within these bounds, when specifying the latitude and longitude boundaries. When specifying the area using Google Maps Tile notation, the regions outside our supported latitudes will be fully transparent.
  • The finest resolution is not available for maps covering very large regions. The resulting map will be automatically downscaled in this case, to guarantee high-speed responses.
  • Weather maps are only supported for forecasts, not for archive data.

Example API request

https://www.meteosource.com/api/v1/premium/map?min_lat=31&min_lon=-14&max_lat=67&max_lon=56&variable=rain&datetime=-1hour&key=YOUR-API-KEY

Parameters

NameDescription
tile_x

The X coordinate of Google Maps tile

tile_y

The Y coordinate of Google Maps tile

tile_zoom

The zoom level of Google Maps tile

min_lat

Minimal latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.2

min_lon

Minimal longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.2

max_lat

Maximal latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.2.

max_lon

Maximal longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.2

variable

Name of the variable for your map. Available values are:

  • temperature - Temperature 2 metres above ground
  • feels_like_temperature - Feels like temperature
  • clouds - Percentage of sky covered by clouds
  • precipitation - Total precipitation amount accumulated since last hour
  • wind_speed - Wind speed 10 metres above the ground
  • wind_gust - Wind gust speed
  • pressure - Atmospheric pressure at mean sea level
  • humidity - Relative humidity
  • wave_height - Wave height
  • wave_period - Wave period
datetime

There are two ways to specify date and time for your map:

  1. Datetime in YYYY-MM-DDTHH:MM format and UTC timezone, e.g. 2021-08-24T12:00
  2. Offset from current time in [+-]<minutes|hours|days> format, e.g. +10minutes, -2hours or +1days

Response

time_machine

Actual weather data for a single location and day in the past

Location specification

The location of the weather data must be specified. There are two ways to do this:

  1. Specify the GPS coordinates of the location using the parameters lat and lon.
  2. Specify the name of the place using the parameter place_id. To obtain the place_id for the location you want, please use endpoints /find_places_prefix (search by prefix) or /find_places (search by full name).

Note: For mountains, it is usually better to specify the place_id rather than the lat and lon. When you use place_id, you are guaranteed to receive data for the precise elevation of the peak. When you specify the coordinates, the elevation can be less precise.

Notes
  • For each request, you always get data for 24 hours in given UTC day. If you need archive data across multiple UTC days, you have to execute multiple requests.

Example API request

https://www.meteosource.com/api/v1/premium/time_machine?place_id=london&date=2020-12-24&key=YOUR-API-KEY

Parameters

NameDescription
place_id

Identifier of a place. To obtain the place_id for the location you want, please use endpoints /find_places_prefix (search by prefix) or /find_places (search by full name).

lat

Latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.4

lon

Longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.4

date

The UTC day of the data in the past. Specify in YYYY-MM-DD format, e.g. 2021-08-24.

units

Unit system to be used. The available values are:

  • auto: Select the system automatically, based on the location
  • metric: Metric (SI) units
  • us: Imperial units
  • uk: Same as metric, except that visibility is in miles and wind speeds are in miles per hour
  • ca: Same as metric, except that wind speeds are in kilometers per hour

Response

{
    "lat": "51.50853N",
    "lon": "0.12574W",
    "elevation": 25,
    "units": "uk",
    "data": [
        {
            "date": "2021-03-15T00:00:00",
            "weather": "mostly_cloudy",
            "icon": 5,
            "temperature": 8.5,
            "soil_temperature": 7.6,
            "dew_point": 5.91,
            "surface_temperature": 6.08,
            "wind": {
                "speed": 13,
                "gusts": 27,
                "angle": 288,
                "dir": "WNW"
            },
            "cloud_cover": {
                "total": 66,
                "low": 55,
                "middle": 35,
                "high": 19
            },
            "pressure": 1014,
            "precipitation": {
                "total": 0.01,
                "type": "rain"
            },
            "cape": 8,
            "evaporation": 0,
            "irradiance": 0,
            "ozone": 384
        },
        {
            "date": "2021-03-15T01:00:00",
            "weather": "cloudy",
            "icon": 6,
            "temperature": 8.3,
            "soil_temperature": 7.7,
            "dew_point": 5.88,
            "surface_temperature": 6.45,
            "wind": {
                "speed": 14,
                "gusts": 26,
                "angle": 297,
                "dir": "WNW"
            },
            "cloud_cover": {
                "total": 84,
                "low": 57,
                "middle": 72,
                "high": 18
            },
            "pressure": 1014,
            "precipitation": {
                "total": 0.01,
                "type": "rain"
            },
            "cape": 6,
            "evaporation": 0,
            "irradiance": 0,
            "ozone": 383
        },
        {
            "date": "2021-03-15T02:00:00",
            "weather": "overcast",
            "icon": 7,
            "temperature": 8.2,
            "soil_temperature": 7.7,
            "dew_point": 5.78,
            "surface_temperature": 6.48,
            "wind": {
                "speed": 13,
                "gusts": 26,
                "angle": 303,
                "dir": "WNW"
            },
            "cloud_cover": {
                "total": 99,
                "low": 98,
                "middle": 68,
                "high": 18
            },
            "pressure": 1014,
            "precipitation": {
                "total": 0.02,
                "type": "rain"
            },
            "cape": 12,
            "evaporation": 0,
            "irradiance": 0,
            "ozone": 384
        },
        {
            "date": "2021-03-15T03:00:00",
            "weather": "overcast",
            "icon": 7,
            "temperature": 8.2,
            "soil_temperature": 7.6,
            "dew_point": 5.41,
            "surface_temperature": 6.49,
            "wind": {
                "speed": 12,
                "gusts": 26,
                "angle": 307,
                "dir": "NW"
            },
            "cloud_cover": {
                "total": 98,
                "low": 94,
                "middle": 60,
                "high": 5
            },
            "pressure": 1014,
            "precipitation": {
                "total": 0.03,
                "type": "rain"
            },
            "cape": 12,
            "evaporation": 0,
            "irradiance": 0,
            "ozone": 384
        },
        {
            "date": "2021-03-15T04:00:00",
            "weather": "mostly_cloudy",
            "icon": 5,
            "temperature": 7.8,
            "soil_temperature": 7.4,
            "dew_point": 5.21,
            "surface_temperature": 6.1,
            "wind": {
                "speed": 13,
                "gusts": 24,
                "angle": 312,
                "dir": "NW"
            },
            "cloud_cover": {
                "total": 66,
                "low": 43,
                "middle": 46,
                "high": 1
            },
            "pressure": 1015,
            "precipitation": {
                "total": 0.04,
                "type": "rain"
            },
            "cape": 8,
            "evaporation": 0,
            "irradiance": 0,
            "ozone": 383
        },
        {
            "date": "2021-03-15T05:00:00",
            "weather": "mostly_cloudy",
            "icon": 5,
            "temperature": 7.8,
            "soil_temperature": 7.3,
            "dew_point": 5.05,
            "surface_temperature": 5.68,
            "wind": {
                "speed": 12,
                "gusts": 24,
                "angle": 312,
                "dir": "NW"
            },
            "cloud_cover": {
                "total": 55,
                "low": 35,
                "middle": 36,
                "high": 6
            },
            "pressure": 1016,
            "precipitation": {
                "total": 0.07,
                "type": "rain"
            },
            "cape": 4,
            "evaporation": 0,
            "irradiance": 0,
            "ozone": 382
        },
        {
            "date": "2021-03-15T06:00:00",
            "weather": "snow_shower",
            "icon": 19,
            "temperature": 7.5,
            "soil_temperature": 7.1,
            "dew_point": 4.9,
            "surface_temperature": 5.19,
            "wind": {
                "speed": 11,
                "gusts": 22,
                "angle": 312,
                "dir": "NW"
            },
            "cloud_cover": {
                "total": 60,
                "low": 43,
                "middle": 31,
                "high": 11
            },
            "pressure": 1016,
            "precipitation": {
                "total": 0.11,
                "type": "rain"
            },
            "cape": 2,
            "evaporation": 0,
            "irradiance": 16,
            "ozone": 379
        },
        {
            "date": "2021-03-15T07:00:00",
            "weather": "mostly_cloudy",
            "icon": 5,
            "temperature": 7.3,
            "soil_temperature": 7,
            "dew_point": 4.88,
            "surface_temperature": 5.72,
            "wind": {
                "speed": 11,
                "gusts": 22,
                "angle": 314,
                "dir": "NW"
            },
            "cloud_cover": {
                "total": 58,
                "low": 45,
                "middle": 42,
                "high": 1
            },
            "pressure": 1017,
            "precipitation": {
                "total": 0.02,
                "type": "rain"
            },
            "cape": 0,
            "evaporation": 0,
            "irradiance": 114,
            "ozone": 378
        },
        {
            "date": "2021-03-15T08:00:00",
            "weather": "partly_sunny",
            "icon": 4,
            "temperature": 7.9,
            "soil_temperature": 7.3,
            "dew_point": 5.2,
            "surface_temperature": 6.72,
            "wind": {
                "speed": 11,
                "gusts": 22,
                "angle": 318,
                "dir": "NW"
            },
            "cloud_cover": {
                "total": 39,
                "low": 29,
                "middle": 27,
                "high": 0
            },
            "pressure": 1018,
            "precipitation": {
                "total": 0.04,
                "type": "rain"
            },
            "cape": 0,
            "evaporation": 0,
            "irradiance": 254,
            "ozone": 378
        },
        {
            "date": "2021-03-15T09:00:00",
            "weather": "partly_sunny",
            "icon": 4,
            "temperature": 8.6,
            "soil_temperature": 7.8,
            "dew_point": 5.67,
            "surface_temperature": 8.83,
            "wind": {
                "speed": 10,
                "gusts": 26,
                "angle": 316,
                "dir": "NW"
            },
            "cloud_cover": {
                "total": 33,
                "low": 22,
                "middle": 6,
                "high": 12
            },
            "pressure": 1019,
            "precipitation": {
                "total": 0.06,
                "type": "rain"
            },
            "cape": 16,
            "evaporation": 0,
            "irradiance": 340,
            "ozone": 378
        },
        {
            "date": "2021-03-15T10:00:00",
            "weather": "mostly_cloudy",
            "icon": 5,
            "temperature": 9.5,
            "soil_temperature": 8.3,
            "dew_point": 5.07,
            "surface_temperature": 10.4,
            "wind": {
                "speed": 12,
                "gusts": 28,
                "angle": 325,
                "dir": "NW"
            },
            "cloud_cover": {
                "total": 73,
                "low": 68,
                "middle": 38,
                "high": 6
            },
            "pressure": 1019,
            "precipitation": {
                "total": 0.05,
                "type": "rain"
            },
            "cape": 6,
            "evaporation": 0,
            "irradiance": 347,
            "ozone": 372
        },
        {
            "date": "2021-03-15T11:00:00",
            "weather": "snow_shower",
            "icon": 19,
            "temperature": 9.9,
            "soil_temperature": 8.7,
            "dew_point": 5.46,
            "surface_temperature": 10.7,
            "wind": {
                "speed": 13,
                "gusts": 29,
                "angle": 329,
                "dir": "NNW"
            },
            "cloud_cover": {
                "total": 77,
                "low": 37,
                "middle": 43,
                "high": 57
            },
            "pressure": 1020,
            "precipitation": {
                "total": 0.12,
                "type": "rain"
            },
            "cape": 0,
            "evaporation": 0,
            "irradiance": 481,
            "ozone": 370
        },
        {
            "date": "2021-03-15T12:00:00",
            "weather": "snow",
            "icon": 17,
            "temperature": 10.3,
            "soil_temperature": 9.3,
            "dew_point": 5.81,
            "surface_temperature": 10.84,
            "wind": {
                "speed": 13,
                "gusts": 24,
                "angle": 332,
                "dir": "NNW"
            },
            "cloud_cover": {
                "total": 100,
                "low": 65,
                "middle": 46,
                "high": 99
            },
            "pressure": 1020,
            "precipitation": {
                "total": 0.26,
                "type": "rain"
            },
            "cape": 4,
            "evaporation": 0,
            "irradiance": 521,
            "ozone": 372
        },
        {
            "date": "2021-03-15T13:00:00",
            "weather": "snow",
            "icon": 17,
            "temperature": 10.6,
            "soil_temperature": 9.9,
            "dew_point": 5.94,
            "surface_temperature": 10.52,
            "wind": {
                "speed": 12,
                "gusts": 25,
                "angle": 333,
                "dir": "NNW"
            },
            "cloud_cover": {
                "total": 100,
                "low": 75,
                "middle": 40,
                "high": 100
            },
            "pressure": 1021,
            "precipitation": {
                "total": 0.15,
                "type": "rain"
            },
            "cape": 6,
            "evaporation": 0,
            "irradiance": 443,
            "ozone": 373
        },
        {
            "date": "2021-03-15T14:00:00",
            "weather": "overcast",
            "icon": 7,
            "temperature": 10.8,
            "soil_temperature": 10.3,
            "dew_point": 5.66,
            "surface_temperature": 12.2,
            "wind": {
                "speed": 12,
                "gusts": 25,
                "angle": 334,
                "dir": "NNW"
            },
            "cloud_cover": {
                "total": 100,
                "low": 74,
                "middle": 60,
                "high": 100
            },
            "pressure": 1021,
            "precipitation": {
                "total": 0.07,
                "type": "rain"
            },
            "cape": 6,
            "evaporation": 0,
            "irradiance": 355,
            "ozone": 370
        },
        {
            "date": "2021-03-15T15:00:00",
            "weather": "overcast",
            "icon": 7,
            "temperature": 11,
            "soil_temperature": 10.4,
            "dew_point": 5.19,
            "surface_temperature": 11.43,
            "wind": {
                "speed": 12,
                "gusts": 25,
                "angle": 330,
                "dir": "NNW"
            },
            "cloud_cover": {
                "total": 99,
                "low": 33,
                "middle": 52,
                "high": 97
            },
            "pressure": 1021,
            "precipitation": {
                "total": 0.01,
                "type": "rain"
            },
            "cape": 3,
            "evaporation": 0,
            "irradiance": 266,
            "ozone": 368
        },
        {
            "date": "2021-03-15T16:00:00",
            "weather": "overcast",
            "icon": 7,
            "temperature": 11.1,
            "soil_temperature": 10.3,
            "dew_point": 4.24,
            "surface_temperature": 10.15,
            "wind": {
                "speed": 9,
                "gusts": 22,
                "angle": 332,
                "dir": "NNW"
            },
            "cloud_cover": {
                "total": 92,
                "low": 35,
                "middle": 47,
                "high": 88
            },
            "pressure": 1022,
            "precipitation": {
                "total": 0,
                "type": "none"
            },
            "cape": 4,
            "evaporation": 0,
            "irradiance": 117,
            "ozone": 367
        },
        {
            "date": "2021-03-15T17:00:00",
            "weather": "cloudy",
            "icon": 6,
            "temperature": 10.7,
            "soil_temperature": 10,
            "dew_point": 3.63,
            "surface_temperature": 8.88,
            "wind": {
                "speed": 6,
                "gusts": 15,
                "angle": 330,
                "dir": "NNW"
            },
            "cloud_cover": {
                "total": 87,
                "low": 26,
                "middle": 38,
                "high": 81
            },
            "pressure": 1023,
            "precipitation": {
                "total": 0,
                "type": "none"
            },
            "cape": 6,
            "evaporation": 0,
            "irradiance": 37,
            "ozone": 366
        },
        {
            "date": "2021-03-15T18:00:00",
            "weather": "mostly_cloudy",
            "icon": 5,
            "temperature": 9.8,
            "soil_temperature": 9.7,
            "dew_point": 3.18,
            "surface_temperature": 7,
            "wind": {
                "speed": 4,
                "gusts": 7,
                "angle": 312,
                "dir": "NW"
            },
            "cloud_cover": {
                "total": 73,
                "low": 33,
                "middle": 37,
                "high": 46
            },
            "pressure": 1023,
            "precipitation": {
                "total": 0,
                "type": "none"
            },
            "cape": 5,
            "evaporation": 0,
            "irradiance": 0,
            "ozone": 365
        },
        {
            "date": "2021-03-15T19:00:00",
            "weather": "partly_sunny",
            "icon": 4,
            "temperature": 8.4,
            "soil_temperature": 9.4,
            "dew_point": 2.96,
            "surface_temperature": 5.76,
            "wind": {
                "speed": 4,
                "gusts": 7,
                "angle": 300,
                "dir": "WNW"
            },
            "cloud_cover": {
                "total": 45,
                "low": 24,
                "middle": 26,
                "high": 19
            },
            "pressure": 1024,
            "precipitation": {
                "total": 0,
                "type": "none"
            },
            "cape": 9,
            "evaporation": 0,
            "irradiance": 0,
            "ozone": 365
        },
        {
            "date": "2021-03-15T20:00:00",
            "weather": "mostly_cloudy",
            "icon": 5,
            "temperature": 8.5,
            "soil_temperature": 9.1,
            "dew_point": 2.96,
            "surface_temperature": 4.57,
            "wind": {
                "speed": 4,
                "gusts": 9,
                "angle": 301,
                "dir": "WNW"
            },
            "cloud_cover": {
                "total": 59,
                "low": 53,
                "middle": 22,
                "high": 9
            },
            "pressure": 1025,
            "precipitation": {
                "total": 0,
                "type": "none"
            },
            "cape": 9,
            "evaporation": 0,
            "irradiance": 0,
            "ozone": 364
        },
        {
            "date": "2021-03-15T21:00:00",
            "weather": "cloudy",
            "icon": 6,
            "temperature": 8.1,
            "soil_temperature": 8.8,
            "dew_point": 3.01,
            "surface_temperature": 4.57,
            "wind": {
                "speed": 4,
                "gusts": 9,
                "angle": 305,
                "dir": "NW"
            },
            "cloud_cover": {
                "total": 83,
                "low": 58,
                "middle": 17,
                "high": 48
            },
            "pressure": 1025,
            "precipitation": {
                "total": 0,
                "type": "none"
            },
            "cape": 5,
            "evaporation": 0,
            "irradiance": 0,
            "ozone": 363
        },
        {
            "date": "2021-03-15T22:00:00",
            "weather": "cloudy",
            "icon": 6,
            "temperature": 7.5,
            "soil_temperature": 7.8,
            "dew_point": 3.64,
            "surface_temperature": 4.48,
            "wind": {
                "speed": 4,
                "gusts": 9,
                "angle": 306,
                "dir": "NW"
            },
            "cloud_cover": {
                "total": 89,
                "low": 26,
                "middle": 80,
                "high": 55
            },
            "pressure": 1026,
            "precipitation": {
                "total": 0,
                "type": "none"
            },
            "cape": 2,
            "evaporation": 0,
            "irradiance": 0,
            "ozone": 364
        },
        {
            "date": "2021-03-15T23:00:00",
            "weather": "cloudy",
            "icon": 6,
            "temperature": 6.9,
            "soil_temperature": 7.6,
            "dew_point": 3.68,
            "surface_temperature": 4.91,
            "wind": {
                "speed": 4,
                "gusts": 8,
                "angle": 311,
                "dir": "NW"
            },
            "cloud_cover": {
                "total": 85,
                "low": 0,
                "middle": 78,
                "high": 40
            },
            "pressure": 1026,
            "precipitation": {
                "total": 0,
                "type": "none"
            },
            "cape": 0,
            "evaporation": 0,
            "irradiance": 0,
            "ozone": 364
        }
    ]
}
        

Code examples

Looking to include Metesource weather data in your app or service? Our API supports all major programming languages. Find below a series of straightforward code examples in different programming languages, all requesting and printing the latest available weather.

Moreover, you can use our wrapper libraries that will make using our weather data quick and easy to do so.

Python

        
import requests

parameters = {'key': 'YOUR_API_KEY',
              'place_id': 'london'}

url = "https://www.meteosource.com/api/v1/free/point"

data = requests.get(url, parameters).json()

print('Current temperature in London is {} °C.'.format(data['current']['temperature']))  

        

PHP

        

$queryString = http_build_query([
  'key' => 'YOUR_API_KEY',
  'place_id' => 'london',
]);

$ch = curl_init(sprintf('%s?%s', 'https://www.meteosource.com/api/v1/free/point', $queryString));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$json = curl_exec($ch);
curl_close($ch);

$data = json_decode($json);

echo "Current temperature in London is " . $data->current->temperature . "°C\n";