Search code examples
phpapiwunderground

Weather Underground API: Querying API by IP


I'm building a Weather class that is allowed to search by IP address. I am trying to implement the Wunderground API as one of the options to use. But, I can't seem to find a way to query the API with an IP address. I've tried this: autocomplete.wunderground.com/aq?query={IP ADDRESS HERE} -- but as you can see, it finds no results. Any tips on going about this problem?

Thanks!


Solution

  • Try http://api.wunderground.com/api/Your_Key/forecast/geolookup/conditions/q/autoip.json?geo_ip=Your_IP, instead.

    See link for more details: http://www.wunderground.com/weather/api/d/docs?d=data/index.