To use the API, you need to sign up for an API key. You need to use this key when making requests
http://api.wunderground.com/api/KEY/FEATURE/[FEATURE…]/q/QUERY.FORMAT
Definitions:
| feature_id | description |
|---|---|
| geolookup | Returns the the city name, zip code / postal code, latitude-longitude coordinates and nearby personal weather stations. |
| conditions | Returns the current temperature, weather condition, humidity, wind, 'feels like' temperature, barometric pressure, and visibility. |
| forecast | Returns a summary of the weather for the next 3 days. This includes high and low temperatures, a string text forecast and the conditions. |
| astronomy | Returns The moon phase, sunrise and sunset times. |
| radar | see description for the radar layer API |
| animatedradar | see description for the radar layer API |
| satellite | Returns a URL link to .gif visual and infrared satellite images. |
| webcams | Returns locations of nearby Personal Weather Stations and URL's for images from their web cams. |
| history | history_YYYYMMDD returns a summary of the observed weather for the specified date. |
| alerts | Returns the short name description, expiration time and a long text description of a severe alert - If one has been issued for the searched upon location. |
| hourly | Returns an hourly forecast for the next 36 hours immediately following the API request. |
| hourly10day | Returns an hourly forecast for the next 10 days |
| forecast10day | Returns a summary of the weather for the next 10 days. This includes high and low temperatures, a string text forecast and the conditions. |
| yesterday | Returns a summary of the observed weather history for yesterday. |
| planner | planner_MMDDMMDD returns a weather summary based on historical information between the specified dates (30 days max). |
| autocomplete | |
| almanac | Historical average temperature for today |
| lang | Returns the API response in the specified language. If omitted then default is English. See table below for language codes. |
| tide | Tidal information |
| rawtide | Raw Tidal information for graphs |
Example (US):
http://api.wunderground.com/api/YOUR-KEY/geolookup/conditions/forecast/q/CA/San_Francisco.json
Show Response
Example (International):
http://api.wunderground.com/api/YOUR-KEY/geolookup/conditions/forecast/q/Australia/Sydney.json
Show Response
Example (ambiguous result):
http://api.wunderground.com/api/YOUR-KEY/geolookup/conditions/forecast/q/Allentown.json
Example (parsing ambiguous results):
When the API location query does not produce an exact location match, a "results" array will be present in the JSON response. Each result object has an "l" parameter (short for "link") that can be used for constructing wunderground URLs:
http://api.wunderground.com/api/YOUR-KEY/forecast/q/zmw:31003.1.99999.json
http://autocomplete.wunderground.com/aq?query=QUERY&format=JSON
&c=US&h=1&h=1&cities=0&cb=myCallbackNamehttp://autocomplete.wunderground.com/aq?query=San%20F&format=JSON
{ "RESULTS": [
{
"name": "San Francisco, California",
"type": "city",
"c": "US",
"zmw": "94125.1.99999",
"tz": "America/Los_Angeles",
"tzs": "PDT",
"l": "/q/zmw:94125.1.99999"
},
{
"name": "San Fernando del Valle de Catamarca, Argentina",
"type": "city",
"c": "AR",
"zmw": "00000.5.87222",
"tz": "America/Argentina/La_Rioja",
"tzs": "ART",
"l": "/q/zmw:00000.5.87222"
},
{
"name": "San Felipe de Puerto Plata, Dominican Republic",
"type": "city",
"c": "DO",
"zmw": "00000.11.78458",
"tz": "America/Santo_Domingo",
"tzs": "AST",
"l": "/q/zmw:00000.11.78458"
},
...
http://autocomplete.wunderground.com/aq?query=Kat&format=JSON&h=1&cities=0
{ "RESULTS": [
{
"name": "Katrina, Major Hurricane - Atlantic, 2005",
"type": "hurricanes",
"date": "8/23/2005",
"strmnum": "11",
"basin": "at",
"damage": "81000",
"l": "/hurricane/at200511.asp"
},
{
"name": "Katie, Major Hurricane - Atlantic, 1955",
"type": "hurricanes",
"date": "10/14/1955",
"strmnum": "12",
"basin": "at",
"damage": "0",
"l": "/hurricane/at195512.asp"
},
{
"name": "Kate, Major Hurricane - Atlantic, 1985",
"type": "hurricanes",
"date": "11/15/1985",
"strmnum": "11",
"basin": "at",
"damage": "0",
"l": "/hurricane/at198511.asp"
},
...
Each autocomplete result object has an "l" parameter (short for "link") that can be used for constructing wunderground URLs:
Cities:http://www.wunderground.com/q/zmw:94125.1.99999
http://api.wunderground.com/api/YOUR-KEY/forecast/q/zmw:94125.1.99999.json
Hurricanes:
http://www.wunderground.com/hurricane/at200511.asp
http://api.wunderground.com/api/KEY/FEATURE/image.FORMAT?PARAMS
http://api.wunderground.com/api/KEY/FEATURE/q/QUERY.FORMAT?PARAMS
Definitions:
| key | value | description |
|---|---|---|
| You can position your radar image with either a bounding box: | ||
| minlat maxlat minlon maxlon |
-90.0 to 90.0 -180.0 to 180.0 |
minimum and maximum latitude bounds minimum and maximum longitude bounds |
| OR, you can position your radar image with a center lat/lon: | ||
| centerlat centerlon radius radunits |
-90.0 to 90.0 -180.0 to 180.0 100 is close, 1000 is country nm (default), or km |
center latitude center longitude radius distance from center to edge (optional) radius units: nautical miles or kilometers |
| width height |
width of image in pixels height of image in pixels |
|
| newmaps | 0 (default) or 1 | transparent image (default) or show basemap |
| rainsnow | 0 (default) or 1 | use a different color palette to show rain/mix/snow |
| smooth | 0 (default) or 1 | smooth the colors |
| reproj.automerc | 1 | use Mercator projection. (omit this parameter for lat/lon projection, default) |
| frame | 0 (default) to 5 | which frame to display: 0 is most current, 1 is the previous, moving back through time |
| num | 1 (default) to 15 | number of frames in the animation • format must be 'gif' or 'swf' for animations • feature must be 'animatedradar' for animations |
| delay | 25 (default) to 100 | the duration of a radar frame in an animation, in hundredths of a second. |
| timelabel timelabel.x timelabel.y |
0 (default) or 1 0 to width 0 to height |
display the time of the radar frame pixels from left pixels from top |
http://api.wunderground.com/api/YOUR-KEY/radar/image.gif?maxlat=42.35&maxlon=-109.311&minlat=39.27&minlon=-114.644&width=600&height=480&newmaps=1
http://api.wunderground.com/api/YOUR-KEY/radar/image.gif?centerlat=38¢erlon=-96.4&radius=100&width=280&height=280&newmaps=1
http://api.wunderground.com/api/YOUR-KEY/radar/q/KS/Topeka.gif?width=280&height=280&newmaps=1
http://api.wunderground.com/api/YOUR-KEY/animatedradar/q/MI/Ann_Arbor.gif?newmaps=1&timelabel=1&timelabel.y=10&num=5&delay=50
http://api.wunderground.com/api/YOUR-KEY/radar/image.gif?maxlat=47.709&maxlon=-69.263&minlat=31.596&minlon=-97.388&width=640&height=480&rainsnow=1&timelabel=1&timelabel.x=525&timelabel.y=41&reproj.automerc=1
To modify the language that the API returns add the Feature Id "/lang:XY/", where XY is a two letter language code.
If /lang:xy/ is omitted from the API request then English will be returned by default.
http://api.wunderground.com/api/YOUR-KEY/geolookup/conditions/forecast/lang:FR/q/France/Paris.json
"AF" = Afrikaans
"AL" = Albanian
"AR" = Arabic
"HY" = Armenian
"AZ" = Azerbaijani
"EU" = Basque
"BY" = Belarusian
"BU" = Bulgarian
"LI" = British English
"MY" = Burmese
"CA" = Catalan
"CN" = Chinese - Simplified
"TW" = Chinese - Traditional
"CR" = Croatian
"CZ" = Czech
"DK" = Danish
"DV" = Dhivehi
"NL" = Dutch
"EN" = English
"EO" = Esperanto
"ET" = Estonian
"FA" = Farsi
"FI" = Finnish
"FR" = French
"FC" = French Canadian
"GZ" = Galician
"DL" = German
"KA" = Georgian
"GR" = Greek
"GU" = Gujarati
"HT" = Haitian Creole
"IL" = Hebrew
"HI" = Hindi
"HU" = Hungarian
"IS" = Icelandic
"IO" = Ido
"ID" = Indonesian
"IR" = Irish Gaelic
"IT" = Italian
"JP" = Japanese
"JW" = Javanese
"KM" = Khmer
"KR" = Korean
"KU" = Kurdish
"LA" = Latin
"LV" = Latvian
"LT" = Lithuanian
"ND" = Low German
"MK" = Macedonian
"MT" = Maltese
"GM" = Mandinka
"MI" = Maori
"MR" = Marathi
"MN" = Mongolian
"NO" = Norwegian
"OC" = Occitan
"PS" = Pashto
"GN" = Plautdietsch
"PL" = Polish
"BR" = Portuguese
"PA" = Punjabi
"RO" = Romanian
"RU" = Russian
"SR" = Serbian
"SK" = Slovak
"SL" = Slovenian
"SP" = Spanish
"SI" = Swahili
"SW" = Swedish
"CH" = Swiss
"TL" = Tagalog
"TT" = Tatarish
"TH" = Thai
"TR" = Turkish
"TK" = Turkmen
"UA" = Ukrainian
"UZ" = Uzbek
"VU" = Vietnamese
"CY" = Welsh
"SN" = Wolof
"JI" = Yiddish - transliterated
"YI" = Yiddish - unicode
<?php
$json_string = file_get_contents("http://api.wunderground.com/api/abcdefgh12345678/geolookup/conditions/q/IA/Cedar_Rapids.json");
$parsed_json = json_decode($json_string);
$location = $parsed_json->{'location'}->{'city'};
$temp_f = $parsed_json->{'current_observation'}->{'temp_f'};
echo "Current temperature in ${location} is: ${temp_f}\n";
?>
require 'open-uri'
require 'json'
open('http://api.wunderground.com/api/abcdefgh12345678/geolookup/conditions/q/IA/Cedar_Rapids.json') do |f|
json_string = f.read
parsed_json = JSON.parse(json_string)
location = parsed_json['location']['city']
temp_f = parsed_json['current_observation']['temp_f']
print "Current temperature in #{location} is: #{temp_f}\n"
end
import urllib2
import json
f = urllib2.urlopen('http://api.wunderground.com/api/abcdefgh12345678/geolookup/conditions/q/IA/Cedar_Rapids.json')
json_string = f.read()
parsed_json = json.loads(json_string)
location = parsed_json['location']['city']
temp_f = parsed_json['current_observation']['temp_f']
print "Current temperature in %s is: %s" % (location, temp_f)
f.close()
<cfhttp url="http://api.wunderground.com/api/abcdefgh12345678/geolookup/conditions/q/IA/Cedar_Rapids.json">
<cfset parsed_json = deserializeJSON(cfhttp.fileContent)>
<cfset location = parsed_json.location.city>
<cfset temp_f = parsed_json.current_observation.temp_f>
<cfoutput>Current temperature in #location# is #temp_f#</cfoutput>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$.ajax({
url: "http://api.wunderground.com/api/abcdefgh12345678/geolookup/conditions/q/IA/Cedar_Rapids.json",
dataType: "jsonp",
success: function(parsed_json) {
var location = parsed_json['location']['city'];
var temp_f = parsed_json['current_observation']['temp_f'];
alert("Current temperature in "+location+" is: " + temp_f);
}
});
});
</script>
Note that values will = -9999 or -999 for Null or Non applicable (NA) variables
[tempm] => Temp in C
[tempi] => Temp in F
[dewptm] =>Dewpoint in C
[dewpti] => Duepoint in F
[hum] => Humidity %
[wspdm] => WindSpeed kph
[wspdi] => Windspeed in mph
[wgustm] => Wind gust in kph
[wgusti] => Wind gust in mph
[wdird] => Wind direction in degrees
[wdire] => Wind direction description (ie, SW, NNE)
[vism] => Visibility in Km
[visi] => Visability in Miles
[pressurem] => Pressure in mBar
[pressurei] => Pressure in inHg
[windchillm] => Wind chill in C
[windchilli] => Wind chill in F
[heatindexm] => Heat index C
[heatindexi] => Heat Index F
[precipm] => Precipitation in mm
[precipi] => Precipitation in inches
[pop] => Probability of Precipitation
[conds] => See possible condition phrases below
These are the directions the wind will be blowing from.
- East
- ENE => East-northeast
- ESE => East-southeast
- NE => Northeast
- NNE => North-northeast
- NNW => North-northwest
- North
- NW => Northwest
- SE => Southeast
- South
- SSE => South-southeast
- SSW => South-southwest
- SW => Southwest
- Variable
- West
- WNW => West-northwest
- WSW => West-southwest
The following conditions are Light, Heavy, or normal which has no classifier.
- [Light/Heavy] Drizzle
- [Light/Heavy] Rain
- [Light/Heavy] Snow
- [Light/Heavy] Snow Grains
- [Light/Heavy] Ice Crystals
- [Light/Heavy] Ice Pellets
- [Light/Heavy] Hail
- [Light/Heavy] Mist
- [Light/Heavy] Fog
- [Light/Heavy] Smoke
- [Light/Heavy] Volcanic Ash
- [Light/Heavy] Widespread Dust
- [Light/Heavy] Sand
- [Light/Heavy] Haze
- [Light/Heavy] Spray
- [Light/Heavy] Dust Whirls
- [Light/Heavy] Sandstorm
- [Light/Heavy] Low Drifting Snow
- [Light/Heavy] Low Drifting Widespread Dust
- [Light/Heavy] Low Drifting Sand
- [Light/Heavy] Blowing Snow
- [Light/Heavy] Blowing Widespread Dust
- [Light/Heavy] Blowing Sand
- [Light/Heavy] Rain Mist
- [Light/Heavy] Rain Showers
- [Light/Heavy] Snow Showers
- [Light/Heavy] Ice Pellet Showers
- [Light/Heavy] Hail Showers
- [Light/Heavy] Small Hail Showers
- [Light/Heavy] Thunderstorm
- [Light/Heavy] Thunderstorms and Rain
- [Light/Heavy] Thunderstorms and Snow
- [Light/Heavy] Thunderstorms and Ice Pellets
- [Light/Heavy] Thunderstorms with Hail
- [Light/Heavy] Thunderstorms with Small Hail
- [Light/Heavy] Freezing Drizzle
- [Light/Heavy] Freezing Rain
- [Light/Heavy] Freezing Fog
- Patches of Fog
- Shallow Fog
- Overcast
- Clear
- Partly Cloudy
- Mostly Cloudy
- Scattered Clouds
- Unknown
| Phrase | Icon Name | Icon Image (Icon Gallery) |
|---|---|---|
| Chance of Flurries | chanceflurries | |
| Chance of Rain | chancerain | |
| Chance of Freezing Rain | chancesleet | |
| Chance of Sleet | chancesleet | |
| Chance of Snow | chancesnow | |
| Chance of Thunderstorms | chancetstorms | |
| Chance of a Thunderstorm | chancetstorms | |
| Clear | clear | |
| Cloudy | cloudy | |
| Flurries | flurries | |
| Fog | fog | |
| Haze | hazy | |
| Mostly Cloudy | mostlycloudy | |
| Mostly Sunny | mostlysunny | |
| Partly Cloudy | partlycloudy | |
| Partly Sunny | partlysunny | |
| Freezing Rain | sleet | |
| Rain | rain | |
| Sleet | sleet | |
| Snow | snow | |
| Sunny | sunny | |
| Thunderstorms | tstorms | |
| Thunderstorm | tstorms | |
| Unknown | unknown | |
| Overcast | cloudy | |
| Scattered Clouds | partlycloudy |
These guidelines apply to all Weather Underground Logos found on this page with exceptions noted in the individual Logo entries below.
Usage
Please see individual Logo variations below for all acceptable combinations of layout and color. Find out more about Weather Underground, Inc.
Trademark Information
Proper trademarks and credit lines must be used with Weather Underground corporate Logos. Weather Underground is a registered trademark of Weather Underground, Inc. both in the United States and internationally. The Weather Underground Logo is a trademark of Weather Underground, Inc.
![]()
![]()
The following alternative Logos may be used for applications in which the Standard Logo is unsuitable according to the guidelines specified in this guide.
![]()
![]()
![]()
![]()
(available in PNG and EPS formats only)
![]()
![]()
The Logo comprises three elements: the Rainbow, the URL, and the Trademark.
![]()
When choosing between Standard and Horizontal Logos, use the Logo that best fills the allotted space and allows the URL to appear as large as possible.
![]()
The Logo must have sufficient clear space separating it from surrounding elements.
![]()
![]()
In order to ensure legibility, there is a fixed minimum size to which the Logo may be scaled down.
All usage, color, and clearspace rules apply.
![]()
The 4-Color Logo may appear in its native CMYK or be converted to RGB as needed. It should never be converted to black and white or grayscale. For applications in which a spot color is needed, the 1-Color Logo may be converted to PMS 660. The following values may be substituted as necessary:
![]()
When choosing Logos, take care to ensure that there is as much contrast between the Logo and background as possible.
![]()
![]()
Do not use the Logo on busy nor bright backgrounds, nor on backgrounds with similar colors as the Logo. Always endeavor to maximize contrast between the Logo and background.
![]()
![]()
![]()
![]()
Icon URL example:
http://icons.wxug.com/i/c/a/partlycloudy.gif
To use the icon path, insert the "icon" value in the in the image URL path:
http://icons.wxug.com/i/c/a/ICON.gif
Icon URL example:
http://icons.wxug.com/i/c/b/partlycloudy.gif
To use the icon path, insert the "icon" value in the in the image URL path:
http://icons.wxug.com/i/c/b/ICON.gif
Icon URL example:
http://icons.wxug.com/i/c/c/partlycloudy.gif
To use the icon path, insert the "icon" value in the in the image URL path:
http://icons.wxug.com/i/c/c/ICON.gif
Icon URL example:
http://icons.wxug.com/i/c/d/partlycloudy.gif
To use the icon path, insert the "icon" value in the in the image URL path:
http://icons.wxug.com/i/c/d/ICON.gif
Icon URL example:
http://icons.wxug.com/i/c/e/partlycloudy.gif
To use the icon path, insert the "icon" value in the in the image URL path:
http://icons.wxug.com/i/c/e/ICON.gif
Icon URL example:
http://icons.wxug.com/i/c/f/partlycloudy.gif
To use the icon path, insert the "icon" value in the in the image URL path:
http://icons.wxug.com/i/c/f/ICON.gif
Icon URL example:
http://icons.wxug.com/i/c/g/partlycloudy.gif
To use the icon path, insert the "icon" value in the in the image URL path:
http://icons.wxug.com/i/c/g/ICON.gif
Icon URL example:
http://icons.wxug.com/i/c/h/partlycloudy.gif
To use the icon path, insert the "icon" value in the in the image URL path:
http://icons.wxug.com/i/c/h/ICON.gif
Icon URL example:
http://icons.wxug.com/i/c/i/partlycloudy.gif
To use the icon path, insert the "icon" value in the in the image URL path:
http://icons.wxug.com/i/c/i/ICON.gif
Wunderground Country Code = ISO Country code
AH = AF
AB = AL
AL = DZ
AS = AS
AD = AD
AN = AO
A1 = AI
AA = AQ
AT = AG
AG = AR
AM = AM
AW = AW
AU = AU
AU = AU
OS = AT
A2 = AZ
BS = BS
BN = BH
BW = BD
BR = BB
BY = BY
BX = BE
BH = BZ
BJ = BJ
BE = BM
B2 = BT
BO = BO
BA = BA
BC = BW
BV = BV
BZ = BR
BT = IO
BF = BN
BU = BG
HV = BF
BI = BI
KH = KH
CM = CM
CA = CA
CV = CV
GC = KY
CE = CF
CD = TD
CH = CL
CI = CN
CX = CX
CC = CC
CO = CO
IC = KM
CG = CG
CD = CD
KU = CK
CS = CR
IV = CI
RH = HR
CU = CU
CY = CY
CZ = CZ
DN = DK
DJ = DJ
DO = DM
DR = DO
EQ = EC
EG = EG
ES = SV
GQ = GQ
E1 = ER
EE = EE
ET = ET
FK = FK
FA = FO
FJ = FJ
FI = FI
FR = FR
FG = GF
PF = PF
TF = TF
GO = GA
GB = GM
GE = GE
DL = DE
GH = GH
GI = GI
GR = GR
GL = GL
GD = GD
GP = GP
GU = GU
GU = GT
GN = GN
GW = GW
GY = GY
HA = HT
HM = HM
VA = VA
HO = HN
HK = HK
HU = HU
IL = IS
IN = IN
ID = ID
IR = IR
IQ = IQ
IE = IE
IS = IL
IY = IT
JM = JM
JP = JP
JD = JO
KZ = KZ
KN = KE
KB = KI
KR = KP
KO = KR
KW = KW
KG = KG
LA = LA
LV = LV
LB = LB
LS = LS
LI = LR
LY = LY
LT = LI
L1 = LT
LU = LU
MU = MO
MK = MK
MG = MG
MW = MW
MS = MY
MV = MV
MI = ML
ML = MT
MH = MH
MP = MP
MR = MQ
MT = MR
MA = MU
YT = YT
MX = MX
US_FM = FM
M1 = MD
M3 = MC
MO = MN
M2 = MS
MC = MA
MZ = MZ
BM = MM
NM = NA
NW = NR
NP = NP
NL = NL
AN = AN
NZ = NZ
NC = NC
NK = NI
NR = NE
NI = NG
N1 = NU
XX_NF = NF
US_MP = MP
NO = NO
OM = OM
PK = PK
PW = PW
PS = PS
PM = PA
NG = PG
PY = PY
PR = PE
PH = PH
P2 = PN
PL = PL
PO = PT
PR = PR
QT = QA
RE = RE
RO = RO
RS = RU
RW = RW
HE = SH
K1 = KN
LC = LC
P1 = PM
VC = VC
ZM = WS
SM = SM
TP = ST
SD = SA
SG = SN
SC = SC
SL = SL
SR = SG
S1 = SK
LJ = SI
SO = SB
SI = SO
ZA = ZA
GS = GS
SP = ES
SB = LK
SU = SD
SM = SR
SJ = SJ
SV = SZ
SN = SE
SW = CH
SY = SY
TW = TW
TJ = TJ
TN = TZ
TH = TH
EA = TL
TG = TG
TK = TK
TO = TO
TD = TT
TS = TN
TU = TR
TM = TM
TI = TC
TV = TV
TB = TB
UG = UG
UR = UA
ER = AE
UK = UK
US = US
US_UM = UM
UY = UY
UZ = UZ
NH = VU
VN = VE
VS = VN
VG = VG
VI = VI
FW = WF
EH = EH
YE = YE
RB = RS
KV = KV
M4 = ME
ZB = ZM
ZW = ZW
Per the Terms of Service the Weather Underground logo must be included with credit line where Weather Underground data is displayed. Please see individual Logo variations for all acceptable combinations of layout and color. Read the full Logo Usage Guide.
![]()
More logos in the Logo Usage Guide.