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
  • 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
  • Live WeatherGET
  • Weather ForecastGET
  • Bulk Live WeatherPOST
  • User Agent ParserGET
  • Bulk User Agent ParserPOST
  • 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
  • Timezone APIs
  • Zipcode APIs
  • Weather 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

Weather Forecast API

GET

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

format
Format of the Response
locationstring
Location to get weather for. Accepts a city name, place, or full address.
latfloat
Latitude coordinate of the location.
longfloat
Longitude coordinate of the location.
ipstring
IPv4 or IPv6 address to infer the user's location automatically.
forecastDaysstring
Number of days for which the forecast is required, ranging from 1 to 16. Default value: 7. Max value: 16.
startDatestring
Specific date for which to fetch weather data. Must follow YYYY-MM-DD format (e.g., "2025-08-25").
endDatestring
Specific date for which to fetch weather data. Must follow YYYY-MM-DD format (e.g., "2025-08-25").
precisionstring
Forecast granularity. Options: daily (default), hourly, minutely.
timezonestring
The timezone in which results are returned. Defaults to the location's timezone. Any time zone name from the time zone database is supported.
Media Type
JSON
Body

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

Sample Responses

400
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
Provides detailed information about the location.
forecastObjectMandatory
Forecast data object for the requested date range.
forecast[date].dailyObjectOptional
Daily forecast data for the given date.
forecast[date].hourly[]ArrayOptional
Hourly forecast array for the given date.
forecast[date].minutely[]ArrayOptional
Minutely forecast array for the given date.
forecast[date].astronomyObjectMandatory
Astronomy data for the given 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

"forecast[date].daily" object contains the following fields.

FieldTypeRequirementDescription
timestampstringMandatory
ISO 8601 formatted timestamp of the weather observation.
weather_codeintMandatory
Weather condition code.
temperature_2m_maxfloatMandatory
Maximum air temperature at 2 meters.
temperature_2m_minfloatMandatory
Minimum air temperature at 2 meters.
temperature_2m_meanfloatMandatory
Mean air temperature at 2 meters.
apparent_temperature_maxfloatMandatory
Maximum feels-like temperature.
apparent_temperature_minfloatMandatory
Minimum feels-like temperature.
apparent_temperature_meanfloatMandatory
Mean feels-like temperature.
uv_index_maxfloatMandatory
Maximum daily UV Index value, indicating the strength of sunburn-producing ultraviolet radiation at the Earth’s surface for the day.
uv_index_clear_sky_maxfloatMandatory
Maximum UV Index expected for the day assuming clear sky conditions, representing the highest potential intensity of ultraviolet radiation.
rain_sumfloatMandatory
Total rainfall for the day.
showers_sumfloatMandatory
Total showers for the day.
snowfall_sumfloatMandatory
Total snowfall for the day.
precipitation_sumfloatMandatory
Total precipitation for the day.
precipitation_probability_meanintMandatory
Mean probability of precipitation (%) for the day.
wind_speed_10m_maxfloatMandatory
Maximum wind speed at 10 meters.
wind_speed_10m_minfloatMandatory
Minimum wind speed at 10 meters.
wind_speed_10m_meanfloatMandatory
Mean wind speed at 10 meters.
wind_gusts_10m_maxfloatMandatory
Maximum wind gusts at 10 meters.
wind_gusts_10m_minfloatMandatory
Minimum wind gusts at 10 meters.
wind_gusts_10m_meanfloatMandatory
Mean wind gusts at 10 meters.
wind_direction_10m_dominantintMandatory
Dominant wind direction at 10 meters (degrees).
shortwave_radiation_sumfloatMandatory
Total shortwave radiation received.
surface_pressure_meanfloatMandatory
Mean surface pressure.
pressure_msl_meanfloatMandatory
Mean sea-level pressure.
visibility_meanfloatMandatory
Mean visibility distance.
cloud_cover_meanintMandatory
Mean cloud cover (%).
dew_point_2m_maxfloatMandatory
Maximum dew point at 2 meters.
dew_point_2m_minfloatMandatory
Minimum dew point at 2 meters.
dew_point_2m_meanfloatMandatory
Mean dew point at 2 meters.
relative_humidity_2m_maxintMandatory
Maximum relative humidity (%) at 2 meters.
relative_humidity_2m_minintMandatory
Minimum relative humidity (%) at 2 meters.
relative_humidity_2m_meanintMandatory
Mean relative humidity (%) at 2 meters.
et0_fao_evapotranspiration_sumfloatMandatory
ET₀ Reference Evapotranspiration of a well-watered grass field.

