API returns empty or null data

  • 3
  • Problem
  • Updated 2 years ago
  • (Edited)
The WU API is returning empty or null values for current observation fields including weather, icon, temp_c, temp_f, etc. Here is some example URL and return current_observation:

URL:
http://api.wunderground.com/api/%3Ckey%3E/astronomy/conditions/forecast10day/hourly/lang:EN/pws:0/q/...

http://api.wunderground.com/api/<key>/astronomy/conditions/forecast10day/hourly/lang:EN/pws:0/q/28.185386,113.032539.json<br>
Current_observation:
"current_observation": {
		"image": {
		"url":"http://icons.wxug.com/graphics/wu2/logo_130x80.png",
		"title":"Weather Underground",
		"link":"http://www.wunderground.com"
		},
		"display_location": {
		"full":"Calgary, Alberta",
		"city":"Calgary",
		"state":"",
		"state_name":"Alberta",
		"country":"CA",
		"country_iso3166":"CA",
		"zip":"00000",
		"magic":"43",
		"wmo":"71393",
		"latitude":"51.040000",
		"longitude":"-114.070000",
		"elevation":"1052.2"
		},
		"observation_location": {
		"full":"Calgary Int\u0027l Cs AL, ",
		"city":"Calgary Int\u0027l Cs AL",
		"state":"",
		"country":"CA",
		"country_iso3166":"CA",
		"latitude":"51.10861206",
		"longitude":"-114.01444244",
		"elevation":"3547 ft"
		},
		"estimated": {
		},
		"station_id":"CPCI",
		"observation_time":"Last Updated on October 26, 12:00 AM MDT",
		"observation_time_rfc822":"Wed, 26 Oct 2016 00:00:00 -0600",
		"observation_epoch":"1477461600",
		"local_time_rfc822":"Wed, 26 Oct 2016 00:12:39 -0600",
		"local_epoch":"1477462359",
		"local_tz_short":"MDT",
		"local_tz_long":"America/Edmonton",
		"local_tz_offset":"-0600",
		"weather":"",
		"temperature_string":"27 F (-3 C)",
		"temp_f":27,
		"temp_c":-3,
		"relative_humidity":"93%",
		"wind_string":"From the NNE at 4 MPH",
		"wind_dir":"NNE",
		"wind_degrees":30,
		"wind_mph":4,
		"wind_gust_mph":0,
		"wind_kph":6,
		"wind_gust_kph":0,
		"pressure_mb":"1019",
		"pressure_in":"30.11",
		"pressure_trend":"+",
		"dewpoint_string":"26 F (-4 C)",
		"dewpoint_f":26,
		"dewpoint_c":-4,
		"heat_index_string":"NA",
		"heat_index_f":"NA",
		"heat_index_c":"NA",
		"windchill_string":"NA",
		"windchill_f":"NA",
		"windchill_c":"NA",
		"feelslike_string":"27 F (-3 C)",
		"feelslike_f":"27",
		"feelslike_c":"-3",
		"visibility_mi":"",
		"visibility_km":"",
		"solarradiation":"--",
		"UV":"-1","precip_1hr_string":" in ( mm)",
		"precip_1hr_in":"",
		"precip_1hr_metric":"--",
		"precip_today_string":" in ( mm)",
		"precip_today_in":"",
		"precip_today_metric":"--",
		"icon":"",
		"icon_url":"http://icons.wxug.com/i/c/k/nt_.gif",
		"forecast_url":"http://www.wunderground.com/global/stations/71393.html",
		"history_url":"http://www.wunderground.com/history/airport/CPCI/2016/10/26/DailyHistory.html",
		"ob_url":"http://www.wunderground.com/cgi-bin/findweather/getForecast?query=51.10861206,-114.01444244",
		"nowcast":""
	}


I am on shower cumulus plan and this issue makes my app unusable to users. Please help. 
Photo of Lucian Baciu

Lucian Baciu

  • 6 Posts
  • 1 Reply Like

Posted 2 years ago

  • 3

Be the first to post a reply!