API Freaks logoAPI Freaks logo
CTRL+K

    APIs

  • Pricing
  • Resources
  • Tools

  • Contact us
CTRL+K
Sign InGet Started For Free
  • Credits Usage APIGET
  • IP Geolocation LookupGET
  • Bulk IP Geolocation LookupPOST
  • Domain WHOIS LookupGET
  • IP WHOIS LookupGET
  • ASN LookupGET
  • Domain WHOIS Historical LookupGET
  • Domain WHOIS Reverse LookupGET
  • Bulk Domain WHOIS LookupPOST
  • DNS LookupGET
  • Historical DNS LookupGET
  • Reverse DNS LookupGET
  • Bulk DNS LookupPOST
  • Email Checker APIPOST
  • SSL Certificate LookupGET
  • SSL Certificate Chain LookupGET
  • Domain AvailabilityGET
  • Domain Availability with SuggestionsGET
  • Bulk Domain AvailabilityPOST
  • Website ScreenshotGET
  • Bulk ScreenshotPOST
  • Latest Exchange RatesGET
  • Historical Exchange RatesGET
  • Currency Converter LatestGET
  • Currency Converter HistoricalGET
  • Currency Time SeriesGET
  • Currency FluctuationGET
  • Geolocalized Currency ConverterGET
  • Currency SupportedGET
  • Currency SymbolsGET
  • Currency Historical Data LimitsGET
  • Live Commodity PricesGET
  • Historical Commodity PricesGET
  • Commodity FluctuationGET
  • Commodity Time SeriesGET
  • Commodity SymbolsGET
  • Timezone LookupGET
  • Timezone ConverterGET
  • Live Weather APIGET
  • Weather Forecast APIGET
  • Historical Weather APIGET
  • Time Series Weather APIGET
  • Air Quality APIGET
  • Marine Weather APIGET
  • Flood Forecast APIGET
  • Bulk Live Weather APIPOST
  • User Agent ParserGET
  • Bulk User Agent ParserPOST
  • GeoDB CountriesGET
  • GeoDB Country DetailsGET
  • GeoDB RegionsGET
  • GeoDB SubregionsGET
  • GeoDB Admin LevelsGET
  • GeoDB Admin UnitsGET
  • GeoDB Admin Units DetailsGET
  • GeoDB CitiesGET
  • Zip Code LookupGET
  • ZIP Code Search CityGET
  • ZIP Code Search RegionGET
  • ZIP Code Search RadiusGET
  • ZIP Code DistancePOST
  • ZIP Code Distance MatchPOST
  • ZIP Code Bulk LookupPOST
  • Astronomy APIGET

Ready to get started?

Sign Up for Free

APIFreaks

API Catalog

  • Geolocation APIs
  • WHOIS APIs
  • DNS APIs
  • Email Validation APIs
  • SSL APIs
  • Domain APIs
  • Screenshot APIs
  • Currency APIs
  • Commodity APIs
  • Zipcode APIs
  • Weather APIs
  • Timezone APIs
  • User Agent APIs
  • Other APIs

Tools Catalog

  • Code Formatters
  • Data & Query Tools
  • Text Tools
  • Email Utilities
  • DNS Tools
  • Viewers
  • Converters
  • PDF Tools

Docs

  • APIs
  • Swagger Docs

Pricing & Accounts

  • Pricing
  • Sign up
  • Sign In

Company

  • About Us
  • Resources
  • Terms
  • Privacy

Copyright © 2025

Made in Pakistan

Historical Weather API

GET

https://api.apifreaks.com/v1.0/weather/historical

format
Format of the Response
datestringrequired
Specific date for which to fetch weather data. Must follow YYYY-MM-DD format (e.g., 2025-08-25).
locationstring
Specifies the target location. It can be a city name, place name, or a complete address (e.g., "Lahore", "Paris, France", "1600 Amphitheatre Parkway, Mountain View, CA").
latfloat
Latitude of the target location. Must be used together with "long".
longfloat
Longitude of the target location. Must be used together with "lat".
ipstring
IPv4 or IPv6 address used to infer location. Defaults to the requester’s public IP if not provided.
precisionstring
Historical precision could be "daily" and "hourly", defaults to "daily".
timezonestring
Specifies the timezone for returned results. Defaults to the resolved location’s timezone.
Media Type
JSON
Body

