Introduction

Our global weather data is available in CSV format through our Weather API. Once a user sign up, the user is provided with a web interface to login and start downloading weather data files as per your subscription level. We provide user with API detail to download weather data through any browser or programmatically using languages like PHP, JAVA, .NET, etc.

We provide weather data in Imperial and Metric unit. By default, all data returned is in Imperial unit but you may change this by passing parameter ?unit=f to get data in Metric unit.

You may download data for each station in CSV format or bulk download data for all station as a ZIP file. More information under API section below.

How it works?

  1. Sign up for an account by using your email address.
  2. Verify your account by logging into your email account and clicking on confirm email.
  3. Login into your account and follow instruction to generate an API Key.
  4. Use your API key to start using our API to get weather data for a station in CSV or bulk download weaher data as a ZIP file.
  5. You may upgrade at anytime to higher subscription level from your account.

Weather Data Source

Real-time or current weather data comes from thousands of live weather stations and personal weather stations from around the world. These are updated every 10-15 min.

Forecast weather is forecast data and not from actual data i.e. the data has been forecast through our in house weather forecasting application by taking raw data from different agencies like European Centre for Medium-Range Weather Forecasts, World Meteorological Organization, NASA weather satellite imagery, NOAA GFS2 model, JMA model, etc. It then applies terrain, population, altitude and other factors before providing final forecast data. Forecast data is updated every 4-6 hours in a day.

Historical Weather Data

Our historical weather is an archive of forecast data and is archived just after midnight for the previous day. So for example data for 1st Jan 2019 has been archived just after midnight on 2nd Jan 2019.

Historical weather data is available in Daily and Hourly CSV format from 1st January 2009 till now. To gain access to historical weather data, please contact us.

Weather Codes

In the CSV file we return a weather_code column which is a code for describing weather. For example clear, sunny, etc.

You may retrieve the whole condition list as CSV to implement different weather icons or apply other logic to your application.

Weather code file (CSV): https://www.climately.com/weather_conditions.csv

Please download the list and use it offline instead of directly linking into your application.

Stations List

Station list (CSV): https://www.climately.com/stations.csv

Please download the list and use it offline instead of directly linking into your application.

CSV Format

Our weather data is provided in CSV format and provided in below section is the column names and description about these fields.

Current Weather

Value

Description

Type

stationid

Station ID

Integer

tempc or tempf

Current temperature in degree Celsius or degree Fahrenheit

Integer

feelsc or feelsf

Feels like temperature in degree Celsius or degree Fahrenheit

Integer

windspeed_mph or windspeed_kph

Current Wind speed in miles per hour or kilometer per hour

Integer

winddir_deg

Current Wind direction in degrees

Integer

weather_code

Weather condition code

Integer. See Weather Condition Codes and Icons.

extra_weather_text

Extra weather text provided by station

String

precip_mm or precip_in

Precipitation in millimeters or inches

Float

humidity

Humidity in percentage (%)

Integer

visibility_km or visibility_miles

Visibility in kilometer or miles

Integer

pressure_mb or pressure_in

Atmospheric pressure in millibars (mb) or inches

Integer

cloud

Cloud cover amount in percentage (%)

Integer

uvindex

UV Index

Integer

isday

Is it daytime or nightime. It is based on sunset and sunrise time of the station. Value of 1 means yes and 0 means no.

Integer

updatedon

Last update received from station in UTC. Format yyyy-MM-dd HH:mm

Date

Daily Weather

Value

Description

Type

stationid

Station ID

Integer

date

Local forecast date

Date in yyyy-MM-dd. Example: 2013-05-31

maxtempc or maxtempf

Maximum temperature of the day in degree Celsius or degree Fahrenheit

Integer

mintempc or mintempf

Minimum temperature of the day in degree Celsius or degree Fahrenheit

Integer

avgtempc or avgtempf

Average temperature of the day in degree Celsius or degree Fahrenheit

Integer

avgwindspeed_mph or avgwindspeed_kph

Avg Wind speed in miles per hour or kilometer per hour

Integer

avgwindgust_mph or avgwindgust_kph

Avg Wind gust in miles per hour or kilometer per hour

Integer

avgwinddir_deg

Avg Wind direction in degrees

Integer

avgpressure_mb or avgpressure_in

Avg Atmospheric pressure in millibars (mb) or inches

Integer

totalprecip_mm or totalprecip_in

Total Precipitation in millimeters or inches

Float

avghumidity

Avg Humidity in percentage (%)

Integer

avgvisibility_km or avgvisibility_miles

Avg Visibility in kilometer or miles

Integer

avgcloud

