Local Weather API

Forecast Weather

Request Structure
api/forecast/{Location}?app_id=APP_ID&app_key=APP_KEY
Example: Forecast Weather
http://api.weatherunlocked.com/api/forecast/51.50,-0.12?app_id=APP_ID&app_key=APP_KEY

Request Parameters

Location

There are two different ways to specify the location:
Latitude/Longitude Co-ordinates or post code/zipcode.

Valid decimal geolocation coordinates with the following format: "latitude,longitude", with no more than 3 decimal places.

Example: Current Weather for New York
http://api.weatherunlocked.com/api/current/40.71,-74.00?app_id=APP_ID&app_key=APP_KEY

A valid postcode with the following format: "country.postcode"
where country can be the available countries in our system.

Country Value Format (@ = Letter, # = Number)
United Kingdom 'uk' 'uk.postcode'
United States 'us' 'us.#####'
Argentina 'ar' 'ar.@####@@@'
Austria 'at' 'at.#####'
Australia 'au' 'au.#####'
Belgium 'be' 'be.####'
Brazil 'br' 'br.#####-###'
Canada 'ca' 'ca.@#@ #@#'
Denmark 'dk' 'dk.####'
Finland 'fi' 'fi.#####'
France 'fr' 'fr.#####'
Germany 'de' 'de.postcode'
Ireland 'ie' 'ie.@@@'
Italy 'it' 'it.#####'
Netherlands 'nl' 'nl.####'
Norway 'no' 'no.####'
Spain 'es' 'es.#####'
Sweden 'se' 'se.### ##'
Example: Current Weather and UK postcode
http://api.weatherunlocked.com/api/current/uk.G3 8ND?app_id=APP_ID&app_key=APP_KEY
Example: Forecast Weather and US zipcode
http://api.weatherunlocked.com/api/forecast/us.33109?app_id=APP_ID&app_key=APP_KEY

Please contact us if you would like postcodes to be made available for another country.

Optional Parameters

Language

Add the 'lang' parameter to get weather descriptions in your language.

Language Value
English default
Danish 'da'
French 'fr'
Italian 'it'
German 'de'
Dutch 'nl'
Spanish 'es'
Norwegian 'no'
Swedish 'sv'
Turkish 'tr'
Bulgarian 'bg'
Czech 'cs'
Hungarian 'hu'
Polish 'pl'
Romanian 'rm'
Russian 'ru'
Slovak 'sk'
Example: Forecast Weather with Italian descriptions
http://api.weatherunlocked.com/api/forecast/40.7,-74?lang=it&app_id=APP_ID&app_key=APP_KEY

Response

Example

{
    "Days": 
        [
            {
            "date": "13/03/2015",
            "sunrise_time": "06:20",
            "sunset_time": "18:01",
            "moonrise_time": "01:06",
            "moonset_time": "10:12",
            "temp_max_c": 10.3,
            "temp_max_f": 50.5,
            "temp_min_c": 4.1,
            "temp_min_f": 39.5,
            "precip_total_mm": 0.2,
            "precip_total_in": 0,
            "rain_total_mm": 0,
            "rain_total_in": 0,
            "snow_total_mm": 0,
            "snow_total_in": 0,
            "prob_precip_pct": 99,
            "humid_max_pct": 87,
            "humid_min_pct": 54,
            "windspd_max_mph": 16,
            "windspd_max_kmh": 25,
            "windspd_max_kts": 14,
            "windspd_max_ms": 7,
            "windgst_max_mph": 23,
            "windgst_max_kmh": 37,
            "windgst_max_kts": 20,
            "windgst_max_ms": 10.4,
            "slp_max_in": 30.41,
            "slp_max_mb": 1026.8,
            "slp_min_in": 30.24,
            "slp_min_mb": 1021.2,
            "Timeframes": 
                [
                    {
                    "date": "13/03/2015",
                    "time": 0,
                    "utcdate": "13/03/2015",
                    "utctime": 0,
                    "wx_desc": "Partly cloudy skies",
                    "wx_code": 1,
                    "wx_icon": "PartlyCloudyNight.gif",
                    "temp_c": 7.2,
                    "temp_f": 44.9,
                    "feelslike_c": 4.1,
                    "feelslike_f": 39.4,
                    "winddir_deg": 144,
                    "winddir_compass": "SE",
                    "windspd_mph": 11,
                    "windspd_kmh": 17,
                    "windspd_kts": 9,
                    "windspd_ms": 4.8,
                    "windgst_mph": 20,
                    "windgst_kmh": 33,
                    "windgst_kts": 18,
                    "windgst_ms": 9.1,
                    "cloud_low_pct": 0,
                    "cloud_mid_pct": 30,
                    "cloud_high_pct": 100,
                    "cloudtotal_pct": 34,
                    "precip_mm": 0,
                    "precip_in": 0,
                    "rain_mm": 0,
                    "rain_in": 0,
                    "snow_mm": 0,
                    "snow_in": 0,
                    "snow_accum_cm": 0,
                    "snow_accum_in": 0,
                    "prob_precip_pct": "5",
                    "humid_pct": 70,
                    "dewpoint_c": 2.1,
                    "dewpoint_f": 35.8,
                    "vis_km": 19.7,
                    "vis_mi": 12.2,
                    "slp_mb": 1022,
                    "slp_in": 30.26
                    },
...

Response Fields Forecast Weather

Field Type Format Description
Day
date date/time stamp day / date local time
sunrise_time time HH:mm civil sunrise time
sunset_time time HH:mm civil sunset time
moonrise_time time HH:mm moonrise time
moonset_time time HH:mm moonset time
moonphase phase the moon is in
temp_max_c 1 decimal celcius maximum temperature
temp_max_f 1 decimal fahrenheit maximum temperature
temp_min_c 1 decimal celcius minimum temperature
temp_min_f 1 decimal fahrenheit minimum temperature
precip_total_mm 1 decimal millimeters total amount of precipitation
precip_total_in 1 decimal inches total amount of precipitation
rain_total_mm 1 decimal millimeters total amount of precipitation falling as rain
rain_total_in 1 decimal inches total amount of precipitation falling as rain
snow_total_mm 1 decimal millimeters total amount of precipitation falling as snow
snow_total_in 1 decimal inches total amount of precipitation falling as snow
prob_precip_pct integer percent probability of precipitation falling
humid_max_pct integer percent maximum humidity level
humid_min_pct integer percent minimum humidity level
windspd_max_mph integer miles per hour maximum mean wind speed
windspd_max_kmh integer kilometers per hour maximum mean wind speed
windspd_max_kts integer knots maximum mean wind speed
windspd_max_ms 1 decimal metres per second maximum mean wind speed
windgst_max_mph integer miles per hour maximum wind gust
windgst_max_kmh integer kilometers per hour maximum wind gust
windgst_max_kts integer knots maximum wind gust
windgst_max_ms 1 decimal metres per second maximum wind gust
slp_max_in 2 decimal inches maximum sea level pressure
slp_max_mb integer millibars maximum sea level pressure
slp_min_in 2 decimal inches minimum sea level pressure
slp_min_mb integer millibars minimum sea level pressure
Timeframes - list of 3 hourly timeframes
Field Type Format Description
Timeframe forecast timeframe
date
time 00:00 local time
wx_desc string text weather description
wx_desc_short text text short weather description
wx_code integer integer weather code
wx_icon string .gif weather icon file name
temp_c 1 decimal Celcius temperature
temp_f 1 decimal Fahrenheit temperature
feelslike_c 1 decimal Celcius feel like temperature
feelslike_f 1 decimal fahrenheit feel like temperature
winddir_deg integer degrees (0-360) direction wind is coming from
winddir_compass string 16 Point direction wind is coming from
windspd_mph integer miles per hour maximum mean wind speed
windspd_kmh integer kilometers per hour maximum mean wind speed
windspd_kts integer knots maximum mean wind speed
windspd_ms 1 decimal metres per second maximum mean wind speed
windgst_mph integer miles per hour maximum wind gust
windgst_kmh integer kilometers per hour maximum wind gust
windgst_kts integer knots maximum wind gust
windgst_ms 1 decimal metres per second maximum wind gust
cloud_low_pct integer percent amount of low level cloud
cloud_mid_pct integer percent amount of mid level cloud
cloud_high_pct integer percent amount of high level cloud
cloudtotal_pct integer percent amount of total cloud
precip_mm 1 decimal millimeters amount of precipitation
precip_in 1 decimal inches amount of precipitation
rain_mm 1 decimal millimeters amount of precipitation falling as rain
rain_in 1 decimal inches amount of precipitation falling as rain
snow_mm 1 decimal millimeters amount of precipitation falling as snow
snow_in 1 decimal inches amount of precipitation falling as snow
snow_accum_cm 1 decimal centimetres amount of fresh snowfall - if accumulated
snow_accum_in 1 decimal inches amount of fresh snowfall - if accumulated
prob_precip_pct string or "<1" percent probability of precipitation falling
humid_pct integer percent humidity level
dewpoint_c 1 decimal Celcius dewpoint
dewpoint_f 1 decimal Fahrenheit dewpoint
vis_km 1 decimal kilometers visibility
vis_mi 1 decimal miles visibility
slp_mb integer millibars sea level pressure
slp_in 2 decimal inches sea level pressure