API Keystringrequired
Your private API key. Get it from API Freaks dashboard.

Sample Responses

400
400
400
400
400
400
LANGUAGE
Python
PHP
Java
Node
Ruby
JavaScript
C#
$ pip install requests
RESPONSE

Click Test it to start the request and see the response here!


API Response

FieldTypeRequirementDescription
locationObjectMandatory
Location object. Can be with coordinates, IP, or location string depending on input.
historicalObjectMandatory
Historical data object of the provided date.
historical.dailyObjectOptional
Daily historical weather data for the provided date.
historical.hourly[]ArrayOptional
An array of objects containing hourly historical weather data for the specified date
historical.astronomyObjectMandatory
object with astronomical data for the specified date.

"location" (when coordinates Provided) object contains the following fields.

FieldTypeRequirementDescription
latitudefloatMandatory
Geographic latitude of the given Coordinates
longitudefloatMandatory
Geographic longitude of the given Coordinates
country_namestringMandatory
Country name by Coordinates
state_provstringMandatory
State or province of given Coordinates
citystringMandatory
City of the given Coordinates
localitystringOptional
Local area, neighborhood, or village name
elevationfloatOptional
Elevation above sea level (meters)
timezonestringMandatory
Timezone identifier (e.g., GMT, PST, etc.)
timezone_abbreviationstringMandatory
Abbreviation of timezone (e.g., GMT, IST, etc.)

"location" (when IP Provided) object contains the following fields.

FieldTypeRequirementDescription
continent_codestringMandatory
Two-letter code of the continent
continent_namestringMandatory
Full name of the continent
country_code2stringMandatory
Two-letter ISO country code
country_code3stringMandatory
Three-letter ISO country code
country_namestringMandatory
Country name of the location
country_name_officialstringMandatory
Official long-form country name
is_eubooleanOptional
Indicates if the country is part of the European Union
state_provstringMandatory
State or province of the location
state_codestringOptional
ISO code for the state or province
districtstringOptional
District or administrative division
citystringMandatory
City of the location
zipcodestringOptional
Postal or ZIP code
latitudefloatMandatory
Geographic latitude of the location
longitudefloatMandatory
Geographic longitude of the location
localitystringOptional
Local area or neighborhood
elevationfloatOptional
Elevation above sea level (meters)
timezonestringMandatory
Timezone identifier
timezone_abbreviationstringMandatory
Abbreviation of timezone

"location" (when location Provided) object contains the following fields.

FieldTypeRequirementDescription
location_stringstringMandatory
Full address or free-text location input
country_namestringMandatory
Country name of the location
state_provstringMandatory
State or province of the location
citystringMandatory
City of the location
localitystringOptional
Local area, neighborhood, or village name
latitudefloatMandatory
Geographic latitude of the location
longitudefloatMandatory
Geographic longitude of the location
elevationfloatOptional
Elevation above sea level (meters)
timezonestringMandatory
Timezone identifier
timezone_abbreviationstringMandatory
Abbreviation of timezone

"historical.daily" object contains the following fields.