"forecast[date].hourly" array objects have the following fields.

FieldTypeRequirementDescription
timestampstringMandatory
ISO 8601 formatted timestamp of the weather observation.
temperature_2mfloatMandatory
Air temperature at 2 meters.
relative_humidity_2mintMandatory
Relative humidity at 2 meters (%).
dew_point_2mfloatMandatory
Dew point at 2 meters.
apparent_temperaturefloatMandatory
Feels-like temperature.
precipitationfloatMandatory
Total precipitation at this time.
precipitation_probabilityintMandatory
Probability of precipitation (%).
rainfloatMandatory
Rainfall at this hour.
showersfloatMandatory
Showers at this hour.
snowfallfloatMandatory
Snowfall at this hour.
weather_codeintMandatory
Weather condition code.
pressure_mslfloatMandatory
Sea-level pressure.
surface_pressurefloatMandatory
Surface pressure.
cloud_coverintMandatory
Cloud cover (%).
visibilityfloatMandatory
Visibility distance.
et0_fao_evapotranspirationfloatMandatory
Evapotranspiration (ET₀).
wind_speed_10mfloatMandatory
Wind speed at 10 meters.
wind_direction_10mintMandatory
Wind direction at 10 meters (degrees).
wind_gusts_10mfloatMandatory
Wind gusts at 10 meters.
uv_indexfloatMandatory
UV index.
uv_index_clear_skyfloatMandatory
UV index under clear-sky conditions.
shortwave_radiationfloatMandatory
Shortwave radiation.
direct_radiationfloatMandatory
Direct solar radiation.
diffuse_radiationfloatMandatory
Diffuse solar radiation.
direct_normal_irradiancefloatMandatory
Direct normal irradiance (DNI).
global_tilted_irradiancefloatMandatory
Global tilted irradiance (GTI).

"forecast[date].minutely" array objects have the following fields.

FieldTypeRequirementDescription
timestampstringMandatory
ISO 8601 formatted timestamp of the weather observation.
temperature_2mfloatMandatory
Air temperature at 2 meters.
relative_humidity_2mintMandatory
Relative humidity at 2 meters (%).
dew_point_2mfloatMandatory
Dew point at 2 meters.
apparent_temperaturefloatMandatory
Feels-like temperature.
precipitationfloatMandatory
Precipitation at this minute.
rainfloatMandatory
Rainfall at this minute.
snowfallfloatMandatory
Snowfall at this minute.
weather_codeintMandatory
Weather condition code.
wind_speed_10mfloatMandatory
Wind speed at 10 meters.
wind_direction_10mintMandatory
Wind direction at 10 meters (degrees).
wind_gusts_10mfloatMandatory
Wind gusts at 10 meters.
visibilityfloatMandatory
Visibility distance.
shortwave_radiationfloatMandatory
Shortwave radiation.
direct_radiationfloatMandatory
Direct solar radiation.
diffuse_radiationfloatMandatory
Diffuse solar radiation.
direct_normal_irradiancefloatMandatory
Direct normal irradiance (DNI).
global_tilted_irradiancefloatMandatory
Global tilted irradiance (GTI).

"forecast[date].astronomy" object contains the following fields.

FieldTypeRequirementDescription
datestringMandatory
Calendar date of astronomical data (YYYY-MM-DD).
mid_nightstringMandatory
Time of true midnight (HH:MM).
night_endstringMandatory
Time when astronomical twilight ends, marking dawn beginning (HH:MM).
sunrisestringMandatory
Time when Sun becomes visible above horizon (HH:MM).
solar_noonstringMandatory
Time when Sun reaches highest point in sky (HH:MM).
sunsetstringMandatory
Time when Sun disappears below horizon (HH:MM).
night_beginstringMandatory
Time when astronomical twilight begins, marking night start (HH:MM).
day_lengthstringMandatory
Total daylight duration (HH:MM).
sun_statusstringMandatory
Current Sun position ("above_horizon","below_horizon", or "-").
moon_phasestringMandatory
Current Moon phase ("NEW_MOON","WAXING_CRESCENT","FULL_MOON", etc.).
moonrisestringMandatory
Time when Moon becomes visible above horizon (HH:MM).
moonsetstringMandatory
Time when Moon disappears below horizon (HH:MM).
moon_statusstringMandatory
Current Moon visibility ("visible","not_visible", or "-").