Weather station data

The Meteum API allows you to get actual weather indicators from weather stations. To access the data, specify a list of required fields in the GraphQL method stations.

The request contains the coordinates of the rectangular area inside which the stations are located. The distance is calculated between the center of this area and the found stations.

The coordinates of the area are passed as parameters of the method:

  • minLat — minimal latitude;
  • maxLat — maximum latitude;
  • minLon — minimal longitude;
  • maxLon — maximum longitude.


{
  stations(
    maxLat: 53.51865768
    minLat: 51.51865768
    minLon: 12.37471867
    maxLon: 14.37471867
    language: EN
  ) {
    id
    distance
    name
    time
    humidity
    prec
    temperature
  }
}
Response
{
  "data": {
    "stations": [
      {
        "id": 12751,
        "distance": 123.45,
        "name": "Berlin-Schoenefeld",
        "time": "2022-09-09T13:20:00+03:00",
        "humidity": 64,
        "prec": 0,
        "temperature": 21
      },
      {
        "id": 48025,
        "distance": 123.45,
        "name": "Holzdorf",
        "time": "2022-09-09T11:00:00+03:00",
        "humidity": 80,
        "prec": 0,
        "temperature": 16
      },
      {
        "id": 14137,
        "distance": 123.45,
        "name": "Holzdorf",
        "time": "2022-09-09T13:20:00+03:00",
        "humidity": 57,
        "prec": 0,
        "temperature": 22
      }
    ]
  }
}

The request will return the indicators of all stations that are located in the area bounded by coordinates:

Note

Some weather stations may contain a smaller dataset.

  • id — station ID;
  • distance — the distance between the center of the given area and the found station;
  • name — the name of the station;
  • time — the time of receiving the last readings from the station;
  • humidity — relative humidity;
  • prec — the amount of precipitation (in millimeters);
  • temperature — the temperature in the shade at a height of 2 meters from the ground surface.

Station data for the period

To get the station readings for a certain period, use the GraphQL method stationsByTimeRange. The request contains the point, in the surrounding area of which the stations are located. The distance is calculated between the coordinates of a given point and the found station near it.

The following parameters are passed to the method:

  • request — coordinates of the point as a pair of values lat (latitude of the point) and lon (longitude of the point).
  • timeRange — a time interval in the form of a pair of values from (the beginning of the interval) and to (the end of the interval). The values are set in the Unix-time format.

Example:



{
  stationsByTimeRange(
    request: { lat: 52.718706, lon: 41.453126 }
    timeRange: { from: "1662036585", to: "1662209385" }
  ) {
    id
    distance
    time
    cloudiness
    humidity
    temperature
    prec
    windSpeed
  }
}
Response
{
  "data": {
    "stationsByTimeRange": [
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-01T18:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 35,
        "temperature": 19,
        "prec": 0,
        "windSpeed": 5
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-01T21:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 51,
        "temperature": 13,
        "prec": 0,
        "windSpeed": 2
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-02T00:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 68,
        "temperature": 9,
        "prec": 0,
        "windSpeed": 1
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-02T03:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 69,
        "temperature": 8,
        "prec": 0,
        "windSpeed": 1
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-02T06:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 78,
        "temperature": 6,
        "prec": 0,
        "windSpeed": 1
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-02T09:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 52,
        "temperature": 14,
        "prec": 0,
        "windSpeed": 6
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-02T12:00:00+03:00",
        "cloudiness": "PARTLY",
        "humidity": 39,
        "temperature": 16,
        "prec": 0,
        "windSpeed": 6
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-02T15:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 30,
        "temperature": 18,
        "prec": 0,
        "windSpeed": 7
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-02T18:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 40,
        "temperature": 15,
        "prec": 0,
        "windSpeed": 7
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-02T21:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 68,
        "temperature": 7,
        "prec": 0,
        "windSpeed": 1
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-03T03:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 84,
        "temperature": 4,
        "prec": 0,
        "windSpeed": 1
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-03T06:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 94,
        "temperature": 2,
        "prec": 0,
        "windSpeed": 1
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-03T09:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 56,
        "temperature": 12,
        "prec": 0,
        "windSpeed": 1
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-03T12:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 36,
        "temperature": 16,
        "prec": 0,
        "windSpeed": 2
      },
      {
        "id": 49539,
        "distance": 123.45,
        "time": "2022-09-03T15:00:00+03:00",
        "cloudiness": "CLEAR",
        "humidity": 28,
        "temperature": 18,
        "prec": 0,
        "windSpeed": 3
      }
    ]
  }
}

The request will return the indicators of the station that is located closest to the specified point for the period from 01.09.2022 to 03.09.2022:

Note

Some weather stations may contain a smaller dataset.

  • id — station ID;
  • distance — the distance from nearest station to the given points;
  • time — the time of receiving readings from the station;
  • cloudiness — cloud cover;
  • humidity — relative humidity;
  • temperature — the temperature in the shade at a height of 2 meters from the ground surface;
  • prec — the amount of precipitation (in millimeters);
  • windSpeed — wind speed.