{"openapi":"3.1.2","info":{"title":"meteoblue Measurements API","description":"# Overview\nThe meteoblue Measurements API provides RESTful access to observational meteorological data collected from a wide\nrange of measurement networks worldwide. It is designed for developers, analysts, and data scientists who require\naccess to raw, detailed measurement data for integration, visualisation or scientific modelling.\n\nLearn more about the features and use cases of the [Measurements API](https://business.meteoblue.com/products/weather-apis/measurements-api) on our website.\n\n## Key Capabilities\n- Discover measurement providers and their station networks\n- Identify available parameters (e.g. temperature, wind speed, pressure) and metadata\n- Retrieve time-series measurements from selected stations\n- Select the nearest available station to a target location\n- Combine measurements from multiple stations for broader spatial context\n\n## Data Normalisation and Units\nmeteoblue applies best-effort normalisation across heterogeneous data sources to improve consistency while preserving\noriginal measurement characteristics. This includes:\n- Standardised parameter naming\n- Numeric values represented as integers or floats\n- Timestamps expressed as UTC Unix epoch seconds (`int64`)\n- Station metadata validated for plausible locations\n\nSubtle differences in measurement conventions may still occur. For example, wind direction may reflect an instantaneous\nreading or a dominant direction over an interval. Similar nuances may apply to gusts, precipitation intervals, visibility and other variables.\n\n## Schema Evolution\nAs measurement networks expand and improve, new parameters and metadata fields may appear without prior notice. Deprecated\nfields may remain available for a limited time. Client implementations should:\n- Treat all fields as optional\n- Ignore unknown fields safely\n- Request only the parameters required\n\n## Quality Control Specifics\nIn the context of this API the data which is aggregated from different sources is referred to as `raw`.\nThese data might already have been subject to a quality control, though they are still part of the `raw` data.\n\nFrom this data other quality controlled versions are generated by meteoblue. These routines are under constant development to improve their effectiveness.\nThese routines might change the time-resolution and might only consider a part of the actual data. The data in these cases is referred to as `qc` (quality controlled) data.\nThe routines consist of multiple checks which validate the timeseries of a single station as well as values from different stations at the same time.\n\nIn some cases there is also a version of the data where gaps in the data are filled in using weather-model data. In these cases the data is called `gap-filled`.\n\nIf it's not obvious from the name of a provider, refer to the meta-data provided by the `/v2/provider/list` endpoint for more information.\n\n## Station Lifecycles\nStations may:\n- Go offline or return\n- Be moved, renamed or reconfigured\n- Change metadata or coordinates over time\n- Be removed if they don't meet data quality requirements\n\n## Missing Data and Conventions\nMissing measurements may:\n- Be omitted entirely, or\n- Appear as `NaN` in numeric fields\n\nSome providers may use error codes (e.g. `-999`) instead of `NaN`, though usually this shouldn't happen as meteoblue converts such values.\nPartial records (some fields missing) are possible.\n\n## Availability and Service Expectations\nThe API operates on a best-effort basis. meteoblue cannot guarantee continuous availability of stations, variables, or time periods.\nAdding historic data or importing missing time-intervals retroactively is not always possible.\n\n## Licensing and Attribution\nSome data require third-party attribution. You must comply with applicable licence terms. Use the meta-data provided by the `v2/provider/list` endpoint for more details.\n\n## Accounting\nAccess is authenticated using a meteoblue API key (`apikey={APIKEY}`) and consumes credits.\nRequests which give out measurement related data have a variable cost. For ever measurement value / datapoint (1 variable * 1 location * 1 timestep) which is returned a certain amount of credits is deducted.\n\n**Credits:**\n- List Providers — 100 credits\n- List Fields — 100 credits\n- Nearest Station Lookup — 100 credits\n- Monthly Coverage - 100 credits\n- Station Meta-data — 100 credits\n- Measurement Raw Data — 200 credits _per value_\n- Measurement QC Data — 400 credits _per value_\n\n**Important:**\n- Minimum of 300 credits is required per valid request\n- Check coverage before requesting data to avoid unnecessary costs\n\n## Client Recommendations\n- Handle missing, `NaN`, or placeholder values gracefully\n- Do not assume fixed sampling intervals\n- Refresh station metadata periodically\n- Use tolerant parsing with fallback defaults\n\n## Support\nPlease report issues to **support@meteoblue.com**.","version":"v2","x-logo":{"url":"https://static.meteoblue.com/assets/images/logo/meteoblue_logo_v2.0.png","backgroundColor":"hsl(210deg, 40%, 98%)","altText":"meteoblue","href":"https://docs.meteoblue.com/en/weather-apis/introduction/overview"}},"tags":[{"name":"Measurements-API"}],"servers":[{"url":"https://measurements-api.meteoblue.com"}],"security":[{"apikey":[]}],"paths":{"/v2/provider/list":{"parameters":[{"name":"selectedVariable","in":"query","schema":{"type":"string","enum":["airTemperature","airTemperature_10cm","airTemperature_2m","airTemperature_5cm","airTemperature_sfc","airTemperature_unknown","apparentTemperature","apparentTemperature_2m","apparentTemperature_unknown","battery","cloudBaseHeight","cloudTopHeight","dewPoint","dewPoint_2m","dewPoint_unknown","globalRadiation","globeResistance","globeResistance_unknown","globeTemperature","globeTemperature_unknown","globeVoltageRatio","globeVoltageRatio_unknown","precipitation","precipitationDuration","precipitationRate","pressureTendency","pressure_msl","pressure_sfc","relativeHumidity","relativeHumidity_2m","relativeHumidity_unknown","sensorTemperature","sensorTemperature_unknown","snowDepth","soilTemperature","soilTemperature_10cm","soilTemperature_1m","soilTemperature_20cm","soilTemperature_2cm","soilTemperature_2m","soilTemperature_50cm","soilTemperature_5cm","soilTemperature_unknown","sunshineDuration","surfaceTemperature","totalCloudCover","uvIndex","vaporPressure","visibility","waterTemperature","waterTemperature_unknown","wetbulbTemperature","wetbulbTemperature_unknown","windChill","windChill_2m","windChill_unknown","windDirection","windDirection_10m","windDirection_20m","windDirection_2m","windDirection_70m","windDirection_unknown","windGust","windGustDirection","windGustDirection_10m","windGustDirection_2m","windGustDirection_70m","windGustDirection_unknown","windGust_10m","windGust_2m","windGust_70m","windGust_unknown","windSpeed","windSpeed_10m","windSpeed_20m","windSpeed_2m","windSpeed_70m","windSpeed_unknown"],"examples":["airTemperature"]},"description":"Optional variable filter in the form {variable}_{height}.\n\nIn some cases it is not known, what height a variable is measured at. In these cases the height suffix `_unknown` is used.\nSome variables types, such as `precipitation`, have no height meta data attached to them,\ntherefore it is omitted.\n\nWhen the exact height of the variable is not important it can be omitted by the user. In that case the default height will be used."}],"get":{"tags":["Measurements-API"],"summary":"Providers List","description":"This endpoint returns all data providers that the API currently supports and that\nare authorized for use with your API key. If you do not see a provider that you are allowed to access,\nplease contact `support@meteoblue.com`.\n- - -\n## Structure\n\nThis endpoint requires no parameters; however, it supports filtering providers based on specific variables.\nIf any station belonging to a provider has ever measured the specified variable, that provider is returned.\nThe expected response is an array of provider descriptors containing:\n- Number of stations available\n- Time resolution of measurement data\n- Source information\n- License information\n\nThe information returned here is high level — for details on fields or schema,\nyou need to call the `provider/{provider}/station/fields` or `provider/{provider}/measurement/fields` endpoints.\nTypically, you start here, then select a provider and continue by inspecting available stations and the\nmeasurement parameter fields for that provider.\n\n## About Providers\nA provider contains a collection of stations from a specific source. The stations of a provider almost always share the same characteristics like data quality and station setup.\nDepending on the use-case a different subset of providers might be of interest.\n\nWhen raw-data with as little processing as possible is desired providers with no `qc` (quality control) or `gap-fill` should be selected.\n\nLikewise if data with highest quality are desired providers with `qc` should be considered.\n\nHere is a list of some special providers:\n\n- `Hourly Qc Realtime` - Network which always only contains data from the last few days\n- `Hourly Qc Archive` - Network of stations which contains data from longer ago\n- `City Climate Qc` - Network of City Climate which was quality controlled\n- `City Climate GapFill` - Network of City Climate which was quality controlled and gap-filled\n\n- - -\n## Variables\n- `\"airTemperature\"`: The actual temperature of the air at default height\n- `\"airTemperature_10cm\"`: The actual temperature of the air at 10 cm above the ground\n- `\"airTemperature_2m\"`: The actual temperature of the air at 2 m above the ground\n- `\"airTemperature_5cm\"`: The actual temperature of the air at 5 cm above the ground\n- `\"airTemperature_sfc\"`: The actual temperature of the air at the surface\n- `\"airTemperature_unknown\"`: The actual temperature of the air at an unknown height\n- `\"apparentTemperature\"`: The perceived temperature at default height\n- `\"apparentTemperature_2m\"`: The perceived temperature at 2 m above the ground\n- `\"apparentTemperature_unknown\"`: The perceived temperature at an unknown height\n- `\"battery\"`: Voltage of the battery of the station\n- `\"cloudBaseHeight\"`: The altitude of the lowest visible part of a cloud layer above ground level\n- `\"cloudTopHeight\"`: The altitude of the highest part of a cloud layer above ground level\n- `\"dewPoint\"`: The temperature at which air becomes saturated and dew begins to form above the ground at default height\n- `\"dewPoint_2m\"`: The temperature at which air becomes saturated and dew begins to form above the ground at 2 m above the ground\n- `\"dewPoint_unknown\"`: The temperature at which air becomes saturated and dew begins to form above the ground at an unknown height\n- `\"globalRadiation\"`: The total incoming solar radiation (direct and diffuse) received on a horizontal surface\n- `\"globeResistance\"`: The electrical resistance measured by a globe thermometer sensor, related to temperature at default height\n- `\"globeResistance_unknown\"`: The electrical resistance measured by a globe thermometer sensor, related to temperature at an unknown height\n- `\"globeTemperature\"`: The temperature measured by a black globe thermometer representing combined effects of radiation, convection, and conduction at default height\n- `\"globeTemperature_unknown\"`: The temperature measured by a black globe thermometer representing combined effects of radiation, convection, and conduction at an unknown height\n- `\"globeVoltageRatio\"`: The ratio of a globe sensor’s output voltage to its input voltage, used for calibration or measurement conversion at default height\n- `\"globeVoltageRatio_unknown\"`: The ratio of a globe sensor’s output voltage to its input voltage, used for calibration or measurement conversion at an unknown height\n- `\"precipitation\"`: The total amount of water (rain, snow, sleet, etc.) that falls to the ground over a period\n- `\"precipitationDuration\"`: The total time during which measurable precipitation occurs\n- `\"precipitationRate\"`: The intensity of precipitation, typically expressed as depth per hour (e.g., mm/h)\n- `\"pressureTendency\"`: The direction of the change in pressure compared to the previous pressure measurement; a negative number if the pressure decreased, a positive number if the pressure increased; the meaning of the absolute value of this number is provider dependent\n- `\"pressure_msl\"`: The pressure at mean sea level\n- `\"pressure_sfc\"`: The pressure at surface/station level\n- `\"relativeHumidity\"`: The ratio of actual water vapor in the air to the maximum amount it can hold at that temperature at default height\n- `\"relativeHumidity_2m\"`: The ratio of actual water vapor in the air to the maximum amount it can hold at that temperature at 2 m above the ground\n- `\"relativeHumidity_unknown\"`: The ratio of actual water vapor in the air to the maximum amount it can hold at that temperature at an unknown height\n- `\"sensorTemperature\"`: The internal temperature of a sensor device, used for calibration or diagnostics at default height\n- `\"sensorTemperature_unknown\"`: The internal temperature of a sensor device, used for calibration or diagnostics at an unknown height\n- `\"snowDepth\"`: The measured depth of accumulated snow on the ground\n- `\"soilTemperature\"`: The temperature of the soil at default height\n- `\"soilTemperature_10cm\"`: The temperature of the soil at 10 cm below the ground\n- `\"soilTemperature_1m\"`: The temperature of the soil at 1 m below the ground\n- `\"soilTemperature_20cm\"`: The temperature of the soil at 20 cm below the ground\n- `\"soilTemperature_2cm\"`: The temperature of the soil at 2 cm below the ground\n- `\"soilTemperature_2m\"`: The temperature of the soil at 2 m below the ground\n- `\"soilTemperature_50cm\"`: The temperature of the soil at 50 cm below the ground\n- `\"soilTemperature_5cm\"`: The temperature of the soil at 5 cm below the ground\n- `\"soilTemperature_unknown\"`: The temperature of the soil at an unknown height\n- `\"sunshineDuration\"`: The cumulative time period when direct solar radiation exceeds a set threshold\n- `\"surfaceTemperature\"`: The temperature of the ground or surface layer in contact with the atmosphere\n- `\"totalCloudCover\"`: The fraction or percentage of the sky covered by clouds\n- `\"uvIndex\"`: A standardized measure of the strength of ultraviolet radiation from the sun at the surface\n- `\"vaporPressure\"`: The partial pressure exerted by water vapor in the air\n- `\"visibility\"`: The maximum horizontal distance at which objects can be clearly seen\n- `\"waterTemperature\"`: The temperature of a water body such as a river, lake, or ocean at default height\n- `\"waterTemperature_unknown\"`: The temperature of a water body such as a river, lake, or ocean at an unknown height\n- `\"wetbulbTemperature\"`: The lowest temperature that can be reached by evaporative cooling of a water-saturated air parcel at default height\n- `\"wetbulbTemperature_unknown\"`: The lowest temperature that can be reached by evaporative cooling of a water-saturated air parcel at an unknown height\n- `\"windChill\"`: The perceived temperature when factoring in the wind at default height\n- `\"windChill_2m\"`: The perceived temperature when factoring in the wind at 2 m above the ground\n- `\"windChill_unknown\"`: The perceived temperature when factoring in the wind at an unknown height\n- `\"windDirection\"`: The compass direction from which the wind is blowing at default height\n- `\"windDirection_10m\"`: The compass direction from which the wind is blowing at 10 m above the ground\n- `\"windDirection_20m\"`: The compass direction from which the wind is blowing at 20 m above the ground\n- `\"windDirection_2m\"`: The compass direction from which the wind is blowing at 2 m above the ground\n- `\"windDirection_70m\"`: The compass direction from which the wind is blowing at 70 m above the ground\n- `\"windDirection_unknown\"`: The compass direction from which the wind is blowing at an unknown height\n- `\"windGust\"`: The peak wind speed observed over a short time interval at default height\n- `\"windGustDirection\"`: The direction from which the strongest wind gust originates at default height\n- `\"windGustDirection_10m\"`: The direction from which the strongest wind gust originates at 10 m above the ground\n- `\"windGustDirection_2m\"`: The direction from which the strongest wind gust originates at 2 m above the ground\n- `\"windGustDirection_70m\"`: The direction from which the strongest wind gust originates at 70 m above the ground\n- `\"windGustDirection_unknown\"`: The direction from which the strongest wind gust originates at an unknown height\n- `\"windGust_10m\"`: The peak wind speed observed over a short time interval at 10 m above the ground\n- `\"windGust_2m\"`: The peak wind speed observed over a short time interval at 2 m above the ground\n- `\"windGust_70m\"`: The peak wind speed observed over a short time interval at 70 m above the ground\n- `\"windGust_unknown\"`: The peak wind speed observed over a short time interval at an unknown height\n- `\"windSpeed\"`: The average rate of air movement past a given point at default height\n- `\"windSpeed_10m\"`: The average rate of air movement past a given point at 10 m above the ground\n- `\"windSpeed_20m\"`: The average rate of air movement past a given point at 20 m above the ground\n- `\"windSpeed_2m\"`: The average rate of air movement past a given point at 2 m above the ground\n- `\"windSpeed_70m\"`: The average rate of air movement past a given point at 70 m above the ground\n- `\"windSpeed_unknown\"`: The average rate of air movement past a given point at an unknown height","responses":{"200":{"description":"OK","headers":{"MB-Credits-Accounted":{"$ref":"#/components/headers/accounting-header"}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","description":"Identifier of the provider used in most api-queries."},"name":{"type":"string","description":"Full name of the provider useful for displaying their name."},"owner":{"type":"string","description":"Data Owner"},"source":{"type":"string","default":"","description":"A link for giving attribution."},"license":{"type":"string","enum":["confidential","internalUse","externalDisplay","restrictedUse","thirdPartyUse","thirdPartyResale"],"examples":["restrictedUse"]},"temporal_resolution":{"type":"string","enum":["fiveMinutes","tenMinutes","fifteenMinutes","twentyMinutes","hourly","daily","irregular"],"description":"How regularly stations of this provider yield data. If it's not consistent across all stations this is set to 'irregular'."},"color":{"type":"string","description":"A color in hex-notation. It is chosen arbitrarily and has no direct correlation to the provider.","examples":["#000000"]},"number_of_stations":{"type":"integer","description":"Amount of unique stations this provider currently has.","minimum":0},"qc":{"type":"boolean","description":"Indictor for wether data by this provider was quality controlled by meteoblue."},"gapFill":{"type":"boolean","description":"Indictor for wether data by this provider was gap filled with model-data by meteoblue."},"start_month":{"type":["integer","null"],"description":"First Month with measurement data encoded as an integer in the format 'yyyyMM'."}},"required":["provider","name","owner","source","license","temporal_resolution","color","number_of_stations","qc","gapFill","start_month"]},"uniqueItems":true},"examples":{"Example Providers List":{"summary":"Example Providers List","description":"Example of a provider-list response with two distinct providers.","value":[{"owner":"Name of the Data Owner","name":"Full-Long Name of the provider1","provider":"provider_identifier1","temporal_resolution":"hourly","qc":false,"number_of_stations":10,"gapFill":false,"start_month":202501,"source":"http://example.com","color":"#124673","license":"restrictedUse"},{"owner":"Name of another Data Owner","name":"Full-Long Name of the provider2","provider":"provider_identifier2","temporal_resolution":"irregular","qc":true,"number_of_stations":100,"gapFill":false,"start_month":202512,"source":"http://example.com","color":"#FFFFFF","license":"restrictedUse"}]}}}}},"400":{"$ref":"#/components/responses/error-response","description":"Bad Request"},"401":{"$ref":"#/components/responses/error-response","description":"Unauthorized"},"403":{"$ref":"#/components/responses/error-response","description":"Forbidden"},"429":{"$ref":"#/components/responses/error-response","description":"Too Many Requests"},"503":{"$ref":"#/components/responses/error-response","description":"Service Unavailable"}},"x-codeSamples":[{"lang":"JavaScript","source":"fetch(\"https://measurements-api.meteoblue.com/v2/provider/list?apikey=YOUR_APIKEY\")\n.then(res => res.json())\n.then(console.log);"},{"lang":"Python","source":"import requests\n\nurl = f\"https://measurements-api.meteoblue.com/v2/provider/list?apikey=YOUR_APIKEY\"\nresponse = requests.get(url)\nprint(response.json())"},{"lang":"Shell","source":"curl \"https://measurements-api.meteoblue.com/v2/provider/list?apikey=YOUR_APIKEY\""},{"lang":"Java","source":"import java.net.*;\nimport java.io.*;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String url = \"https://measurements-api.meteoblue.com/v2/provider/list?apikey=YOUR_APIKEY\";\n        HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n        conn.setRequestMethod(\"GET\");\n\n        try (BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n            String line;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        }\n    }\n}"}]}},"/v2/provider/{provider}/station/fields":{"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","examples":["metar","synop"]},"description":"Provider parameter from the providers list.\nFor more information on available providers refer to the `v2/provider/list` endpoint."}],"get":{"tags":["Measurements-API"],"summary":"Available Meta-Data Fields of a Provider","description":"Use this endpoint to query which **station meta-data fields** can be retrieved for the selected provider.\n\n### Important\nThese schemas describe **meta-data only**, not measurements.\n\n### Usage Hint\nYou typically call this before requesting actual station data from\n`provider/{provider}/stations/get`.\n\nAlthough the stations of all providers always include a minimal set of meta-data fields\n(e.g., `created_at`, `id`, `lat`, `lon`, `asl`), this endpoint allows you to\nretrieve **provider-specific meta-data fields** that may not be present for other providers\nand may be more extensive than the minimal set provided in measurement queries.","responses":{"200":{"description":"OK","headers":{"MB-Credits-Accounted":{"$ref":"#/components/headers/accounting-header"}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field."},"alias":{"type":["string","null"],"description":"Alias which can be used for this field."},"type":{"type":"string","enum":["date","string","float","boolean","integer"],"description":"The data-type of this column."},"timespan":{"type":["string","null"],"enum":["atTimestamp","prevMinute","prev2Minutes","prev5Minutes","prev10Minutes","prev15Minutes","prevHour","prev3Hours","prev6Hours","prev12Hours","prev24Hours","prevDay","currentDay","sinceLastTimestamp","unknown","toBeSpecified","variable",null],"description":"The timespan over which the aggregation from the provider is applied. Not provided for fields where it doesn't make sense."},"aggregation":{"type":["string","null"],"enum":["none","unknown","mean","max","min","count","total","last","time",null],"description":"The aggregations method the provider uses on the data. Not provided for fields where it doesn't make sense."}},"required":["field","alias","type","timespan","aggregation"]},"uniqueItems":true},"examples":{"Example Station Fields":{"summary":"Example Station Fields","description":"Example response of station fields.","value":[{"field":"created_at","type":"date","timespan":null,"alias":null,"aggregation":null},{"field":"id","type":"string","timespan":null,"alias":null,"aggregation":null},{"field":"name","type":"string","timespan":null,"alias":null,"aggregation":null},{"field":"lat","type":"float","timespan":null,"alias":null,"aggregation":null},{"field":"lon","type":"float","timespan":null,"alias":null,"aggregation":null},{"field":"asl","type":"float","timespan":null,"alias":null,"aggregation":null}]}}}}},"400":{"$ref":"#/components/responses/error-response","description":"Bad Request"},"401":{"$ref":"#/components/responses/error-response","description":"Unauthorized"},"403":{"$ref":"#/components/responses/error-response","description":"Forbidden"},"404":{"$ref":"#/components/responses/error-response","description":"Not Found"},"429":{"$ref":"#/components/responses/error-response","description":"Too Many Requests"}},"x-codeSamples":[{"lang":"JavaScript","source":"fetch(\"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/station/fields?apikey=YOUR_APIKEY\")\n.then(res => res.json())\n.then(console.log);"},{"lang":"Python","source":"import requests\n\nurl = f\"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/station/fields?apikey=YOUR_APIKEY\"\nresponse = requests.get(url)\nprint(response.json())"},{"lang":"Shell","source":"curl \"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/station/fields?apikey=YOUR_APIKEY\""},{"lang":"Java","source":"import java.net.*;\nimport java.io.*;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String url = \"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/station/fields?apikey=YOUR_APIKEY\";\n        HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n        conn.setRequestMethod(\"GET\");\n\n        try (BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n            String line;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        }\n    }\n}"}]}},"/v2/provider/{provider}/station/get":{"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","examples":["metar","synop"]},"description":"Provider parameter from the providers list.\nFor more information on available providers refer to the `v2/provider/list` endpoint."},{"name":"timeStart","in":"query","schema":{"type":"string","format":"date-time","examples":["2020-04-01T00:00:00"],"pattern":"(?:18|19|20|21)\\d\\d-\\d\\d-01T00:00:00(?:Z)?"},"description":"The start month for the time frame when retrieving relevant stations.\n## Format\n- ISO8601 format in UTC timezone\n- Date format is `yyyy-MM-01T00:00:00` (Always first day of the month at 00:00 UTC)\n- Default value is 1 year ago."},{"name":"timeEnd","in":"query","schema":{"type":"string","format":"date-time","examples":["2020-05-01T00:00:00"],"pattern":"^(?:18|19|20|21)\\d\\d-\\d\\d-01T00:00:00(?:Z)?$"},"description":"The end month for the time frame when retrieving relevant stations\n## Format\n- in ISO8601 in UTC timezone\n- Date format is `yyyy-MM-01T00:00:00` (Always first day of the month at 00:00 UTC)\n- Default value is current server system time `UTC`."},{"name":"minCoverage","in":"query","schema":{"type":"number","format":"float","default":0.0,"examples":[0.0],"maximum":100.0,"minimum":0.0},"description":"The minimum hourly percent coverage for single stations regarding the selected variable.\nUse this to filter stations by their temporal-coverage. Only stations with coverages higher than this threshold are considered.\n\nIn general, the coverage of a variable represents how much valid data is available.\nIt is defined as the percentage of hours containing at least one non-NaN value.\n\nFor example, the coverage drops to `0` if a station stops delivering data entirely.\nA station that provides at *least one valid* (non-NaN) value every hour will have a coverage of `100`.\n\n**Important**: The coverage is on a fixed hourly-time-axis, which might not reflect the exact coverage of the station.\nAs an example a station with daily resolution can at most cover **only** a 24th of the hours, resulting in a percent coverage of about `0.041`."},{"name":"maxCoverage","in":"query","schema":{"type":"number","format":"float","default":100.0,"examples":[100.0],"maximum":100.0,"minimum":0.0},"description":"The maximum hourly percent coverage for single stations regarding the selected variable.\nUse this to filter stations by their temporal-coverage. Only stations with coverages lower than this threshold are considered.\n\nIn general, the coverage of a variable represents how much valid data is available.\nIt is defined as the percentage of hours containing at least one non-NaN value.\n\nFor example, the coverage drops to `0` if a station stops delivering data entirely.\nA station that provides at *least one valid* (non-NaN) value every hour will have a coverage of `100`.\n\n**Important**: The coverage is on a fixed hourly-time-axis, which might not reflect the exact coverage of the station.\nAs an example a station with daily resolution can at most cover **only** a 24th of the hours, resulting in a percent coverage of about `0.041`."},{"name":"selectedVariable","in":"query","schema":{"type":"string","enum":["airTemperature","airTemperature_10cm","airTemperature_2m","airTemperature_5cm","airTemperature_sfc","airTemperature_unknown","apparentTemperature","apparentTemperature_2m","apparentTemperature_unknown","battery","cloudBaseHeight","cloudTopHeight","dewPoint","dewPoint_2m","dewPoint_unknown","globalRadiation","globeResistance","globeResistance_unknown","globeTemperature","globeTemperature_unknown","globeVoltageRatio","globeVoltageRatio_unknown","precipitation","precipitationDuration","precipitationRate","pressureTendency","pressure_msl","pressure_sfc","relativeHumidity","relativeHumidity_2m","relativeHumidity_unknown","sensorTemperature","sensorTemperature_unknown","snowDepth","soilTemperature","soilTemperature_10cm","soilTemperature_1m","soilTemperature_20cm","soilTemperature_2cm","soilTemperature_2m","soilTemperature_50cm","soilTemperature_5cm","soilTemperature_unknown","sunshineDuration","surfaceTemperature","totalCloudCover","uvIndex","vaporPressure","visibility","waterTemperature","waterTemperature_unknown","wetbulbTemperature","wetbulbTemperature_unknown","windChill","windChill_2m","windChill_unknown","windDirection","windDirection_10m","windDirection_20m","windDirection_2m","windDirection_70m","windDirection_unknown","windGust","windGustDirection","windGustDirection_10m","windGustDirection_2m","windGustDirection_70m","windGustDirection_unknown","windGust_10m","windGust_2m","windGust_70m","windGust_unknown","windSpeed","windSpeed_10m","windSpeed_20m","windSpeed_2m","windSpeed_70m","windSpeed_unknown"],"examples":["airTemperature"]},"description":"Optional variable filter in the form {variable}_{height}.\n\nIn some cases it is not known, what height a variable is measured at. In these cases the height suffix `_unknown` is used.\nSome variables types, such as `precipitation`, have no height meta data attached to them,\ntherefore it is omitted.\n\nWhen the exact height of the variable is not important it can be omitted by the user. In that case the default height will be used."},{"name":"stations","in":"query","schema":{"type":"array","description":"An array of station identifiers.","items":{"type":"string","description":"A Station Identifier.","minLength":1},"minItems":1,"uniqueItems":true},"description":"One or multiple station id's. Valid id's depend on the selected provider.\nIf not set, all stations of that provider are considered."},{"name":"latLonBox","in":"query","schema":{"type":"array","examples":[[-180,-90,180,90]],"items":{"type":"number","format":"float","maximum":180.0,"minimum":-180.0},"maxItems":4,"minItems":4,"prefixItems":[{"type":"number","format":"float","maximum":180.0,"minimum":-180.0},{"type":"number","format":"float","maximum":90.0,"minimum":-90.0},{"type":"number","format":"float","maximum":180.0,"minimum":-180.0},{"type":"number","format":"float","maximum":90.0,"minimum":-90.0}]},"description":"Four values of latitude and longitude to form a Bounding-Box.\nFor a valid bounding box you need to specify two points, the upper left and lower right in this order:\n- top left : lon1, lat1,\n- lower right: lon2, lat2"},{"name":"fields","in":"query","schema":{"type":"array","items":{"type":"string","examples":[["id","lat","lon","asl"]],"minLength":1,"pattern":"^[a-zA-Z0-9]+$"},"minItems":1,"uniqueItems":true},"description":"The Names of the selected fields. If not set, all fields available from that provider are returned.\nRefer to the 'fields'-endpoint for more information on the available fields, to get a more granular response."},{"name":"latest","in":"query","schema":{"type":"boolean","default":false,"examples":[false]},"description":"Whether to only return the latest entry per station in the given timerange."},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"],"default":"asc","examples":["asc"]},"description":"Secondary ordering of entries (timestamp). Default value is Ascending order."},{"name":"format","in":"query","schema":{"type":"string","enum":["json","csv","xlsx","geojson","protobuf"],"default":"json","examples":["json"]},"description":"The output format to return the response in."},{"name":"timeformat","in":"query","schema":{"type":"string","enum":["timestamp_utc","iso8601","YMD"],"default":"timestamp_utc","examples":["timestamp_utc"]},"description":"The format to return time values in."},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"examples":[10],"maximum":100000000,"minimum":1},"description":"Amount of rows per page. Default value is 10."},{"name":"page","in":"query","schema":{"type":"integer","default":1,"examples":[1],"maximum":1000000,"minimum":1},"description":"Page of results to display, starting at 1. Default value is 1."}],"get":{"tags":["Measurements-API"],"summary":"Actual Meta-Data of a Provider","description":"Use this endpoint to retrieve **station meta-data** from the selected provider.\n\nIt returns meta-data entries including **station ID**, **coordinates**, **name**, **elevation** and any **provider-specific attributes**.\n\n---\n## Variables\n- `\"airTemperature\"`: The actual temperature of the air at default height\n- `\"airTemperature_10cm\"`: The actual temperature of the air at 10 cm above the ground\n- `\"airTemperature_2m\"`: The actual temperature of the air at 2 m above the ground\n- `\"airTemperature_5cm\"`: The actual temperature of the air at 5 cm above the ground\n- `\"airTemperature_sfc\"`: The actual temperature of the air at the surface\n- `\"airTemperature_unknown\"`: The actual temperature of the air at an unknown height\n- `\"apparentTemperature\"`: The perceived temperature at default height\n- `\"apparentTemperature_2m\"`: The perceived temperature at 2 m above the ground\n- `\"apparentTemperature_unknown\"`: The perceived temperature at an unknown height\n- `\"battery\"`: Voltage of the battery of the station\n- `\"cloudBaseHeight\"`: The altitude of the lowest visible part of a cloud layer above ground level\n- `\"cloudTopHeight\"`: The altitude of the highest part of a cloud layer above ground level\n- `\"dewPoint\"`: The temperature at which air becomes saturated and dew begins to form above the ground at default height\n- `\"dewPoint_2m\"`: The temperature at which air becomes saturated and dew begins to form above the ground at 2 m above the ground\n- `\"dewPoint_unknown\"`: The temperature at which air becomes saturated and dew begins to form above the ground at an unknown height\n- `\"globalRadiation\"`: The total incoming solar radiation (direct and diffuse) received on a horizontal surface\n- `\"globeResistance\"`: The electrical resistance measured by a globe thermometer sensor, related to temperature at default height\n- `\"globeResistance_unknown\"`: The electrical resistance measured by a globe thermometer sensor, related to temperature at an unknown height\n- `\"globeTemperature\"`: The temperature measured by a black globe thermometer representing combined effects of radiation, convection, and conduction at default height\n- `\"globeTemperature_unknown\"`: The temperature measured by a black globe thermometer representing combined effects of radiation, convection, and conduction at an unknown height\n- `\"globeVoltageRatio\"`: The ratio of a globe sensor’s output voltage to its input voltage, used for calibration or measurement conversion at default height\n- `\"globeVoltageRatio_unknown\"`: The ratio of a globe sensor’s output voltage to its input voltage, used for calibration or measurement conversion at an unknown height\n- `\"precipitation\"`: The total amount of water (rain, snow, sleet, etc.) that falls to the ground over a period\n- `\"precipitationDuration\"`: The total time during which measurable precipitation occurs\n- `\"precipitationRate\"`: The intensity of precipitation, typically expressed as depth per hour (e.g., mm/h)\n- `\"pressureTendency\"`: The direction of the change in pressure compared to the previous pressure measurement; a negative number if the pressure decreased, a positive number if the pressure increased; the meaning of the absolute value of this number is provider dependent\n- `\"pressure_msl\"`: The pressure at mean sea level\n- `\"pressure_sfc\"`: The pressure at surface/station level\n- `\"relativeHumidity\"`: The ratio of actual water vapor in the air to the maximum amount it can hold at that temperature at default height\n- `\"relativeHumidity_2m\"`: The ratio of actual water vapor in the air to the maximum amount it can hold at that temperature at 2 m above the ground\n- `\"relativeHumidity_unknown\"`: The ratio of actual water vapor in the air to the maximum amount it can hold at that temperature at an unknown height\n- `\"sensorTemperature\"`: The internal temperature of a sensor device, used for calibration or diagnostics at default height\n- `\"sensorTemperature_unknown\"`: The internal temperature of a sensor device, used for calibration or diagnostics at an unknown height\n- `\"snowDepth\"`: The measured depth of accumulated snow on the ground\n- `\"soilTemperature\"`: The temperature of the soil at default height\n- `\"soilTemperature_10cm\"`: The temperature of the soil at 10 cm below the ground\n- `\"soilTemperature_1m\"`: The temperature of the soil at 1 m below the ground\n- `\"soilTemperature_20cm\"`: The temperature of the soil at 20 cm below the ground\n- `\"soilTemperature_2cm\"`: The temperature of the soil at 2 cm below the ground\n- `\"soilTemperature_2m\"`: The temperature of the soil at 2 m below the ground\n- `\"soilTemperature_50cm\"`: The temperature of the soil at 50 cm below the ground\n- `\"soilTemperature_5cm\"`: The temperature of the soil at 5 cm below the ground\n- `\"soilTemperature_unknown\"`: The temperature of the soil at an unknown height\n- `\"sunshineDuration\"`: The cumulative time period when direct solar radiation exceeds a set threshold\n- `\"surfaceTemperature\"`: The temperature of the ground or surface layer in contact with the atmosphere\n- `\"totalCloudCover\"`: The fraction or percentage of the sky covered by clouds\n- `\"uvIndex\"`: A standardized measure of the strength of ultraviolet radiation from the sun at the surface\n- `\"vaporPressure\"`: The partial pressure exerted by water vapor in the air\n- `\"visibility\"`: The maximum horizontal distance at which objects can be clearly seen\n- `\"waterTemperature\"`: The temperature of a water body such as a river, lake, or ocean at default height\n- `\"waterTemperature_unknown\"`: The temperature of a water body such as a river, lake, or ocean at an unknown height\n- `\"wetbulbTemperature\"`: The lowest temperature that can be reached by evaporative cooling of a water-saturated air parcel at default height\n- `\"wetbulbTemperature_unknown\"`: The lowest temperature that can be reached by evaporative cooling of a water-saturated air parcel at an unknown height\n- `\"windChill\"`: The perceived temperature when factoring in the wind at default height\n- `\"windChill_2m\"`: The perceived temperature when factoring in the wind at 2 m above the ground\n- `\"windChill_unknown\"`: The perceived temperature when factoring in the wind at an unknown height\n- `\"windDirection\"`: The compass direction from which the wind is blowing at default height\n- `\"windDirection_10m\"`: The compass direction from which the wind is blowing at 10 m above the ground\n- `\"windDirection_20m\"`: The compass direction from which the wind is blowing at 20 m above the ground\n- `\"windDirection_2m\"`: The compass direction from which the wind is blowing at 2 m above the ground\n- `\"windDirection_70m\"`: The compass direction from which the wind is blowing at 70 m above the ground\n- `\"windDirection_unknown\"`: The compass direction from which the wind is blowing at an unknown height\n- `\"windGust\"`: The peak wind speed observed over a short time interval at default height\n- `\"windGustDirection\"`: The direction from which the strongest wind gust originates at default height\n- `\"windGustDirection_10m\"`: The direction from which the strongest wind gust originates at 10 m above the ground\n- `\"windGustDirection_2m\"`: The direction from which the strongest wind gust originates at 2 m above the ground\n- `\"windGustDirection_70m\"`: The direction from which the strongest wind gust originates at 70 m above the ground\n- `\"windGustDirection_unknown\"`: The direction from which the strongest wind gust originates at an unknown height\n- `\"windGust_10m\"`: The peak wind speed observed over a short time interval at 10 m above the ground\n- `\"windGust_2m\"`: The peak wind speed observed over a short time interval at 2 m above the ground\n- `\"windGust_70m\"`: The peak wind speed observed over a short time interval at 70 m above the ground\n- `\"windGust_unknown\"`: The peak wind speed observed over a short time interval at an unknown height\n- `\"windSpeed\"`: The average rate of air movement past a given point at default height\n- `\"windSpeed_10m\"`: The average rate of air movement past a given point at 10 m above the ground\n- `\"windSpeed_20m\"`: The average rate of air movement past a given point at 20 m above the ground\n- `\"windSpeed_2m\"`: The average rate of air movement past a given point at 2 m above the ground\n- `\"windSpeed_70m\"`: The average rate of air movement past a given point at 70 m above the ground\n- `\"windSpeed_unknown\"`: The average rate of air movement past a given point at an unknown height\n\n---\n## Important\nThis endpoint returns **meta-data only**, the supplied parameters are only for filtering purposes and don't yield measurement data.","responses":{"200":{"description":"OK","headers":{"MB-Credits-Accounted":{"$ref":"#/components/headers/accounting-header"}},"content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string","description":"The name of this column."},"type":{"type":"string","enum":["date","string","float","boolean","integer"],"description":"The data-type of this column."},"values":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"string","format":"date-time"}},{"type":"array","items":{"type":["number","null"]}},{"type":"array","items":{"type":"integer"}}],"description":"The actual values of interest."}},"required":["column","type","values"]}},"currentPage":{"type":"integer","description":"The page which was queried. (same as page-query-parameter)"},"rows":{"type":"integer","description":"The amount of rows present in each column of this response."},"rowsPerPage":{"type":"integer","description":"The amount of rows per page. (same as limit-query-parameter)"}},"required":["columns","currentPage","rows","rowsPerPage"]},"examples":{"Example Station Values JSON":{"summary":"Example Station Values JSON","description":"Example of station meta-data in json format.","value":{"currentPage":1,"rows":2,"columns":[{"type":"date","column":"created_at","values":[1577836800,1577836800]},{"type":"string","column":"id","values":["the_station_id2","the_station_id1"]},{"type":"string","column":"name","values":["the_station_name2","the_station_name1"]},{"type":"float","column":"lat","values":[47.558399,0.0]},{"type":"float","column":"lon","values":[7.57327,0.0]},{"type":"float","column":"asl","values":[279,null]}],"rowsPerPage":2}}}},"application/geo+json":{"schema":{"type":"object","properties":{"type":{"type":"string","const":"FeatureCollection"},"features":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"Feature"},"geometry":{"type":"object","properties":{"type":{"type":"string","const":"Point"},"coordinates":{"type":"array","items":{"type":["number","null"]},"maxItems":3,"minItems":2,"prefixItems":[{"type":"number","format":"float","maximum":180.0,"minimum":-180.0},{"type":"number","format":"float","maximum":90.0,"minimum":-90.0},{"type":"number","format":"float","maximum":9000.0,"minimum":-500.0}]}},"required":["type","coordinates"]},"properties":{"type":"object"}},"required":["type","geometry","properties"]}}},"required":["type","features"]},"examples":{"Example Station Values GeoJSON":{"summary":"Example Station Values GeoJSON","description":"Example of station meta-data in geojson format.","value":{"features":[{"type":"Feature","geometry":{"coordinates":[7.57327,47.558399,279.0],"type":"Point"},"properties":{"created_at":1577836800,"id":"the_station_id2","name":"the_station_name2"}},{"type":"Feature","geometry":{"coordinates":[0,0,null],"type":"Point"},"properties":{"created_at":1577836800,"id":"the_station_id1","name":"the_station_name1"}}],"type":"FeatureCollection"}}}},"text/csv":{"schema":{"type":"string"},"examples":{"Example Station Values CSV":{"summary":"Example Station Values CSV","description":"Example of station meta-data in csv format.","value":"created_at,id,name,lat,lon,asl\n1577836800,\"the_station_id1\",\"the_station_name1\",47.558399,7.57327,279\n1577836800,\"the_station_id2\",\"the_station_name2\",0,0,"}}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}},"application/x-protobuf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/error-response","description":"Bad Request"},"401":{"$ref":"#/components/responses/error-response","description":"Unauthorized"},"403":{"$ref":"#/components/responses/error-response","description":"Forbidden"},"404":{"$ref":"#/components/responses/error-response","description":"Not Found"},"429":{"$ref":"#/components/responses/error-response","description":"Too Many Requests"},"503":{"$ref":"#/components/responses/error-response","description":"Service Unavailable"}},"x-codeSamples":[{"lang":"JavaScript","source":"fetch(\"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/station/get?limit=10&apikey=YOUR_APIKEY\")\n.then(res => res.json())\n.then(console.log);"},{"lang":"Python","source":"import requests\n\nurl = f\"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/station/get?limit=10&apikey=YOUR_APIKEY\"\nresponse = requests.get(url)\nprint(response.json())"},{"lang":"Shell","source":"curl \"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/station/get?limit=10&apikey=YOUR_APIKEY\""},{"lang":"Java","source":"import java.net.*;\nimport java.io.*;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String url = \"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/station/get?limit=10&apikey=YOUR_APIKEY\";\n        HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n        conn.setRequestMethod(\"GET\");\n\n        try (BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n            String line;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        }\n    }\n}"}]}},"/v2/provider/{provider}/measurement/fields":{"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","examples":["metar","synop"]},"description":"Provider parameter from the providers list.\nFor more information on available providers refer to the `v2/provider/list` endpoint."}],"get":{"tags":["Measurements-API"],"summary":"Available Measurement Fields of a Provider","description":"Use this endpoint to query which **measurement fields** can be requested from the selected provider\n(e.g. temperature, humidity, wind speed).\n- - -\n### Parameter Meta-data\nFor each available measurement parameter, the response includes:\n- **Aggregation method** — (e.g. `mean`, `max`)\n- **Aggregation period** — (e.g. `previous 5 minutes`, `previous 15 minutes`, `daily`)\n- **Data type** — (e.g. `float`, `integer`)\n- **Alias** — (e.g. `airTemperature`, `soilTemperature`) without provider-specific suffixes\n- - -\nThis information helps clients understand **how each field is derived** and ensures\ncorrect data interpretation and processing across different providers.\n","responses":{"200":{"description":"OK","headers":{"MB-Credits-Accounted":{"$ref":"#/components/headers/accounting-header"}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field."},"alias":{"type":["string","null"],"description":"Alias which can be used for this field."},"type":{"type":"string","enum":["date","string","float","boolean","integer"],"description":"The data-type of this column."},"timespan":{"type":["string","null"],"enum":["atTimestamp","prevMinute","prev2Minutes","prev5Minutes","prev10Minutes","prev15Minutes","prevHour","prev3Hours","prev6Hours","prev12Hours","prev24Hours","prevDay","currentDay","sinceLastTimestamp","unknown","toBeSpecified","variable",null],"description":"The timespan over which the aggregation from the provider is applied. Not provided for fields where it doesn't make sense."},"aggregation":{"type":["string","null"],"enum":["none","unknown","mean","max","min","count","total","last","time",null],"description":"The aggregations method the provider uses on the data. Not provided for fields where it doesn't make sense."}},"required":["field","alias","type","timespan","aggregation"]},"uniqueItems":true},"examples":{"Example Measurement Fields":{"summary":"Example Measurement Fields","description":"Example response of station fields.","value":[{"field":"id","type":"string","timespan":null,"alias":null,"aggregation":null},{"field":"timestamp","type":"date","timespan":null,"alias":null,"aggregation":null},{"field":"lat","type":"float","timespan":null,"alias":null,"aggregation":null},{"field":"lon","type":"float","timespan":null,"alias":null,"aggregation":null},{"field":"asl","type":"float","timespan":null,"alias":null,"aggregation":null}]}}}}},"400":{"$ref":"#/components/responses/error-response","description":"Bad Request"},"401":{"$ref":"#/components/responses/error-response","description":"Unauthorized"},"403":{"$ref":"#/components/responses/error-response","description":"Forbidden"},"404":{"$ref":"#/components/responses/error-response","description":"Not Found"},"429":{"$ref":"#/components/responses/error-response","description":"Too Many Requests"}},"x-codeSamples":[{"lang":"JavaScript","source":"fetch(\"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/measurement/fields?apikey=YOUR_APIKEY\")\n.then(res => res.json())\n.then(console.log);"},{"lang":"Python","source":"import requests\n\nurl = f\"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/measurement/fields?apikey=YOUR_APIKEY\"\nresponse = requests.get(url)\nprint(response.json())"},{"lang":"Shell","source":"curl \"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/measurement/fields?apikey=YOUR_APIKEY\""},{"lang":"Java","source":"import java.net.*;\nimport java.io.*;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String url = \"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/measurement/fields?apikey=YOUR_APIKEY\";\n        HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n        conn.setRequestMethod(\"GET\");\n\n        try (BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n            String line;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        }\n    }\n}"}]}},"/v2/provider/{provider}/measurement/get":{"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","examples":["metar","synop"]},"description":"Provider parameter from the providers list.\nFor more information on available providers refer to the `v2/provider/list` endpoint."},{"name":"timeStart","in":"query","schema":{"type":"string","format":"date-time","examples":["2020-04-01T12:15:00"],"pattern":"(?:18|19|20|21)\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:Z)?"},"description":"Lower Bound of the requested time frame, will always come before the end timestamp.\n## Format\n- ISO8601 in `UTC` Timezone.\n- Date format is `yyyy-MM-ddTHH:mm:ss`.\n- Default value current server system time `UTC` 24 hours ago."},{"name":"timeEnd","in":"query","schema":{"type":"string","format":"date-time","examples":["2020-04-01T13:15:00"],"pattern":"(?:18|19|20|21)\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:Z)?"},"description":"Upper Bound of the requested time frame, will always come after the start timestamp.\n## Format\n- ISO8601 in `UTC` Timezone.\n- Date format is `yyyy-MM-ddTHH:mm:ss`.\n- Default value current server system time `UTC`."},{"name":"stations","in":"query","schema":{"type":"array","description":"An array of station identifiers.","items":{"type":"string","description":"A Station Identifier.","minLength":1},"minItems":1,"uniqueItems":true},"description":"One or multiple station id's. Valid id's depend on the selected provider.\nIf not set, all stations of that provider are considered."},{"name":"latLonBox","in":"query","schema":{"type":"array","examples":[[-180,-90,180,90]],"items":{"type":"number","format":"float","maximum":180.0,"minimum":-180.0},"maxItems":4,"minItems":4,"prefixItems":[{"type":"number","format":"float","maximum":180.0,"minimum":-180.0},{"type":"number","format":"float","maximum":90.0,"minimum":-90.0},{"type":"number","format":"float","maximum":180.0,"minimum":-180.0},{"type":"number","format":"float","maximum":90.0,"minimum":-90.0}]},"description":"Four values of latitude and longitude to form a Bounding-Box.\nFor a valid bounding box you need to specify two points, the upper left and lower right in this order:\n- top left : lon1, lat1,\n- lower right: lon2, lat2"},{"name":"fields","in":"query","schema":{"type":"array","items":{"type":"string","examples":[["id","lat","lon","asl"]],"minLength":1,"pattern":"^[a-zA-Z0-9]+$"},"minItems":1,"uniqueItems":true},"description":"The Names of the selected fields. If not set, all fields available from that provider are returned.\nRefer to the 'fields'-endpoint for more information on the available fields, to get a more granular response."},{"name":"latest","in":"query","schema":{"type":"boolean","default":false,"examples":[false]},"description":"Whether to only return the latest entry per station in the given timerange."},{"name":"sort","in":"query","schema":{"type":"string","enum":["asc","desc"],"default":"asc","examples":["asc"]},"description":"Secondary ordering of entries (timestamp). Default value is Ascending order."},{"name":"temperatureUnit","in":"query","schema":{"type":"string","enum":["C","K","F"],"default":"C","examples":["C"]},"description":"The desired unit to return temperature values in."},{"name":"velocityUnit","in":"query","schema":{"type":"string","enum":["km/h","m/s","mph","kn","bft"],"default":"km/h","examples":["km/h"]},"description":"The desired unit to return velocity values in."},{"name":"lengthUnit","in":"query","schema":{"type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"description":"The desired unit to return length values in."},{"name":"energyUnit","in":"query","schema":{"type":"string","enum":["watts","joules"],"default":"watts","examples":["watts"]},"description":"The desired unit to return energy values in."},{"name":"format","in":"query","schema":{"type":"string","enum":["json","csv","xlsx","protobuf"],"default":"json","examples":["json"]},"description":"The output format to return the response in."},{"name":"timeformat","in":"query","schema":{"type":"string","enum":["timestamp_utc","iso8601","YMD"],"default":"timestamp_utc","examples":["timestamp_utc"]},"description":"The format to return time values in."},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"examples":[10],"maximum":100000000,"minimum":1},"description":"Amount of rows per page. Default value is 10."},{"name":"page","in":"query","schema":{"type":"integer","default":1,"examples":[1],"maximum":1000000,"minimum":1},"description":"Page of results to display, starting at 1. Default value is 1."}],"get":{"tags":["Measurements-API"],"summary":"Actual Measurement Data of a Provider","description":"Use this endpoint to fetch **meteorological measurement data** (e.g., temperature, humidity, wind speed).\n\nThe endpoint `v2/provider/{provider}/station/get` gives the available stations.\n\nThe endpoint `v2/provider/{provider}/measurement/fields` can be used to discover which measurement parameters are available.\n\n---\n### When to Use\n- **Dashboards and charts:** Request a time window for selected fields and stations.\n- **Current snapshot:** Use `latest=true` with `fields=` to retrieve the most recent values per station.\n- **Regional slice:** Use `latLonBox=` to query all stations in a geographic area, then refine results using `fields=` and a time range.\n- **Bulk export:** Retrieve large datasets by paging using `limit` and `page`.\n\n---\n\n### Response Semantics\n- **Timestamps:** Controlled via `outputTimeFormat`; sorted using `order`.\n- **Units:** Values may be converted server-side using parameters such as `temperatureUnit`, `velocityUnit`, `lengthUnit`, or `energyUnit`.\nSetting units explicitly is recommended to avoid unexpected conversions.\n\n---\n\n### Granularity and Source Nuances\nProvider behavior may differ:\n- Some return **raw observations** at specific timestamps.\n- Others deliver **aggregated intervals** (e.g. 10-minute, hourly, daily).\n\n---\n\n### Pagination and Performance\n- Use `fields=` to minimize payload size.\n- Begin with moderate time windows (e.g. days rather than months), then page through results.\n- `latest=true` overrides any time range and returns only the most recent records per station and field.\n- - -\n\n### Typical Flows\n**Per-station, time window**\n1. Retrieve station IDs via `provider/{provider}/stations`\n2. Query using:\n`stations=...&timeStart=...&timeEnd=...&fields=...`\n\n**Per-station, latest values**\n1. Retrieve station IDs\n2. Query using:\n`latest=true&stations=...&fields=...`\n\n**Area-based (bounding box)**\nQuery all stations within a region using:\n`latLonBox=...&timeStart=...&timeEnd=...&fields=...`\n- - -\n### Tips\n- Always set **units** and **time format** explicitly.\n- Expect differing **sampling frequencies** between providers; validate timestamps during ingestion.\n- Cache **station meta-data** for faster joins with returned time-series values.","responses":{"200":{"description":"OK","headers":{"MB-Credits-Accounted":{"$ref":"#/components/headers/accounting-header"}},"content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string","description":"The name of this column."},"type":{"type":"string","enum":["date","string","float","boolean","integer"],"description":"The data-type of this column."},"values":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"string","format":"date-time"}},{"type":"array","items":{"type":["number","null"]}},{"type":"array","items":{"type":"integer"}}],"description":"The actual values of interest."}},"required":["column","type","values"]},"minItems":1},"currentPage":{"type":"integer","description":"The page which was queried. (same as page-query-parameter)"},"rows":{"type":"integer","description":"The amount of rows present in each column of this response."},"rowsPerPage":{"type":"integer","description":"The amount of rows per page. (same as limit-query-parameter)"}},"required":["columns","currentPage","rows","rowsPerPage"]},"examples":{"Example Measurement Values JSON":{"summary":"Example Measurement Values JSON","description":"Example of a Measurement Values Response with two stations in json format.","value":{"currentPage":1,"rows":2,"columns":[{"type":"string","column":"id","values":["the_station_id1","the_station_id2"]},{"type":"date","column":"timestamp","values":[1577836800,1577836800]},{"type":"float","column":"lat","values":[47.558399,0.0]},{"type":"float","column":"lon","values":[7.57327,0.0]},{"type":"float","column":"asl","values":[279,null]},{"type":"float","column":"airTemperature_2m","values":[-11.4,-12.1]}],"rowsPerPage":2}}}},"text/csv":{"schema":{"type":"string"},"examples":{"Example Measurement Values CSV":{"summary":"Example Measurement Values CSV","description":"Example of a Measurement Values Response with two stations in csv format.","value":"id,timestamp,lat,lon,asl,airTemperature_2m\n\"the_station_id1\",1577836800,78.25,15.466666,29.0,-11.4\n\"the_station_id2\",1577836800,0,0,nan,-12.1"}}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}},"application/x-protobuf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/error-response","description":"Bad Request"},"401":{"$ref":"#/components/responses/error-response","description":"Unauthorized"},"403":{"$ref":"#/components/responses/error-response","description":"Forbidden"},"404":{"$ref":"#/components/responses/error-response","description":"Not Found"},"429":{"$ref":"#/components/responses/error-response","description":"Too Many Requests"},"503":{"$ref":"#/components/responses/error-response","description":"Service Unavailable"}},"x-codeSamples":[{"lang":"JavaScript","source":"fetch(\"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/measurement/get?limit=10&apikey=YOUR_APIKEY\")\n.then(res => res.json())\n.then(console.log);"},{"lang":"Python","source":"import requests\n\nurl = f\"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/measurement/get?limit=10&apikey=YOUR_APIKEY\"\nresponse = requests.get(url)\nprint(response.json())"},{"lang":"Shell","source":"curl \"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/measurement/get?limit=10&apikey=YOUR_APIKEY\""},{"lang":"Java","source":"import java.net.*;\nimport java.io.*;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String url = \"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/measurement/get?limit=10&apikey=YOUR_APIKEY\";\n        HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n        conn.setRequestMethod(\"GET\");\n\n        try (BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n            String line;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        }\n    }\n}"}]}},"/v2/provider/{provider}/coverage":{"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","examples":["metar","synop"]},"description":"Provider parameter from the providers list.\nFor more information on available providers refer to the `v2/provider/list` endpoint."},{"name":"station","in":"query","required":true,"schema":{"type":"string","description":"A Station Identifier.","minLength":1},"description":"The id of the station to return. Valid id's depend on the selected provider."},{"name":"timeStart","in":"query","schema":{"type":"string","format":"date-time","examples":["2020-04-01T00:00:00"],"pattern":"(?:18|19|20|21)\\d\\d-\\d\\d-01T00:00:00(?:Z)?"},"description":"The start month for the time frame when retrieving relevant stations.\n## Format\n- ISO8601 format in UTC timezone\n- Date format is `yyyy-MM-01T00:00:00` (Always first day of the month at 00:00 UTC)\n- Default value is 1 year ago."},{"name":"timeEnd","in":"query","schema":{"type":"string","format":"date-time","examples":["2020-05-01T00:00:00"],"pattern":"^(?:18|19|20|21)\\d\\d-\\d\\d-01T00:00:00(?:Z)?$"},"description":"The end month for the time frame when retrieving relevant stations\n## Format\n- in ISO8601 in UTC timezone\n- Date format is `yyyy-MM-01T00:00:00` (Always first day of the month at 00:00 UTC)\n- Default value is current server system time `UTC`."}],"get":{"tags":["Measurements-API"],"summary":"Monthly Coverage of Station","description":"Use this endpoint to assess **data availability** for a single station across a **month-based date range**.\nFor every variable this endpoint returns:\n- The percentage of hours which contain at least one non-NaN value per month\n- The total count of non-NaN values per month\n- - -\n### When to Use\n- **Gap analysis and QA:** Identify months with limited sensor uptime or missing values before requesting large time-series datasets.\n- **Planning exports:** Select providers and date ranges with sufficient data coverage for downstream analytics.\n- **UI hints:** Grey-out months or variables with low coverage before the user makes a request.\n- - -\n### Typical Flows\n- **Per-station (month range):**\nRetrieve a station via `v2/provider/{provider}/stations/get` → select station → check coverage.\n\n- **Per-station (single month):**\nUse `monthStart=2025-11-01&monthEnd=2025-11-01`.\n\n- **Compare fields:**\nQuery once, then evaluate percentage values across different fields client-side to select variables with acceptable coverage.\n- - -\n### Important\nCoverage reflects **availability only** — it does **not** imply any additional quality validation\nbeyond the presence of non-NaN values.\n\nSince coverage values are on a **fixed hourly-time-axis**, they might not reflect the exact coverage of the station has.\nAs an example a station with daily resolution can at most cover **only** a 24th of the hours, resulting in a percent coverage of about `0.041`.","responses":{"200":{"description":"OK","headers":{"MB-Credits-Accounted":{"$ref":"#/components/headers/accounting-header"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Id of the station for which this coverage was requested."},"month":{"type":"array","items":{"type":"integer","description":"Month encoded as an integer in the format 'yyyyMM'."},"uniqueItems":true},"coverages":{"type":"array","items":{"type":"object","properties":{"alias":{"type":["string","null"],"description":"Alias which can be used for this field."},"field":{"type":"string","description":"The name of the field."},"percentage":{"type":"array","items":{"type":"number","description":"Percentage of hours covered with at least one (non-nan) value in the specific month for the specified station.","maximum":100.0,"minimum":0.0}},"total_values":{"type":"array","items":{"type":"integer","description":"Total amount of (non-nan) values present in the specific month for the specified station.","minimum":0}}},"required":["alias","field","percentage","total_values"]}}},"required":["id","month","coverages"]},"examples":{"Example Coverage Response":{"summary":"Example Coverage Response","description":"Example of a Coverage Response of a station.","value":{"month":[202101,202102,202103],"coverages":[{"field":"airTemperature_2m","total_values":[0,1,1000],"percentage":[0.0,1.5,100.0],"alias":"airTemperature"},{"field":"dewPoint_2m","total_values":[0,1,1000],"percentage":[0.0,1.5,100.0],"alias":"dewPoint"},{"field":"precipitation","total_values":[0,1,1000],"percentage":[0.0,1.5,100.0],"alias":null},{"field":"relativeHumidity_2m","total_values":[0,1,1000],"percentage":[0.0,1.5,100.0],"alias":"relativeHumidity"},{"field":"relativeHumidity_2m","total_values":[0,1,1000],"percentage":[0.0,1.5,100.0],"alias":"windSpeed"},{"field":"windDirection_10m","total_values":[0,1,1000],"percentage":[0.0,1.5,100.0],"alias":"windDirection"}],"id":"the_station_id"}}}}}},"400":{"$ref":"#/components/responses/error-response","description":"Bad Request"},"401":{"$ref":"#/components/responses/error-response","description":"Unauthorized"},"403":{"$ref":"#/components/responses/error-response","description":"Forbidden"},"404":{"$ref":"#/components/responses/error-response","description":"Not Found"},"429":{"$ref":"#/components/responses/error-response","description":"Too Many Requests"},"503":{"$ref":"#/components/responses/error-response","description":"Service Unavailable"}},"x-codeSamples":[{"lang":"JavaScript","source":"fetch(\"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/coverage?timeStart=2020-01-01&timeEnd=2020-02-01&station=04351&apikey=YOUR_APIKEY\")\n.then(res => res.json())\n.then(console.log);"},{"lang":"Python","source":"import requests\n\nurl = f\"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/coverage?timeStart=2020-01-01&timeEnd=2020-02-01&station=04351&apikey=YOUR_APIKEY\"\nresponse = requests.get(url)\nprint(response.json())"},{"lang":"Shell","source":"curl \"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/coverage?timeStart=2020-01-01&timeEnd=2020-02-01&station=04351&apikey=YOUR_APIKEY\""},{"lang":"Java","source":"import java.net.*;\nimport java.io.*;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String url = \"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/coverage?timeStart=2020-01-01&timeEnd=2020-02-01&station=04351&apikey=YOUR_APIKEY\";\n        HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n        conn.setRequestMethod(\"GET\");\n\n        try (BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n            String line;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        }\n    }\n}"}]}},"/v2/provider/{provider}/nearest":{"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","examples":["metar","synop"]},"description":"Provider parameter from the providers list.\nFor more information on available providers refer to the `v2/provider/list` endpoint."},{"name":"lat","in":"query","required":true,"schema":{"type":"number","description":"A Latitude value in degrees (WGS 84) between `-90.0` and `90.0`.","examples":[47.5596],"maximum":90.0,"minimum":-90.0},"description":"WGS 84 Standard Latitude for the location of interest."},{"name":"lon","in":"query","required":true,"schema":{"type":"number","description":"A Longitude value in degrees (WGS 84) between `-180.0` and `180.0`.","examples":[7.5886],"maximum":180.0,"minimum":-180.0},"description":"WGS 84 Standard Longitude for the location of interest."},{"name":"asl","in":"query","schema":{"type":"number","default":0.0,"description":"Height above sea level measured in meters.","examples":[0.0],"maximum":9000.0,"minimum":-500.0},"description":"The height above sea level for the location of interest."},{"name":"maxHeightDiff","in":"query","schema":{"type":"number","format":"float","maximum":1000.0,"minimum":1.0},"description":"Maximum height difference in meters between the station returned and the point given in the query.\nStations with unknown height are omitted, when this optional parameter is set."},{"name":"maxDistance","in":"query","schema":{"type":"number","format":"float","default":100.0,"examples":[100.0],"maximum":10000.0,"minimum":1.0},"description":"Maximum distance in kilometers between point of interest and station."},{"name":"nNeighbors","in":"query","schema":{"type":"integer","default":5,"examples":[5],"maximum":100,"minimum":1},"description":"Maximum number of stations to return."}],"get":{"tags":["Measurements-API"],"summary":"Nearest Stations of a Provider","description":"Use this endpoint to find the **closest stations** belonging to a specific provider near a given geographic point.\nIt returns the nearest stations ordered by distance, including their **coordinates**, **elevation**, and **approximate distance** from the query location.\n- - -\n### When to Use\n- **Station discovery:** Identify which stations are closest to a location before querying measurements.\n- **Provider-specific lookup:** Each provider has its own spatial coverage; this endpoint reveals which stations are available nearby.\n- - -\n### Typical Flows\n- **Find nearest station:**\nCall with `lat` and `lon` to return the nearest stations for a provider.\n\n- **Altitude-aware search:**\nAdd `asl` and `maxHeightDifference` to prioritize stations at similar elevation.\n\n- **Radius-limited search:**\nUse `maxDistance` to restrict the search radius and `nNeighbors` to control the number of stations returned.\n- - -\n### Important\n- Results are always **sorted by distance**, ascending from the query point.\n- Querying near longitudes of `-180` / `180` will not wrap around\n- **Network density** and station spacing vary between providers.\n- For stations which got relocated over time the latest coordinates are used.","responses":{"200":{"description":"OK","headers":{"MB-Credits-Accounted":{"$ref":"#/components/headers/accounting-header"}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","description":"The provider the station belongs to."},"id":{"type":"string","description":"The id this provider uses for the station."},"name":{"type":"string","description":"The name the provider uses for the station."},"lat":{"type":"number","description":"Latitude of the station.","maximum":90.0,"minimum":-90.0},"lon":{"type":"number","description":"Longitude of the station.","maximum":180.0,"minimum":-180.0},"asl":{"type":["number","null"],"description":"Meters above Sea-Level of the station."},"distanceKm":{"type":"number","description":"Kilometer distance from the point of interest to the station."}},"required":["provider","id","name","lat","lon","asl","distanceKm"]},"uniqueItems":true},"examples":{"Example Nearest for Provider":{"summary":"Example Nearest for Provider","description":"Example of a Nearest Response for a specific provider with two stations.","value":[{"id":"the_station_id1","lat":47.558399,"name":"the_station_name1","provider":"the_station_provider1","asl":279,"distanceKm":0,"lon":7.57327},{"id":"the_station_id2","lat":0,"name":"the_station_name2","provider":"the_station_provider1","asl":null,"distanceKm":5320.3,"lon":0}]}}}}},"400":{"$ref":"#/components/responses/error-response","description":"Bad Request"},"401":{"$ref":"#/components/responses/error-response","description":"Unauthorized"},"403":{"$ref":"#/components/responses/error-response","description":"Forbidden"},"404":{"$ref":"#/components/responses/error-response","description":"Not Found"},"429":{"$ref":"#/components/responses/error-response","description":"Too Many Requests"},"503":{"$ref":"#/components/responses/error-response","description":"Service Unavailable"}},"x-codeSamples":[{"lang":"JavaScript","source":"fetch(\"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/nearest?lat=47&lon=8&apikey=YOUR_APIKEY\")\n.then(res => res.json())\n.then(console.log);"},{"lang":"Python","source":"import requests\n\nurl = f\"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/nearest?lat=47&lon=8&apikey=YOUR_APIKEY\"\nresponse = requests.get(url)\nprint(response.json())"},{"lang":"Shell","source":"curl \"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/nearest?lat=47&lon=8&apikey=YOUR_APIKEY\""},{"lang":"Java","source":"import java.net.*;\nimport java.io.*;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String url = \"https://measurements-api.meteoblue.com/v2/provider/dwdClimateHourly/nearest?lat=47&lon=8&apikey=YOUR_APIKEY\";\n        HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n        conn.setRequestMethod(\"GET\");\n\n        try (BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n            String line;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        }\n    }\n}"}]}},"/v2/provider/nearest":{"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","description":"A Latitude value in degrees (WGS 84) between `-90.0` and `90.0`.","examples":[47.5596],"maximum":90.0,"minimum":-90.0},"description":"WGS 84 Standard Latitude for the location of interest."},{"name":"lon","in":"query","required":true,"schema":{"type":"number","description":"A Longitude value in degrees (WGS 84) between `-180.0` and `180.0`.","examples":[7.5886],"maximum":180.0,"minimum":-180.0},"description":"WGS 84 Standard Longitude for the location of interest."},{"name":"asl","in":"query","schema":{"type":"number","default":0.0,"description":"Height above sea level measured in meters.","examples":[0.0],"maximum":9000.0,"minimum":-500.0},"description":"The height above sea level for the location of interest."},{"name":"maxHeightDiff","in":"query","schema":{"type":"number","format":"float","maximum":1000.0,"minimum":1.0},"description":"Maximum height difference in meters between the station returned and the point given in the query.\nStations with unknown height are omitted, when this optional parameter is set."},{"name":"maxDistance","in":"query","schema":{"type":"number","format":"float","default":100.0,"examples":[100.0],"maximum":10000.0,"minimum":1.0},"description":"Maximum distance in kilometers between point of interest and station."},{"name":"nNeighbors","in":"query","schema":{"type":"integer","default":5,"examples":[5],"maximum":100,"minimum":1},"description":"Maximum number of stations to return."}],"get":{"tags":["Measurements-API"],"summary":"Nearest Stations of All Providers","description":"Use this endpoint to find the **closest stations from all integrated providers** available\nfor your API key within a given geographic point and radius. It returns stations ordered by distance,\nincluding the **provider name**, **station ID**, **coordinates**, **elevation**, and **distance** from the query location.\n- - -\n### When to Use\n- **Cross-provider discovery:**\nWhen you are unsure which provider has coverage in a region, use this endpoint to identify nearby stations across all networks.\n- **Pre-fetch step:**\nSelect candidate stations before querying provider-specific station or measurement endpoints.\n- - -\n### Typical Flows\n- **Quick nearest:**\nCall with `lat` and `lon` to list the nearest stations across providers.\n\n- **Altitude-aware:**\nAdd `asl` and `maxHeightDifference` to favor stations at similar elevation.\n\n- **Tight scope:**\nUse `maxDistance` to define a geographic limit and `nNeighbors` to control how many stations are returned.\n- - -\n### Important\n- Results are **sorted by distance** from the query point in ascending order\n(horizontal distance only if `asl` is omitted).\n- **Provider networks** differ in spatial density — sparsely monitored regions may return only distant stations.\n- Use the returned **provider ID** and **station ID** to request metadata or measurements from provider-specific endpoints.","responses":{"200":{"description":"OK","headers":{"MB-Credits-Accounted":{"$ref":"#/components/headers/accounting-header"}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","description":"The provider the station belongs to."},"id":{"type":"string","description":"The id this provider uses for the station."},"name":{"type":"string","description":"The name the provider uses for the station."},"lat":{"type":"number","description":"Latitude of the station.","maximum":90.0,"minimum":-90.0},"lon":{"type":"number","description":"Longitude of the station.","maximum":180.0,"minimum":-180.0},"asl":{"type":["number","null"],"description":"Meters above Sea-Level of the station."},"distanceKm":{"type":"number","description":"Kilometer distance from the point of interest to the station."}},"required":["provider","id","name","lat","lon","asl","distanceKm"]},"uniqueItems":true},"examples":{"Example Nearest":{"summary":"Example Nearest","description":"Example of a Nearest Request with two stations.","value":[{"id":"the_station_id1","lat":47.558399,"name":"the_station_name1","provider":"the_station_provider1","asl":279,"distanceKm":0,"lon":7.57327},{"id":"the_station_id2","lat":0,"name":"the_station_name2","provider":"the_station_provider2","asl":null,"distanceKm":5320.3,"lon":0}]}}}}},"400":{"$ref":"#/components/responses/error-response","description":"Bad Request"},"401":{"$ref":"#/components/responses/error-response","description":"Unauthorized"},"403":{"$ref":"#/components/responses/error-response","description":"Forbidden"},"429":{"$ref":"#/components/responses/error-response","description":"Too Many Requests"},"503":{"$ref":"#/components/responses/error-response","description":"Service Unavailable"}},"x-codeSamples":[{"lang":"JavaScript","source":"fetch(\"https://measurements-api.meteoblue.com/v2/provider/nearest?lat=47&lon=8&apikey=YOUR_APIKEY\")\n.then(res => res.json())\n.then(console.log);"},{"lang":"Python","source":"import requests\n\nurl = f\"https://measurements-api.meteoblue.com/v2/provider/nearest?lat=47&lon=8&apikey=YOUR_APIKEY\"\nresponse = requests.get(url)\nprint(response.json())"},{"lang":"Shell","source":"curl \"https://measurements-api.meteoblue.com/v2/provider/nearest?lat=47&lon=8&apikey=YOUR_APIKEY\""},{"lang":"Java","source":"import java.net.*;\nimport java.io.*;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String url = \"https://measurements-api.meteoblue.com/v2/provider/nearest?lat=47&lon=8&apikey=YOUR_APIKEY\";\n        HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n        conn.setRequestMethod(\"GET\");\n\n        try (BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n            String line;\n            while ((line = in.readLine()) != null) {\n                System.out.println(line);\n            }\n        }\n    }\n}"}]}}},"components":{"responses":{"error-response":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean","const":true,"description":"Flag indicating that an error has occurred."},"error_message":{"type":"string","description":"Message describing the error."}},"required":["error","error_message"]},"examples":{"Error Message Example":{"summary":"Example Error","description":"Example of a possible error message","value":{"error":true,"error_message":"Message describing the error."}}}}}}},"headers":{"accounting-header":{"schema":{"type":"integer","examples":[0],"minimum":0},"description":"The total number of credits which were accounted from the user of the apikey for the made request."}},"securitySchemes":{"apikey":{"description":"A meteoblue API access key","type":"apiKey","name":"apikey","in":"query"}}}}