why isn't cxto available in the API call?

  • 1
  • Question
  • Updated 3 years ago
CXTO seems to be available on your site here , but when I try to call the API, it comes up as not available when using the call to  http://api.wunderground.com/api/.../conditions/q/cxto.json  Why is that?
Photo of ogg1e

ogg1e

  • 9 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1
Photo of Tim Roche

Tim Roche, Official Rep

  • 304 Posts
  • 26 Reply Likes
Good question! 

I've forwarded the issue to our database team.  
Photo of ogg1e

ogg1e

  • 9 Posts
  • 0 Reply Likes
Any update on this issue?
Photo of Tim Roche

Tim Roche, Official Rep

  • 304 Posts
  • 26 Reply Likes
Doing some research, it seems like CXTO is either outdated or unofficial. The official identifier for that airport would be cyyz.  
Photo of ogg1e

ogg1e

  • 9 Posts
  • 0 Reply Likes
Photo of ogg1e

ogg1e

  • 9 Posts
  • 0 Reply Likes
Photo of Mantas Kareiva

Mantas Kareiva

  • 2 Posts
  • 0 Reply Likes
Hello.
The same goes for Kaunas, Lithuania:

http://api.wunderground.com/api/<...>/conditions/q/LT/Kaunas.json

(/q/L1/Kaunas.joson gives the same result!)

Other Lithuanian cities I tried were OK. Kaunas's responce:


{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "conditions": 1
  }
		, "results": [
		{
		"name": "Kaunas",
		"city": "Kaunas",
		"state": "",
		"country": "L1",
		"country_iso3166":"LT",
		"country_name":"Lithuania",
		"zmw": "00000.1.WEYKA",
		"l": "/q/zmw:00000.1.WEYKA"
		}
		,
		{
		"name": "Kaunas",
		"city": "Kaunas",
		"state": "",
		"country": "L1",
		"country_iso3166":"LT",
		"country_name":"Lithuania",
		"zmw": "00000.1.26629",
		"l": "/q/zmw:00000.1.26629"
		}
		]
	}
}

and that is all. Althought I can find Kaunas here: 

http://www.wunderground.com/weather-forecast/zmw:00000.1.26629

:-)

Could this be a quick fix? Or am i doing something wrong?
(Edited)
Photo of Tim Roche

Tim Roche, Official Rep

  • 304 Posts
  • 26 Reply Likes
You must use the full country name, not LT
Photo of Mantas Kareiva

Mantas Kareiva

  • 2 Posts
  • 0 Reply Likes
Hello. Thank you for your reply.
Do you mean:
http://api.wunderground.com/api/<...>/forecast/q/Lithuania/Kaunas.json
?
It doesn't work either. Result is the same as if query would be
http://api.wunderground.com/api/<...>/conditions/q/LT/Kaunas.json

Does WU has more api references and examples, than 
http://www.wunderground.com/weather/api/d/docs
?
Because this one is quite meager... without explanations :-)

Everything is clear and simple until you encounter some misbehavior.
Photo of Tim Roche

Tim Roche, Official Rep

  • 304 Posts
  • 26 Reply Likes
Hi Mantas

I understand your frustration. We've kept documentation to a minimum in favor of self explanatory calls and responses, but occasionally we fall short.

In some cases, we can not figure out what city you want from a simple name search.  This is one of those cases.  In this case, you need to handle the multiple results by choosing one, and using the l: parameter
in your case
  • l: "/q/zmw:00000.1.26629"
your query would look like q/zmw:00000.1.26629.json
Photo of Tim Roche

Tim Roche, Official Rep

  • 304 Posts
  • 26 Reply Likes
additionally

this page
http://www.wunderground.com/weather/api/d/docs?d=data/index

Describes how to handle ambiguous results at the bottom.