Loading
https://api.apifreaks.com/v1.0/weather/current
$ pip install requests
Click Test it to start the request and see the response here!
| Field | Type | Requirement | Description |
|---|---|---|---|
| location | Object | Mandatory | Location information including coordinates, timezone, and geographic details. |
| current | Object | Mandatory | Current weather conditions including temperature, precipitation, wind, and air quality. |
"location" (when coordinates Provided) object contains the following fields
| Field | Type | Requirement | Description |
|---|---|---|---|
| latitude | float | Mandatory | Geographic latitude coordinate in decimal degrees, ranging from -90 (South Pole) to +90 (North Pole). |
| longitude | float | Mandatory | Geographic longitude coordinate in decimal degrees, ranging from -180 (West) to +180 (East). |
| country_name | string | Mandatory | Full name of the country corresponding to the provided coordinates. |
| state_prov | string | Mandatory | State, province, or primary administrative division name for the location. |
| city | string | Mandatory | City or municipal area name associated with the coordinate location. |
| locality | string | Optional | Specific locality, neighborhood, district, or village name within the broader area. |
| elevation | float | Optional | Height above mean sea level in meters for the specified coordinates. |
| timezone | string | Mandatory | IANA timezone database identifier for the location (e.g., America/New_York, Europe/London). |
| timezone_abbreviation | string | Mandatory | Abbreviated timezone representation based on current offset (e.g., EST, GMT, PST). |
"location" (when IP Provided) object contains the following fields
| Field | Type | Requirement | Description |
|---|---|---|---|
| continent_code | string | Mandatory | Two-letter continent code (e.g., NA for North America, EU for Europe, AS for Asia). |
| continent_name | string | Mandatory | Full name of the continent where the IP address is registered. |
| country_code2 | string | Mandatory | ISO 3166-1 alpha-2 two-letter country code (e.g., US, GB, FR). |
| country_code3 | string | Mandatory | ISO 3166-1 alpha-3 three-letter country code (e.g., USA, GBR, FRA). |
| country_name | string | Mandatory | Common name of the country associated with the IP address. |
| country_name_official | string | Mandatory | Official long-form country name as recognized internationally (e.g., United States of America). |
| is_eu | boolean | Optional | Boolean flag indicating whether the country is a member state of the European Union. |
| state_prov | string | Mandatory | State, province, or primary administrative division associated with the IP location. |
| state_code | string | Optional | ISO 3166-2 subdivision code for the state or province (e.g., CA for California). |
| district | string | Optional | District, county, or secondary administrative division within the region. |
| city | string | Mandatory | City or urban area name where the IP address is geographically registered. |
| zipcode | string | Optional | Postal code or ZIP code for the approximate location of the IP address. |
| latitude | float | Mandatory | Geographic latitude in decimal degrees for the IP geolocation, ranging from -90 to +90. |
| longitude | float | Mandatory | Geographic longitude in decimal degrees for the IP geolocation, ranging from -180 to +180. |
| locality | string | Optional | Specific locality, neighborhood, or small area designation within the city. |
| elevation | float | Optional | Elevation above mean sea level in meters for the IP geolocation. |
| timezone | string | Mandatory | IANA timezone database identifier for the IP location (e.g., America/Chicago, Asia/Tokyo). |
| timezone_abbreviation | string | Mandatory | Current timezone abbreviation based on local offset (e.g., CST, JST, UTC). |
"location" (when location Provided) object contains the following fields
| Field | Type | Requirement | Description |
|---|---|---|---|
| location_string | string | Mandatory | Original location query string as submitted, including full address or place name. |
| country_name | string | Mandatory | Resolved country name derived from the geocoded location query. |
| state_prov | string | Mandatory | State, province, or primary administrative division identified from the location. |
| city | string | Mandatory | City or municipal area name extracted from the geocoded location. |
| locality | string | Optional | Specific locality, neighborhood, suburb, or village within the geocoded area. |
| latitude | float | Mandatory | Geocoded latitude coordinate in decimal degrees, ranging from -90 to +90. |
| longitude | float | Mandatory | Geocoded longitude coordinate in decimal degrees, ranging from -180 to +180. |
| elevation | float | Optional | Elevation above mean sea level in meters at the geocoded coordinates. |
| timezone | string | Mandatory | IANA timezone database identifier for the geocoded location (e.g., America/Los_Angeles). |
| timezone_abbreviation | string | Mandatory | Current timezone abbreviation for the location based on local offset (e.g., PDT, CET). |
"current" Object contains the following fields
| Field | Type | Requirement | Description |
|---|---|---|---|
| timestamp | string | Mandatory | ISO 8601 formatted timestamp of the current weather observation. |
| temperature_2m | float | Mandatory | Current air temperature (°C) measured at 2 meters above ground. |
| relative_humidity_2m | float | Mandatory | Current relative humidity percentage at 2 meters above ground. |
| apparent_temperature | float | Mandatory | Current apparent temperature (°C) accounting for wind chill and humidity. |
| snowfall | float | Mandatory | Current snowfall accumulation in centimeters. |
| rain | float | Mandatory | Current rainfall accumulation in millimeters. |
| showers | float | Mandatory | Current shower precipitation in millimeters. |
| precipitation | float | Mandatory | Total precipitation (mm) including rain, showers, and snowfall. |
| weather_code | integer | Mandatory | WMO weather condition code representing current conditions. |
| cloud_cover | float | Mandatory | Current percentage of sky covered by clouds. |
| pressure_msl | float | Mandatory | Current atmospheric pressure (hPa) adjusted to mean sea level. |
| surface_pressure | float | Mandatory | Current atmospheric pressure (hPa) at surface level. |
| wind_speed_10m | float | Mandatory | Current wind speed (km/h) at 10 meters above ground. |
| wind_direction_10m | integer | Mandatory | Current wind direction in degrees at 10 meters above ground. |
| wind_gusts_10m | float | Mandatory | Current wind gust speed (km/h) at 10 meters above ground. |
| astronomy | Object | Mandatory | Astronomical information including sunrise, sunset, and moon phases for the current date. |
| air_quality | Object | Mandatory | Air quality metrics including pollutant concentrations and AQI values. |
"current.astronomy" object contains the following fields
| Field | Type | Requirement | Description |
|---|---|---|---|
| date | string | Mandatory | Calendar date in YYYY-MM-DD format for the astronomical data. |
| mid_night | string | Mandatory | Time of true solar midnight in HH:MM format. |
| night_end | string | Mandatory | Time when astronomical twilight ends and dawn begins in HH:MM format. |
| sunrise | string | Mandatory | Time when the Sun becomes visible above the horizon in HH:MM format. |
| solar_noon | string | Mandatory | Time when the Sun reaches its highest point in the sky in HH:MM format. |
| sunset | string | Mandatory | Time when the Sun disappears below the horizon in HH:MM format. |
| night_begin | string | Mandatory | Time when astronomical twilight begins and night starts in HH:MM format. |
| day_length | string | Mandatory | Total duration of daylight in HH:MM format. |
| sun_status | string | Mandatory | Current position of the Sun relative to the horizon (above_horizon, below_horizon, or -). |
| moon_phase | string | Mandatory | Current lunar phase (NEW_MOON, WAXING_CRESCENT, FULL_MOON, WANING_GIBBOUS, etc.). |
| moonrise | string | Mandatory | Time when the Moon becomes visible above the horizon in HH:MM format. |
| moonset | string | Mandatory | Time when the Moon disappears below the horizon in HH:MM format. |
| moon_status | string | Mandatory | Current visibility status of the Moon (visible, not_visible, or -). |
"current.air_quality" object contains the following fields
| Field | Type | Requirement | Description |
|---|---|---|---|
| timestamp | string | Mandatory | ISO 8601 formatted timestamp (iso8601) |
| european_aqi | integer | Mandatory | Consolidated European Air Quality Index representing the highest value among individual pollutant indices. Ranges: 0-20 (good), 20-40 (fair), 40-60 (moderate), 60-80 (poor), 80-100 (very poor), >100 (extremely poor). |
| us_aqi | integer | Mandatory | Consolidated U.S. Air Quality Index representing the highest value among individual pollutant indices. Ranges: 0-50 (good), 51-100 (moderate), 101-150 (unhealthy for sensitive groups), 151-200 (unhealthy), 201-300 (very unhealthy), 301-500 (hazardous). |
| pm10 | float | Mandatory | Particulate matter with diameter less than 10 micrometers (μg/m³) measured at 10 meters above ground. |
| pm2_5 | float | Mandatory | Particulate matter with diameter less than 2.5 micrometers (μg/m³) measured at 10 meters above ground. |
| carbon_monoxide | float | Mandatory | Atmospheric carbon monoxide gas concentration (μg/m³) at 10 meters above ground. |
| nitrogen_dioxide | float | Mandatory | Atmospheric nitrogen dioxide gas concentration (μg/m³) at 10 meters above ground. |
| sulphur_dioxide | float | Mandatory | Atmospheric sulphur dioxide gas concentration (μg/m³) at 10 meters above ground. |
| ozone | float | Mandatory | Atmospheric ozone gas concentration (μg/m³) at 10 meters above ground. |
| dust | float | Mandatory | Saharan dust particle concentration (μg/m³) at 10 meters above ground. |
| uv_index | float | Mandatory | Ultraviolet radiation intensity index accounting for cloud coverage. |
| aerosol_optical_depth | float | Mandatory | Aerosol optical depth at 550 nm wavelength indicating atmospheric haze levels. |
| uv_index_clear_sky | float | Mandatory | Ultraviolet radiation intensity index assuming cloud-free conditions. |
Reference table for the weather_code field values
| Code | Description |
|---|---|
| 0 | Completely clear sky with no cloud coverage |
| 1, 2, 3 | Varying cloud coverage from mainly clear to partly cloudy and fully overcast conditions |
| 45, 48 | Fog conditions including standard fog and depositing rime fog formation |
| 51, 53, 55 | Drizzle precipitation with varying intensity levels: light, moderate, and dense |
| 56, 57 | Freezing drizzle conditions ranging from light to dense intensity |
| 61, 63, 65 | Rainfall with varying intensity: slight, moderate, and heavy precipitation |
| 66, 67 | Freezing rain events with light and heavy intensity levels |
| 71, 73, 75 | Snowfall precipitation ranging from slight to moderate and heavy intensity |
| 77 | Snow grains (small, white, opaque ice particles) |
| 80, 81, 82 | Rain shower activity with slight, moderate, and violent intensity levels |
| 85, 86 | Snow shower events ranging from slight to heavy intensity |
| 95 | Thunderstorm activity with slight or moderate intensity |
| 96, 99 | Thunderstorm accompanied by hail ranging from slight to heavy |