### Meteosource API Example Request Source: https://www.meteosource.com/documentation/index_do=changeLocale This is an example of how to make a request to the Meteosource API for weather data. It demonstrates the basic structure of a GET request, including essential parameters like place_id, sections, timezone, language, units, and the API key. Ensure you replace 'YOUR-API-KEY' with your actual key. ```HTTP https://www.meteosource.com/api/v1/free/point?place_id=london§ions=all&timezone=UTC&language=en&units=metric&key=YOUR-API-KEY ``` -------------------------------- ### Example API Request using place_id Source: https://www.meteosource.com/documentation/index_do=changeLocale This example demonstrates how to make an API request to the Meteosource API for air quality data by specifying a 'place_id'. The 'key' parameter is essential for authentication. Ensure you replace 'YOUR-API-KEY' with your actual API key. ```http https://www.meteosource.com/api/v1/flexi/air_quality?place_id=london&key=YOUR-API-KEY ``` -------------------------------- ### Air Quality API Request Example Source: https://www.meteosource.com/documentation/index This section provides an example of how to make an API request to retrieve air quality data, demonstrating the use of the 'place_id' parameter. ```APIDOC ## GET /api/v1/flexi/air_quality ### Description Retrieves air quality data for a specified location. ### Method GET ### Endpoint /api/v1/flexi/air_quality ### Parameters #### Query Parameters - **place_id** (string) - Required - Identifier of a place. To obtain the `place_id` for the location you want, please use endpoints `/find_places_prefix` (search by prefix) or `/find_places` (search by full name). - **lat** (string) - Required - Latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.4 - **lon** (string) - Required - Longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.4 - **timezone** (string) - Optional - Timezone to be used for the date fields. If not specified, local timezone of the forecast location will be used. The format is according to the tzinfo database, so values like `Europe/Prague` or `UTC` can be used. Alternatively you may use the value `auto` in which case the local timezone of the location is used. The full list of valid timezone strings can be found here. ### Request Example ``` https://www.meteosource.com/api/v1/flexi/air_quality?place_id=london&key=YOUR-API-KEY ``` ### Response #### Success Response (200) - **data** (object) - Contains the weather data for the requested location. - **Expires** (string) - The point at which the API response will not change for the same request. #### Response Example { "data": {}, "Expires": "2023-10-27T10:00:00Z" } ``` -------------------------------- ### Find Places by Prefix API Request Example Source: https://www.meteosource.com/documentation/index_do=changeLocale This example demonstrates how to make an API request to the /find_places_prefix endpoint to search for locations. It requires a base URL, the search text, and an API key. The response will contain a list of matching places with their details. ```api https://www.meteosource.com/api/v1/free/find_places_prefix?text=lond&key=YOUR-API-KEY ``` -------------------------------- ### API Request Example: Find Places (HTTP) Source: https://www.meteosource.com/documentation/index_do=changeLocale This example demonstrates how to make an HTTP request to the 'find_places' endpoint to search for a location. It requires a 'text' parameter for the search query and an 'key' for API authentication. The response will be a JSON array of place objects. ```http https://www.meteosource.com/api/v1/free/find_places?text=london&key=YOUR-API-KEY ``` -------------------------------- ### GET /websites/meteosource Source: https://www.meteosource.com/documentation/index_do=changeLocale Retrieves weather data for a specified location. The response includes geographical information and a time series of various atmospheric parameters. ```APIDOC ## GET /websites/meteosource ### Description Retrieves weather data for a specified location. The response includes geographical information and a time series of various atmospheric parameters. ### Method GET ### Endpoint /websites/meteosource ### Parameters #### Query Parameters - **latitude** (string) - Required - The latitude of the location (e.g., "51.50853N"). - **longitude** (string) - Required - The longitude of the location (e.g., "0.12574W"). ### Response #### Success Response (200) - **lat** (string) - Latitude of the location. - **lon** (string) - Longitude of the location. - **elevation** (number) - Elevation of the location in meters. - **timezone** (string) - The IANA timezone name for the location. - **data** (array) - An array of objects, where each object represents a time step with various weather parameters: - **date** (string) - The date and time of the data point in ISO 8601 format. - **aerosol_550** (number) - Total aerosol optical depth at 550 nm. - **air_quality** (integer) - Air quality index (1: Very good, 2: Good, 3: Medium, 4: Poor, 5: Very poor, 6: Extremely poor). - **co_surface** (number) - Carbon monoxide at surface level. - **dust_550nm** (number) - Dust aerosol optical depth at 550 nm. - **dust_mixing_ratio_05** (number) - Dust aerosol (0.55 - 0.9 µm) mixing ratio. - **no2_surface** (number) - Nitrogen dioxide at surface level. - **no_surface** (number) - Nitrogen monoxide at surface level. - **ozone_surface** (number) - Ozone at surface level. - **ozone_total** (number) - Total column ozone. - **pm10** (number) - Particulate matter with diameter less than 10 µm (PM10). - **pm25** (number) - Particulate matter with diameter less than 2.5 µm (PM2.5). - **so2_surface** (number) - Sulphur dioxide at surface level. #### Response Example ```json { "lat": "51.50853N", "lon": "0.12574W", "elevation": 25, "timezone": "Europe/London", "data": [ { "date": "2025-09-24T10:00:00", "aerosol_550": 0.09, "air_quality": 1, "co_surface": 151.81, "dust_550nm": 0.002, "dust_mixing_ratio_05": 3.8e-12, "no2_surface": 16.21, "no_surface": 3.02, "ozone_surface": 79.4, "ozone_total": 309.75, "pm10": 7.37, "pm25": 5.63, "so2_surface": 5.04 } ] } ``` ``` -------------------------------- ### GET /api/v1/flexi/map Source: https://www.meteosource.com/documentation/index_do=changeLocale Generates weather maps in PNG or PBF format. Supports specifying geographic bounds, variables, datetime, and map layers. ```APIDOC ## GET /api/v1/flexi/map ### Description This endpoint allows you to generate weather maps for a specified region and time. The resulting PNG maps are always in Google Mercator projection (EPSG:3857). ### Method GET ### Endpoint /api/v1/flexi/map ### Parameters #### Query Parameters - **tile_x** (integer) - Optional - The X coordinate of Google Maps tile - **tile_y** (integer) - Optional - The Y coordinate of Google Maps tile - **tile_zoom** (integer) - Optional - The zoom level of Google Maps tile - **min_lat** (string) - Optional - Minimal latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.2 - **min_lon** (string) - Optional - Minimal longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.2 - **max_lat** (string) - Optional - Maximal latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.2. - **max_lon** (string) - Optional - Maximal longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.2 - **variable** (string) - Required - Name of the variable for your map. Available values: `temperature`, `feels_like_temperature`, `clouds`, `precipitation`, `wind_speed`, `wind_gust`, `pressure`, `humidity`, `wave_height`, `wave_period`, `sea_temperature`, `air_quality`, `ozone_surface`, `ozone_total`, `no2`, `pm2.5` - **datetime** (string) - Required - Datetime in `YYYY-MM-DDTHH:MM` format (UTC) or offset from current time (e.g., `+10minutes`, `-2hours`, `+1days`). - **format** (string) - Optional - Output format: `png` or `pbf`. Defaults to `png`. ### Request Example GET https://www.meteosource.com/api/v1/flexi/map?min_lat=31&min_lon=-14&max_lat=67&max_lon=56&variable=precipitation&datetime=+12hours&key=YOUR-API-KEY ### Response #### Success Response (200) - **image_data** (binary) - The binary data of the requested map image. #### Response Example (Binary image data would be returned here) ``` -------------------------------- ### Meteosource API Response Example Source: https://www.meteosource.com/documentation/index_do=changeLocale This JSON object represents a typical response from the Meteosource API. It includes location details, current weather conditions, and hourly/daily forecast data. The structure varies based on subscription level and requested parameters. ```json { "lat": "51.50853N", "lon": "0.12574W", "elevation": 25, "timezone": "UTC", "units": "metric", "current": { "icon": "cloudy", "icon_num": 6, "summary": "Cloudy", "temperature": 12.2, "wind": { "speed": 3.7, "angle": 25, "dir": "NNE" }, "precipitation": { "total": 0, "type": "none" }, "cloud_cover": 83 }, "hourly": { "data": [ { "date": "2025-09-24T09:00:00", "weather": "cloudy", "icon": 6, "summary": "Cloudy", "temperature": 12.2, "wind": { "speed": 3.7, "dir": "NNE", "angle": 25 }, "cloud_cover": { "total": 83 }, "precipitation": { "total": 0, "type": "none" } }, { "date": "2025-09-24T10:00:00", "weather": "cloudy", "icon": 6, "summary": "Cloudy", "temperature": 14, "wind": { "speed": 3.9, "dir": "NE", "angle": 36 }, "cloud_cover": { "total": 84 }, "precipitation": { "total": 0, "type": "none" } } ] }, "daily": { "data": [ { "day": "2025-09-24", "weather": "partly_sunny", "icon": 4, "summary": "Partly sunny. Temperature 10/18 °C.", "all_day": { "weather": "partly_sunny", "icon": 4, "temperature": 12.8, "temperature_min": 9.5, "temperature_max": 18, "wind": { "speed": 3.8, "dir": "NE", "angle": 43 }, "cloud_cover": { "total": 40 }, "precipitation": { "total": 0, "type": "none" } }, "morning": null, "afternoon": null, "evening": null }, { "day": "2025-09-25", "weather": "partly_sunny", "icon": 4, "summary": "Mostly cloudy, fewer clouds in the afternoon and evening. Temperature 10/18 °C, but a feels-like temperature of up to 13 °C. Wind from NE in the afternoon.", "all_day": { "weather": "partly_sunny", "icon": 4, "temperature": 13.2, "temperature_min": 9.5, "temperature_max": 18.2, "wind": { "speed": 4.1, "dir": "NE", "angle": 45 }, "cloud_cover": { "total": 65 }, "precipitation": { "total": 0, "type": "none" } }, "morning": null, "afternoon": null, "evening": null } ] } } ``` -------------------------------- ### GET /websites/meteosource Source: https://www.meteosource.com/documentation/index_do=changeLocale Retrieves hourly weather data for a specific location. The response includes various meteorological parameters such as temperature, wind, cloud cover, pressure, and precipitation. ```APIDOC ## GET /websites/meteosource ### Description Retrieves hourly weather data for a specific location. The response includes various meteorological parameters such as temperature, wind, cloud cover, pressure, and precipitation. ### Method GET ### Endpoint `/websites/meteosource` ### Parameters #### Query Parameters - **location** (string) - Required - The location for which to retrieve weather data. - **date** (string) - Optional - The specific date for the weather data (YYYY-MM-DD). - **hourly** (boolean) - Optional - Whether to include hourly data (defaults to true). ### Request Example ``` GET /websites/meteosource?location=london&date=2021-03-15&hourly=true ``` ### Response #### Success Response (200) - **date** (string) - The date and time of the observation. - **weather** (string) - A general description of the weather condition. - **summary** (string) - A more detailed summary of the weather. - **icon** (integer) - An icon code representing the weather condition. - **temperature** (float) - The air temperature in Celsius. - **feels_like** (float) - The perceived temperature in Celsius. - **wind_chill** (float) - The wind chill temperature in Celsius. - **soil_temperature** (float) - The soil temperature in Celsius. - **dew_point** (float) - The dew point temperature in Celsius. - **surface_temperature** (float) - The surface temperature in Celsius. - **wind** (object) - Wind information: - **speed** (float) - Wind speed in km/h. - **gusts** (float) - Wind gusts speed in km/h. - **angle** (integer) - Wind direction in degrees. - **dir** (string) - Wind direction abbreviation (e.g., NNW). - **cloud_cover** (object) - Cloud cover details: - **total** (integer) - Total cloud cover percentage. - **low** (integer) - Low cloud cover percentage. - **middle** (integer) - Middle cloud cover percentage. - **high** (integer) - High cloud cover percentage. - **pressure** (integer) - Atmospheric pressure in hPa. - **precipitation** (object) - Precipitation details: - **total** (float) - Total precipitation in mm. - **type** (string) - The type of precipitation (e.g., none, rain, snow). - **cape** (integer) - Convective Available Potential in J/kg. - **evaporation** (float) - Evaporation rate in mm. - **irradiance** (float) - Solar irradiance in W/m2. - **ozone** (integer) - Ozone concentration in Dobson Units (DU). - **humidity** (integer) - Relative humidity percentage. #### Response Example ```json { "date": "2021-03-15T16:00:00", "weather": "overcast", "summary": "Overcast", "icon": 7, "temperature": 11.3, "feels_like": 7.7, "wind_chill": 9.4, "soil_temperature": 10.5, "dew_point": 4.4, "surface_temperature": 10.3, "wind": { "speed": 9.8, "gusts": 22.3, "angle": 332, "dir": "NNW" }, "cloud_cover": { "total": 93, "low": 35, "middle": 48, "high": 89 }, "pressure": 1023, "precipitation": { "total": 0, "type": "none" }, "cape": 4, "evaporation": 0.11, "irradiance": 117, "ozone": 367, "humidity": 62 } ``` ``` -------------------------------- ### Fetch Weather Data using Python Source: https://www.meteosource.com/documentation/index_do=changeLocale Retrieves current weather data from the Meteosource API using Python's 'requests' library. It takes an API key and a place ID as input and outputs the current temperature for the specified location. Ensure the 'requests' library is installed. ```python import requests parameters = {'key': 'YOUR_API_KEY', 'place_id': 'london'} url = "https://www.meteosource.com/api/v1/free/point" data = requests.get(url, parameters).json() print('Current temperature in London is {} °C.'.format(data['current']['temperature'])) ``` -------------------------------- ### GET /websites/meteosource Source: https://www.meteosource.com/documentation/index_do=changeLocale Retrieves detailed weather data for a specified location. The response includes current conditions, historical data, and forecast information. ```APIDOC ## GET /websites/meteosource ### Description Retrieves detailed weather data for a specified location. The response includes current conditions, historical data, and forecast information. ### Method GET ### Endpoint /websites/meteosource ### Parameters #### Query Parameters - **lat** (string) - Required - Latitude of the location (e.g., "51.50853N") - **lon** (string) - Required - Longitude of the location (e.g., "0.12574W") - **units** (string) - Optional - Unit system for the data (e.g., "uk", "us", "metric"). Defaults to "uk". ### Request Example ``` GET /websites/meteosource?lat=51.50853N&lon=0.12574W&units=uk ``` ### Response #### Success Response (200) - **lat** (string) - Latitude of the location. - **lon** (string) - Longitude of the location. - **elevation** (number) - Elevation of the location in meters. - **timezone** (string) - Timezone of the location. - **units** (string) - The unit system used for the data. - **data** (array) - An array of weather data objects for different timestamps. - **date** (string) - The date and time of the weather data. - **weather** (string) - A general description of the weather conditions. - **summary** (string) - A more detailed summary of the weather. - **icon** (integer) - An icon code representing the weather. - **temperature** (number) - The air temperature. - **feels_like** (number) - The "feels like" temperature. - **wind_chill** (number) - The wind chill temperature. - **soil_temperature** (number) - The soil temperature. - **dew_point** (number) - The dew point temperature. - **surface_temperature** (number) - The surface temperature. - **wind** (object) - Wind related data. - **speed** (number) - Wind speed. - **gusts** (number) - Wind gusts speed. - **angle** (integer) - Wind angle. - **dir** (string) - Wind direction abbreviation. - **cloud_cover** (object) - Cloud cover details. - **total** (integer) - Total cloud cover percentage. - **low** (integer) - Low cloud cover percentage. - **middle** (integer) - Middle cloud cover percentage. - **high** (integer) - High cloud cover percentage. - **pressure** (integer) - Atmospheric pressure. - **precipitation** (object) - Precipitation details. - **total** (number) - Total precipitation amount. - **type** (string) - Type of precipitation. - **cape** (number) - Convective Available Potential Energy. - **evaporation** (number) - Evaporation amount. - **irradiance** (number) - Solar irradiance. - **ozone** (number) - Ozone concentration. - **humidity** (integer) - Relative humidity percentage. #### Response Example ```json { "lat": "51.50853N", "lon": "0.12574W", "elevation": 25, "timezone": "UTC", "units": "uk", "data": [ { "date": "2021-03-15T00:00:00", "weather": "mostly_cloudy", "summary": "Mostly cloudy", "icon": 5, "temperature": 8.7, "feels_like": 4.7, "wind_chill": 5.5, "soil_temperature": 7.8, "dew_point": 6.1, "surface_temperature": 6.3, "wind": { "speed": 13.9, "gusts": 27.4, "angle": 288, "dir": "WNW" }, "cloud_cover": { "total": 67, "low": 55, "middle": 36, "high": 20 }, "pressure": 1014, "precipitation": { "total": 0, "type": "none" }, "cape": 8, "evaporation": 0, "irradiance": 0, "ozone": 384, "humidity": 83 } ] } ``` ``` -------------------------------- ### Fetch and Display Latest Weather Data (Bash) Source: https://www.meteosource.com/documentation/index This Bash script example demonstrates how to fetch the latest weather data from the Metosource API using `curl`. It prints the JSON response directly to the console. This is useful for command-line integration or simple scripting tasks. ```bash API_KEY="YOUR_API_KEY" LATITUDE=40.7128 LONGITUDE=-74.0060 curl -s "https://api.meteosource.com/v1/(${LATITUDE},${LONGITUDE})?key=${API_KEY}" ``` -------------------------------- ### GET /api/v1/flexi/time_machine Source: https://www.meteosource.com/documentation/index_do=changeLocale Retrieves historical weather data for a specific location and date, going back up to 20 years. Also provides long-term statistics. ```APIDOC ## GET /api/v1/flexi/time_machine ### Description This endpoint provides access to historical weather data for a single location and day, with data available up to 20 years in the past. It also offers long-term statistics for selected weather variables aggregated over 40 years. ### Method GET ### Endpoint /api/v1/flexi/time_machine ### Parameters #### Query Parameters - **place_id** (string) - Required - The ID of the place. Use `/find_places_prefix` or `/find_places` to get place IDs. - **lat** (float) - Required (if `place_id` is not used) - Latitude of the location. - **lon** (float) - Required (if `place_id` is not used) - Longitude of the location. - **date** (string) - Required - The date for which to retrieve data in `YYYY-MM-DD` format. - **timezone** (string) - Optional - The timezone for the date. Defaults to `UTC`. - **units** (string) - Optional - Units for the data. Defaults to `auto`. - **key** (string) - Required - Your API key. ### Request Example GET https://www.meteosource.com/api/v1/flexi/time_machine?place_id=london&date=2021-03-15&timezone=UTC&units=auto&key=YOUR-API-KEY ### Response #### Success Response (200) - **data** (array) - An array of weather data objects for the specified date. - **variable** (string) - The name of the weather variable. - **value** (number) - The value of the weather variable. - **date** (string) - The date of the data. - **time** (string) - The time of the data. #### Response Example { "data": [ { "variable": "temperature", "value": 10.5, "date": "2021-03-15", "time": "12:00:00" } // ... more data points ] } ``` -------------------------------- ### API Response Example: Place Search Results (JSON) Source: https://www.meteosource.com/documentation/index_do=changeLocale This JSON structure represents the response from the 'find_places' endpoint. It's an array where each object details a found location, including its name, place_id, administrative areas, country, geographical coordinates (latitude and longitude), timezone, and type. ```json [ { "name": "London", "place_id": "london", "adm_area1": "England", "adm_area2": "Greater London", "country": "United Kingdom", "lat": "51.50853N", "lon": "0.12574W", "timezone": "Europe/London", "type": "settlement" }, { "name": "London", "place_id": "london-6058560", "adm_area1": "Ontario", "adm_area2": null, "country": "Canada", "lat": "42.98339N", "lon": "81.23304W", "timezone": "America/Toronto", "type": "settlement" }, { "name": "London", "place_id": "london-4298960", "adm_area1": "Kentucky", "adm_area2": "Laurel", "country": "United States of America", "lat": "37.12898N", "lon": "84.08326W", "timezone": "America/New_York", "type": "settlement" }, { "name": "City of London", "place_id": "city-of-london", "adm_area1": "England", "adm_area2": "Greater London", "country": "United Kingdom", "lat": "51.51279N", "lon": "0.09184W", "timezone": "Europe/London", "type": "settlement" }, { "name": "London", "place_id": "london-4517009", "adm_area1": "Ohio", "adm_area2": "Madison", "country": "United States of America", "lat": "39.88645N", "lon": "83.44825W", "timezone": "America/New_York", "type": "settlement" }, { "name": "London", "place_id": "london-5367815", "adm_area1": "California", "adm_area2": "Tulare", "country": "United States of America", "lat": "36.47606N", "lon": "119.44318W", "timezone": "America/Los_Angeles", "type": "settlement" }, { "name": "London Village", "place_id": "london-village", "adm_area1": "Line Islands", "adm_area2": "Kiritimati", "country": "Kiribati", "lat": "1.98487N", "lon": "157.47502W", "timezone": "Pacific/Kiritimati", "type": "settlement" }, { "name": "London", "place_id": "london-4119617", "adm_area1": "Arkansas", "adm_area2": "Pope", "country": "United States of America", "lat": "35.32897N", "lon": "93.25296W", "timezone": "America/Chicago", "type": "settlement" }, { "name": "London", "place_id": "london-4707414", "adm_area1": "Texas", "adm_area2": "Kimble", "country": "United States of America", "lat": "30.67685N", "lon": "99.57645W", "timezone": "America/Chicago", "type": "settlement" }, { "name": "East London", "place_id": "east-london", "adm_area1": "Province of Eastern Cape", "adm_area2": "Buffalo City Metropolitan Municipality", "country": "South Africa", "lat": "33.01529S", "lon": "27.91162E", "timezone": "Africa/Johannesburg", "type": "settlement" } ] ``` -------------------------------- ### Meteosource API Error Response Example Source: https://www.meteosource.com/documentation/index This snippet demonstrates the structure of an error response from the Meteosource API. It typically includes a 'detail' field explaining the nature of the error, such as missing authentication credentials. This helps developers understand and handle API request failures. ```json { "detail":"Neither the \"key\" query parameter nor the X-API-Key header was specified" } ``` -------------------------------- ### Meteosource API JSON Response Example Source: https://www.meteosource.com/documentation/index This JSON structure represents the data returned by the Meteosource API. It includes overall location and unit information, followed by an array of hourly weather data points. Each data point details temperature, wind, cloud cover, and precipitation for a specific hour. ```json { "lat": "51.50853N", "lon": "0.12574W", "elevation": 25, "timezone": "UTC", "units": "uk", "data": [ { "date": "2021-03-15T00:00:00", "weather": "mostly_cloudy", "summary": "Mostly cloudy", "icon": 5, "temperature": 8.7, "feels_like": 4.7, "wind_chill": 5.5, "soil_temperature": 7.8, "dew_point": 6.1, "surface_temperature": 6.3, "wind": { "speed": 13.9, "gusts": 27.4, "angle": 288, "dir": "WNW" }, "cloud_cover": { "total": 67, "low": 55, "middle": 36, "high": 20 }, "pressure": 1014, "precipitation": { "total": 0, "type": "none" }, "cape": 8, "evaporation": 0, "irradiance": 0, "ozone": 384, "humidity": 83 }, { "date": "2021-03-15T01:00:00", "weather": "cloudy", "summary": "Cloudy", "icon": 6, "temperature": 8.5, "feels_like": 4.2, "wind_chill": 5.2, "soil_temperature": 7.9, "dew_point": 6.1, "surface_temperature": 6.6, "wind": { "speed": 14.1, "gusts": 26.8, "angle": 297, "dir": "WNW" }, "cloud_cover": { "total": 85, "low": 58, "middle": 72, "high": 19 }, "pressure": 1015, "precipitation": { "total": 0, "type": "none" }, "cape": 6, "evaporation": 0, "irradiance": 0, "ozone": 383, "humidity": 84 }, { "date": "2021-03-15T02:00:00", "weather": "overcast", "summary": "Overcast", "icon": 7, "temperature": 8.4, "feels_like": 4.1, "wind_chill": 5.2, "soil_temperature": 7.9, "dew_point": 6, "surface_temperature": 6.7, "wind": { "speed": 13.4, "gusts": 26.3, "angle": 304, "dir": "WNW" }, "cloud_cover": { "total": 100, "low": 99, "middle": 68, "high": 18 }, "pressure": 1015, "precipitation": { "total": 0, "type": "none" }, "cape": 12, "evaporation": 0.01, "irradiance": 0, "ozone": 384, "humidity": 84 }, { "date": "2021-03-15T03:00:00", "weather": "overcast", "summary": "Overcast", "icon": 7, "temperature": 8.4, "feels_like": 4.2, "wind_chill": 5.3, "soil_temperature": 7.8, "dew_point": 5.6, "surface_temperature": 6.7, "wind": { "speed": 12.9, "gusts": 26.1, "angle": 308, "dir": "NW" }, "cloud_cover": { "total": 98, "low": 95, "middle": 60, "high": 5 }, "pressure": 1015, "precipitation": { "total": 0, "type": "none" }, "cape": 12, "evaporation": 0.01, "irradiance": 0, "ozone": 384, "humidity": 82 }, { "date": "2021-03-15T04:00:00", "weather": "mostly_cloudy", "summary": "Mostly cloudy", "icon": 5, "temperature": 8, "feels_like": 4.1, "wind_chill": 4.7, "soil_temperature": 7.6, "dew_point": 5.4, "surface_temperature": 6.3, "wind": { "speed": 13.1, "gusts": 24.9, "angle": 313, "dir": "NW" }, "cloud_cover": { "total": 67, "low": 43, "middle": 47, "high": 2 }, "pressure": 1015, "precipitation": { "total": 0, "type": "none" }, "cape": 8, "evaporation": 0.01, "irradiance": 0, "ozone": 384, "humidity": 83 }, { "date": "2021-03-15T05:00:00", "weather": "partly_sunny", "summary": "Partly sunny", "icon": 3, "temperature": 8, "feels_like": 4.1, "wind_chill": 4.7, "soil_temperature": 7.6, "dew_point": 5.4, "surface_temperature": 6.3, "wind": { "speed": 13.1, "gusts": 24.9, "angle": 313, "dir": "NW" }, "cloud_cover": { "total": 67, "low": 43, "middle": 47, "high": 2 }, "pressure": 1015, "precipitation": { "total": 0, "type": "none" }, "cape": 8, "evaporation": 0.01, "irradiance": 0, "ozone": 384, "humidity": 83 } ] } ``` -------------------------------- ### GET /api/v1/flexi/time_machine Source: https://www.meteosource.com/documentation/index Retrieves historical weather data for a specific location and date, up to 20 years in the past. ```APIDOC ## GET /api/v1/flexi/time_machine ### Description Retrieves historical weather data for a single location on a specific past date. Supports up to 20 years of historical data and long-term statistics. ### Method GET ### Endpoint /api/v1/flexi/time_machine ### Parameters #### Query Parameters - **place_id** (string) - Required - The ID of the place. Use `/find_places_prefix` or `/find_places` endpoints to obtain `place_id`. - **lat** (number) - Required (if `place_id` is not used) - Latitude of the location. - **lon** (number) - Required (if `place_id` is not used) - Longitude of the location. - **date** (string) - Required - The date for which to retrieve data in `YYYY-MM-DD` format. - **timezone** (string) - Optional - The timezone for the date. Defaults to `UTC`. - **units** (string) - Optional - Units for the weather data. Defaults to `auto`. - **key** (string) - Required - Your API key. ### Request Example ``` https://www.meteosource.com/api/v1/flexi/time_machine?place_id=london&date=2021-03-15&timezone=UTC&units=auto&key=YOUR-API-KEY ``` ### Response #### Success Response (200) - **weather_data** (array) - An array of daily weather data objects. - **date** (string) - The date of the data. - **temperature** (object) - Temperature details. - **max** (number) - Maximum temperature. - **min** (number) - Minimum temperature. - **avg** (number) - Average temperature. - ... (other weather variables like precipitation, wind, humidity, etc.) #### Response Example ```json { "weather_data": [ { "date": "2021-03-15", "temperature": { "max": 15, "min": 5, "avg": 10 }, "precipitation": { "total": 2.5, "probability": 0.7 } // ... other variables } ] } ``` ``` -------------------------------- ### GET /nearest_place Source: https://www.meteosource.com/documentation/index_do=changeLocale Searches for the nearest place to given geographical coordinates. Be aware that for remote locations, the nearest place might be far away. ```APIDOC ## GET /nearest_place ### Description Finds the nearest place from given coordinates. If coordinates are in a secluded area (e.g., middle of the ocean), the nearest place found might be very far from the provided coordinates. ### Method GET ### Endpoint `/api/v1/free/nearest_place` ### Parameters #### Query Parameters - **lat** (string) - Required - Latitude in various formats (e.g., '12N', '12.3N', '12.3', '13S', '13.2S', '-13.4'). - **lon** (string) - Required - Longitude in various formats (e.g., '12E', '12.3E', '12.3', '13W', '13.2W', '-13.4'). - **language** (string) - Optional - The language for text summaries and place names. Available options: 'en', 'es', 'fr', 'de', 'pl', 'pt', 'cs'. Defaults to 'en'. - **key** (string) - Required - Your API key. ### Request Example ``` https://www.meteosource.com/api/v1/free/nearest_place?lat=51.5&lon=0&key=YOUR-API-KEY ``` ### Response #### Success Response (200) - **name** (string) - The name of the found place. - **place_id** (string) - A unique identifier for the place. - **adm_area1** (string) - The first administrative area (e.g., state, province). - **adm_area2** (string | null) - The second administrative area (e.g., county, district). - **country** (string) - The name of the country. - **lat** (string) - The latitude of the place. - **lon** (string) - The longitude of the place. - **timezone** (string) - The IANA timezone identifier for the place. - **type** (string) - The type of the place (e.g., 'settlement'). #### Response Example ```json { "name": "Blackwall and Cubitt Town", "place_id": "blackwall-and-cubitt-town-12048286", "adm_area1": "England", "adm_area2": "Greater London", "country": "United Kingdom", "lat": "51.50004N", "lon": "0.00656W", "timezone": "Europe/London", "type": "settlement" } ``` ```