FieldTypeRequirementDescription
timestampstringMandatory
ISO 8601 formatted timestamp of the weather observation
weather_codeintegerMandatory
Weather condition code. See documentation for code meanings.
temperature_2m_meanfloatMandatory
Daily mean air temperature at 2 meters above ground
temperature_2m_maxfloatMandatory
Daily maximum air temperature at 2 meters
temperature_2m_minfloatMandatory
Daily minimum air temperature at 2 meters
apparent_temperature_meanfloatMandatory
Daily mean perceived (feels-like) temperature
apparent_temperature_maxfloatMandatory
Daily maximum perceived temperature
apparent_temperature_minfloatMandatory
Daily minimum perceived temperature
precipitation_sumfloatMandatory
Total precipitation (rain + snow + other forms) accumulated over the day
rain_sumfloatMandatory
Total rainfall accumulated over the day
snowfall_sumfloatMandatory
Total snowfall accumulated over the day
wind_speed_10m_maxfloatMandatory
Maximum wind speed at 10 meters during the day
wind_gusts_10m_maxfloatMandatory
Maximum wind gusts at 10 meters during the day
wind_speed_10m_meanfloatMandatory
Daily mean wind speed at 10 meters
wind_speed_10m_minfloatMandatory
Minimum wind speed at 10 meters during the day
wind_gusts_10m_minfloatMandatory
Minimum wind gusts at 10 meters during the day
wind_gusts_10m_meanfloatMandatory
Daily mean wind gusts at 10 meters
wind_direction_10m_dominantintegerMandatory
Dominant wind direction at 10 meters (degrees from north)
shortwave_radiation_sumfloatMandatory
Daily sum of shortwave solar radiation received
et0_fao_evapotranspiration_sumfloatMandatory
Daily sum of reference evapotranspiration
cloud_cover_meanfloatMandatory
Daily mean cloud cover percentage
dew_point_2m_meanfloatMandatory
Daily mean dew point temperature at 2 meters
dew_point_2m_maxfloatMandatory
Daily maximum dew point temperature at 2 meters
dew_point_2m_minfloatMandatory
Daily minimum dew point temperature at 2 meters
relative_humidity_2m_meanfloatMandatory
Daily mean relative humidity at 2 meters
relative_humidity_2m_maxfloatMandatory
Daily maximum relative humidity at 2 meters
relative_humidity_2m_minfloatMandatory
Daily minimum relative humidity at 2 meters
pressure_msl_meanfloatMandatory
Daily mean atmospheric pressure at mean sea level
surface_pressure_meanfloatMandatory
Daily mean surface pressure at ground level

The "historical.hourly" Array contains objects having the following fields.

FieldTypeRequirementDescription
timestampstringMandatory
ISO 8601 formatted timestamp of the weather observation
temperature_2mfloatMandatory
Air temperature at 2 meters above ground
relative_humidity_2mfloatMandatory
Relative humidity at 2 meters
dew_point_2mfloatMandatory
Dew point temperature at 2 meters
apparent_temperaturefloatMandatory
Perceived (feels-like) temperature
precipitationfloatMandatory
Total precipitation (rain + snow + other forms) in this hour
rainfloatMandatory
Rainfall in this hour
snowfallfloatMandatory
Snowfall in this hour
weather_codeintegerMandatory
Weather condition code.
pressure_mslfloatMandatory
Atmospheric pressure at mean sea level
surface_pressurefloatMandatory
Atmospheric pressure at ground level
cloud_coverfloatMandatory
Cloud cover percentage
et0_fao_evapotranspirationfloatMandatory
Hourly reference evapotranspiration
wind_speed_10mfloatMandatory
Wind speed at 10 meters
wind_direction_10mintegerMandatory
Wind direction at 10 meters
wind_gusts_10mfloatMandatory
Wind gusts at 10 meters
albedofloatMandatory
Reflectivity of the Earth's surface (ratio of reflected to incoming radiation)
shortwave_radiationfloatMandatory
Incoming shortwave solar radiation
direct_radiationfloatMandatory
Direct (beam) solar radiation
diffuse_radiationfloatMandatory
Diffuse (scattered) solar radiation
direct_normal_irradiancefloatMandatory
Direct solar irradiance received per unit area on a surface perpendicular to the sun
global_tilted_irradiancefloatMandatory
Total solar irradiance on a tilted surface

"historical.astronomy" object contains the following fields.

FieldTypeRequirementDescription
datestringMandatory
Calendar date of astronomical data (YYYY-MM-DD)
mid_nightstringOptional
Time of true midnight (HH:MM)
night_endstringOptional
Time when astronomical twilight ends, marking dawn beginning (HH:MM)
sunrisestringMandatory
Time when Sun becomes visible above horizon (HH:MM)
solar_noonstringOptional
Time when Sun reaches highest point in the sky (HH:MM)
sunsetstringMandatory
Time when Sun disappears below horizon (HH:MM)
night_beginstringOptional
Time when astronomical twilight begins, marking night start (HH:MM)
day_lengthstringOptional
Total daylight duration (HH:MM)
sun_statusstringOptional
Current Sun position ("above_horizon", "below_horizon", or "-")
moon_phasestringOptional
Current Moon phase (e.g., NEW_MOON, WAXING_CRESCENT, FULL_MOON, etc.)
moonrisestringOptional
Time when Moon becomes visible above horizon (HH:MM)
moonsetstringOptional
Time when Moon disappears below horizon (HH:MM)
moon_statusstringOptional
Current Moon visibility ("visible", "not_visible", or "-")