Forecast API error for Montevideo, Uruguay

  • 2
  • Problem
  • Updated 1 year ago
I have an app which show Montevideo,Uruguay whether conditions every day, since last Friday, the api call return an extrange JSON for this city.

try your self: http://api.wunderground.com/api/YOUR_API_KEY/satellite/q/UY/Montevideo.json


{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "geolookup": 1
  ,
  "conditions": 1
  ,
  "forecast": 1
  }
		, "results": [
		{
		"name": "Montevideo",
		"city": "Montevideo",
		"state": "CA",
		"country": "UY",
		"country_iso3166":"UY",
		"country_name":"Uruguay",
		"zmw": "00000.1.86580",
		"l": "/q/zmw:00000.1.86580"
		}
		,
		{
		"name": "Montevideo",
		"city": "Montevideo",
		"state": "MO",
		"country": "UY",
		"country_iso3166":"UY",
		"country_name":"Uruguay",
		"zmw": "00000.2.86585",
		"l": "/q/zmw:00000.2.86585"
		}
		]
	}
}


in the other hand, with an other city, return a correct JSON.

{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "geolookup": 1
  ,
  "conditions": 1
  ,
  "forecast": 1
  }
	}
		,	"location": {
		"type":"INTLCITY",
		"country":"UY",
		"country_iso3166":"UY",
		"country_name":"Uruguay",
		"state":"CA",
		"city":"Canelones",
		"tz_short":"-03",
		"tz_long":"America/Montevideo",
		"lat":"-34.52000046",
		"lon":"-56.27999878",
		"zip":"00000",
		"magic":"3",
		"wmo":"86575",
		"l":"/q/zmw:00000.3.86575",
		"requesturl":"global/stations/86575.html",
		"wuiurl":"https://www.wunderground.com/global/stations/86575.html",
		"nearby_weather_stations": {
		"airport": {
		"station": [
		{ "city":"Melilla", "state":"", "country":"Uruguay", "icao":"SUAA", "lat":"-34.78833389", "lon":"-56.26166534" }
		,{ "city":"Melilla", "state":"", "country":"UY", "icao":"SUAA", "lat":"-34.77999878", "lon":"-56.25000000" }
		,{ "city":"Montevideo", "state":"", "country":"UY", "icao":"SUMU", "lat":"-34.83000183", "lon":"-56.00000000" }
		]
		}
		,
		"pws": {
		"station": [
		{
		"neighborhood":"Amateur Radio CX2DAJ",
		"city":"Santa Lucía",
		"state":"DEPARTAMENTO DE CANELONES",
		"country":"UY",
		"id":"IDEPARTA51",
		"lat":-34.454487,
		"lon":-56.387272,
		"distance_km":12,
		"distance_mi":7
		},
		{
		"neighborhood":"Melilla",
		"city":"Montevideo",
		"state":"",
		"country":"UY",
		"id":"IMONTEVI32",
		"lat":-34.742283,
		"lon":-56.307693,
		"distance_km":24,
		"distance_mi":14
Photo of Nicolás Moraes

Nicolás Moraes

  • 3 Posts
  • 1 Reply Like
  • bad

Posted 1 year ago

  • 2
Photo of John Webb

John Webb

  • 2 Posts
  • 1 Reply Like
Photo of Nicolás Moraes

Nicolás Moraes

  • 3 Posts
  • 1 Reply Like
Problem resolve: this is the explication from support team:

Hello,
When the API location query does not produce an exact location match, a results array will be present in the JSON response.
Example:
http://api.wunderground.com/api/_YOUR_KEY_/geolookup/forecast/q/Allentown.json
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
We're looking into a solution that won't require anything on your end (it will default to the most popular city), but that will take some time for us to release the update.


good look, please follow my weather app via twitter @botdororthy.

cheers.
Photo of moater11

moater11

  • 46 Posts
  • 8 Reply Likes
Thanks for update. any indication from WU on the fix ETA?
Photo of John Webb

John Webb

  • 2 Posts
  • 1 Reply Like
Thank you Nicolás for the update.

I still don't get why this should be broken when it was working before. They must have changed something without being aware of the repercussions, or perhaps the city lookup database got broken. I'm going to apply the zmw code for now.

Much Thanx! -JWebb
Photo of moater11

moater11

  • 46 Posts
  • 8 Reply Likes
Thanks for update. any indication from WU on the fix ETA?