Avg Cloud cover amount in percentage (%)

Integer

weather_code

Weather condition code

Integer. See Weather Condition Codes and Icons.

uvindex

UV Index

Integer

sunrise

Local sunrise time

Time formatted as "hh:mm am/pm". For example: "05:41 am".

sunset

Local sunset time

Time formatted as "hh:mm am/pm". For example: "06:30 pm".

moonrise

Local moonrise time

Time formatted as "hh:mm am/pm". For example: "01:49 am".

moonset

Local moonset time

Time formatted as "hh:mm am/pm". For example: "06:43 pm".

moonphase

Moon phase

One of the following values will be returned:

  • New Moon
  • Waxing Crescent
  • First Quarter
  • Waxing Gibbous
  • Full Moon
  • Waning Gibbous
  • Last Quarter
  • Waning Crescent

moonillum

Moon illumination

A value is returned as %

Hourly Weather

Value

Description

Type

stationid

Station ID

Integer

date

Local forecast date

Date in yyyy-MM-dd. Example: 2013-05-31

time

Local time

Time in hmm format. For example: 100 or 1500.

tempc or tempf

Temperature in degrees Celsius or degree Fahrenheit

Integer

feelslikec or feelslikef

Feels like temperature in degrees Celsius or degree Fahrenheit

Integer

windspeed_mph or windspeed_kph

Wind speed in miles per hour or kilometer per hour

Integer

windgust_mph or windgust_kph

Wind gust in miles per hour or kilometer per hour

Integer

winddir_deg

Wind direction in degrees

Integer

pressure_mb

Atmospheric pressure in millibars (mb) or inches

Integer

precip_mm

Precipitation in millimeters or inches

Float

humidity

Humidity in percentage (%)

Integer

visibility_km

Visibility in kilometer or miles

Integer

cloud

Cloud cover amount in percentage (%)

Integer

weather_code

Weather condition code

Integer. See Weather Condition Codes and Icons.

heatindexc

Heat index temperature in degrees Celsius or degree Fahrenheit

Integer

dewpointc

Dew point temperature in degrees Celsius or degree Fahrenheit

Integer

windchillc

Wind chill temperature in degrees Celsius or degree Fahrenheit

Integer

chanceofrain

Chance of rain in %

Integer

chanceofsnow

Chance of snow in %

Integer

uvindex

UV Index

Integer

isday

Is it daytime or nightime. It is based on sunset and sunrise time of the station. Value of 1 means yes and 0 means no.

Integer

updatedon

Last update received from station in UTC. Format yyyy-MM-dd HH:mm

Date

API

We provide access to our weather data through simple and easy HTTP/S GET weather API.

Authentication

Climately API is authenticated by passing an API Key in the request url. Your API key is listed under your Dashboard.

Request and Parameter

You may access our weather API using http or https protocol.

API Request URL format: http://api.climately.com/v1/YOUR_API_KEY/REQUEST_METHOD

Replace YOUR_API_KEY with your own API key listed under your account.

Request Methods

Following request methods are available.

  1. current
  2. weather

Climately API returns data in Imperial units by default. But if you would like data to be returned in Metric unit then pass parameter ?unit=f with any request methods.

Current Request Method

Current request method allows you to either get current weather for a station.

Example: Get current weather for a station in CSV
http://api.climately.com/v1/YOUR_API_KEY/current/station/STATION_ID.csv

Weather Request Method

Weather request method allows you to either get daily and hourly weather forecast for a station.

Example: Get daily weather for a station in CSV
http://api.climately.com/v1/YOUR_API_KEY/weather/daily/station/STATION_ID.csv

Example: Get hourly weather for a station in CSV
http://api.climately.com/v1/YOUR_API_KEY/weather/hourly/station/STATION_ID.csv

Bulk Download

You may bulk download data for all stations as a ZIP file. When the zip file is uncompressed the folder contains a single file with all the data for all stations in CSV format.

Example: Get current weather for all station as a ZIP file
http://api.climately.com/v1/YOUR_API_KEY/current/all.zip

Example: Get daily weather for all station as a ZIP file
http://api.climately.com/v1/YOUR_API_KEY/weather/daily/all.zip

Example: Get hourly weather for all station as a ZIP file
http://api.climately.com/v1/YOUR_API_KEY/weather/hourly/all.zip

Error

If there is an error, API response contains error message including error code for following 4xx HTTP Status codes.

HTTP Status Code Error code Description
400 1005 API request url is invalid
400 1006 No matching station found
401 2006 API key provided is invalid
403 2007 API key has exceeded calls per day quota
403 2008 API key has been disabled.
400 9999 Internal application error.