Free Weather API

Weather API

You can easily integrate weather forecast into your personal and commercial website and application by using our free weather API.

Our weather API provides you with 5 day weather forecast. It is available in JSON format and easily accessible through a simple API request over a secure HTTPS connection.

Free Sign up!

Weather API Request

The base URL for our weather API is

Request Parameters

All the API request parameters are required.

api_keyYour assigned API key.
latLatitude of the location for which you would like to retrieve the weather forecast.
lonLongitude of the location for which you would like to retrieve the weather forecast.

You can find the latitude and longitude of any location here.

To retrieve the weather forecast for New York:

Get your FREE weather API key now!

Sample PHP snippet on how to use our weather API

Weather API Response

errorError code. Value greater than zero indicates an error. See list below.
error_messageShort decription of the error. See list below.
forecastArray of weather forecast data.
- dateDate of forecast.
- avg_cAverage temperature in Celsius.
- min_cMinimum temperature in Celsius.
- max_cMaximum temperature in Celsius.
- avg_fAverage temperature in Fahrenheit.
- min_fMinimum temperature in Fahrenheit.
- max_fMaximum temperature in Fahrenheit.
- summaryBrief summay of weather.
- iconIcon for weather.

JSON data returned from our weather API request:

{ "error" : 0, "error_message" : "-", "forecast":[ 
{"date":"2016-11-04", "avg_c":17, "min_c":12, "max_c":22, "avg_f":63, "min_f":54, "max_f":72, "summary":"Light rain", "icon":"wi_color_drizzle.png"},
{"date":"2016-11-05", "avg_c":17, "min_c":15, "max_c":22, "avg_f":63, "min_f":59, "max_f":72, "summary":"Sunny", "icon":"wi_color_sunny.png"},
{"date":"2016-11-06", "avg_c":19, "min_c":13, "max_c":23, "avg_f":66, "min_f":55, "max_f":73, "summary":"Partly cloudy", "icon":"wi_color_partly_cloudy_day.png"},
{"date":"2016-11-07", "avg_c":19, "min_c":14, "max_c":21, "avg_f":66, "min_f":57, "max_f":70, "summary":"Moderate or heavy rain", "icon":"wi_color_rain.png"},
{"date":"2016-11-08", "avg_c":14, "min_c":8, "max_c":17, "avg_f":57, "min_f":46, "max_f":63, "summary":"Light rain", "icon":"wi_color_drizzle.png"} ]}

Sign up for your free developer account!

List of Error Codes & Error Messages

Error CodeDescription
0No error.
100API key not provided.
110Invalid API key.
200Latitude not provided.
210Latitude must be numeric.
220Invalid latitude. Latitude must be between -85 to 85.
300Longitude not provided.
310Longitude must be numeric.
320Invalid longitude. Longitude must be between -180 to 180.
400API limit reached for the month.
500Location not found.
600Weather not available.

Get our free weather API for your website and application!

Our free weather API is highly stable & reliable. See our uptime is verified safe by Google Safe Browsing is verified safe by McAfee SiteAdvisor is verified safe by Norton Safe Web

Go to top of page