---
title: "Weather sources (stations)"
method: GET
path: "/sources"
tags: ["Internals"]
---

# Weather sources (stations)

`GET /sources`

Return a list of all Bright Sky sources matching the given location
criteria, ordered by distance.

You must supply both `lat` and `lon` _or_ one of `dwd_station_id`,
`wmo_station_id`, or `source_id`.

## Query parameters

- `lat` number — Latitude in decimal degrees.
- `lon` number — Longitude in decimal degrees.
- `max_dist` integer — Maximum distance of record location from the location given by `lat` and `lon`, in meters. Only has an effect when using `lat` and `lon`.
- `dwd_station_id` string[] — DWD station ID, typically five alphanumeric characters. You can supply multiple station IDs separated by commas, ordered from highest to lowest priority.
- `wmo_station_id` string[] — WMO station ID, typically five alphanumeric characters. You can supply multiple station IDs separated by commas, ordered from highest to lowest priority.
- `source_id` integer[] — Bright Sky source ID, as retrieved from the [`/sources` endpoint](/operations/getSources). You can supply multiple source IDs separated by commas, ordered from highest to lowest priority.
- `tz` string — Timezone in which record timestamps will be presented, as <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">tz database name</a>. Will also be used as timezone when parsing `date` and `last_date`, unless these have explicit UTC offsets. If omitted but `date` has an explicit UTC offset, that offset will be used as timezone. Otherwise will default to UTC.

## Response `200`

Successful Response

- SourcesResponse
  - `sources` Source[]
    - `id` integer — Bright Sky source ID
    - `dwd_station_id` string, nullable — DWD weather station ID
    - `wmo_station_id` string, nullable — WMO weather station ID
    - `station_name` string, nullable — DWD weather station name
    - `observation_type` 'historical' | 'current' | 'synop' | 'forecast' — Source type
    - `first_record` string, date-time — Timestamp of first available record for this source
    - `last_record` string, date-time — Timestamp of latest available record for this source
    - `lat` number — Station latitude, in decimal degrees
    - `lon` number — Station longitude, in decimal degrees
    - `height` number — Station height, in meters
    - `distance` integer — Distance of weather station to the requested `lat` and `lon` (if given), in meters

## Other responses

- `404` — Not Found
- `422` — Validation Error

---

[API](https://skmtc.dev/brightsky/apis/bright-sky.md) · [All operations](https://skmtc.dev/brightsky/apis/bright-sky/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/brightsky/bright-sky/revisions/d9d6acc7794a/schema)
