Star
 Back to top

Weather API

Work in Progress - MeteoGroup’s public weather API documentation

Do you want to send feedback?

Roadmap for Weather API

General information

This technical document was created for developers who are creating applications based on weather data provided by this API.

The Weather API resolves weather data based on location specified by latitude and longitude coordinates. For weather parameters prediction API offer “forecast” endpoint and for weather history parameters API offer “observation” endpoint.

This document is using API blueprint format.

All endpoints are secured with HTTP basic authorization and data are transmitted over HTTPS protocol. If you want to get access please use request form.

Observation

Retrieve weather observation

Example

https://api.weather.mg/observation?location=53,13

Observed weather for a given *latitude* and *longitude*
GET/observation?location={latitudeInDegree,longitudeInDegree}

This resource provides data from existing weather observation stations. These are the latest values/parameters they provide. For any requested location a relevant station is computed. For the relevance the stations distance, height difference and available parameters are taken into concern.

This endpoint returns dummy data for now.

Example URI

GET /observation?location=52.13&13.2
URI Parameters
HideShow
latitudeInDegree
number (required) Example: 52.13

latitude in degree numeric format and in range <-90,90> eg. -85.541, 5.32

longitudeInDegree
number (required) Example: 13.2

longitude in degree numeric format and in range <-180,180> eg. -123.454, 179.864

speedUnit
string (optional) Example: meters_per_second

select which unit for windSpeed, windGust, etc.; valid values: meters_per_second, miles_per_hour, kilometers_per_hour, beaufort

temperatureUnit
string (optional) Example: degree

select which unit for airTemperature, etc.; valid values: degree, fahrenheit

precipitationUnit
string (optional) Example: millimeter

select which unit for precipitation, etc.; valid values: millimeter, inch

Response  200
HideShow
Headers
Content-Type: application/json
X-Request-Calls-Per-Interval: 4711
E-Tag: "x234dff"
Cache-Control: max-age=3628800
Body
{
  "location": {
    "latitude": 52.5337,
    "longitude": 13.37788,
    "timeZoneName": "Europe/Berlin"
  },
  "relevantStation": {
    "latitude": 23.43,
    "longitude": -56.23,
    "heightInMeters": -12.43,
    "id": 4711,
    "wmoId": 1231,
    "sourceType": "DWD",
    "name": "Berlin Tegel"
  },
  "observedAt": "2015-08-25T13:00:00+02:00",
  "airTemperature": {
    "value": 29.3,
    "unit": "DEGREE_CELSIUS"
  },
  "airPressureInHpa": 1012.9,
  "windSpeed": {
    "value": 7.4,
    "unit": "METER_PER_SECOND",
    "timeIntervalInMinutes": -60
  },
  "windGust": {
    "value": 21.6,
    "unit": "METER_PER_SECOND",
    "timeIntervalInMinutes": -60
  },
  "windDirectionInDegree": 274,
  "dewPointTemperature": {
    "value": 15.8,
    "unit": "DEGREE_CELSIUS"
  },
  "precipitation": {
    "value": 0.2,
    "unit": "MILLIMETER",
    "timeIntervalInMinutes": -60
  },
  "relativeHumidityInPercent100based": 63,
  "effectiveCloudCoverInOcta": 3,
  "visibility": {
    "value": 0.2,
    "unit": "KILOMETER"
  }
}

Forecast

Retrieve weather forecast

Example

https://api.weather.mg/forecast?location=53,13

Forecasted weather for a given *latitude* and *longitude*
GET/forecast?location={latitudeInDegree,longitudeInDegree}

Weather forecast for the next 7 days.

Example URI

GET /forecast?location=52.13&13.2
URI Parameters
HideShow
latitudeInDegree
number (required) Example: 52.13

latitude in degree numeric format and in range <-90,90> eg. -85.541, 5.32

longitudeInDegree
number (required) Example: 13.2

longitude in degree numeric format and in range <-180,180> eg. -123.454, 179.864

speedUnit
string (optional) Example: meters_per_second

select which unit for windSpeed, windGust, etc.; valid values: meters_per_second, miles_per_hour, kilometers_per_hour, beaufort

temperatureUnit
string (optional) Example: degree

select which unit for airTemperature, etc.; valid values: degree, fahrenheit

precipitationUnit
string (optional) Example: millimeter

select which unit for precipitation, etc.; valid values: millimeter, inch

Response  200
HideShow
Headers
Content-Type: application/json
X-Request-Calls-Per-Interval: 4712
E-Tag: "a987dff"
Cache-Control: max-age=600
Body
{
  "location": {
    "latitude": 52.5337,
    "longitude": 13.37788,
    "timeZoneName": "Europe/Berlin"
  },
  "forecasts": {
    "hourly": [
      {
        "validAt": "2015-08-25T14:00:00+02:00",
        "airTemperature": {
          "value": 29,
          "unit": "DEGREE_CELSIUS"
        },
        "dewPointTemperature": {
          "value": 15.8,
          "unit": "DEGREE_CELSIUS"
        },
        "airPressureInHpa": 1012.9,
        "sunshineDurationPastIntervalInMinutes": 23,
        "precipitationPastInterval": {
          "value": 0,
          "unit": "MILLIMETER"
        },
        "precipitationProbabilityInPercent100based": 0,
        "averageWindSpeed": {
          "value": 7.48,
          "unit": "METER_PER_SECOND",
          "timeIntervalInMinutes": -60
        },
        "windGust": {
          "value": 21.6,
          "unit": "METER_PER_SECOND",
          "timeIntervalInMinutes": -60
        },
        "windDirectionInDegree": 274,
        "effectiveCloudCoverInOcta": 3
      }
    ]
  }
}

Generated by aglio on 24 Mar 2016