Local Weather API

Current Weather

Request Structure
api/current/{Location}?app_id=APP_ID&app_key=APP_KEY
Example: Current Weather
http://api.weatherunlocked.com/api/current/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

{
    "lat": 51.55,
    "lon": -0.42,
    "alt_m": 38,
    "alt_ft": 124.67,
    "wx_desc": "Partly cloudy",
    "wx_code": 1,
    "wx_icon": "PartlyCloudyDay.gif",
    "temp_c": 11,
    "temp_f": 51.8,
    "feelslike_c": 8.17,
    "feelslike_f": 46.7,
    "humid_pct": 35,
    "windspd_mph": 16.16,
    "windspd_kmh": 26,
    "windspd_kts": 14.04,
    "windspd_ms": 7.22,
    "winddir_deg": 110,
    "winddir_compass": "ESE",
    "cloudtotal_pct": 50,
    "vis_km": 10,
    "vis_mi": 6,
    "vis_desc": null,
    "slp_mb": 1022,
    "slp_in": 30.26,
    "dewpoint_c": -3.81,
    "dewpoint_f": 25.14
}

Response Fields

Field Type Format Description
lat decimal weather station latitude
lon decimal weather station longitude
alt_m decimal meters weather station altitude
alt_f decimal feet weather station altitude
wx_desc string text 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
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
winddir_deg integer degrees (0-360) direction wind is coming from
winddir_compass string 16 Point direction wind is coming from
cloudtotal_pct integer percent amount of total cloud
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