tags:

views:

6670

answers:

6

Does anyone know of a service with an API or a widget that I could use to display weather based on geographical coordinates? I have only found ones for zipcodes.

Thanks!

+4  A: 

Google offers a Reverse Geocoder in their API you may be able to use to get the Zip code for a particular lat/long.

Weather.gov supports lat/long weather lookups, as well. They offer an API.

ceejayoz
+5  A: 

Weather Underground: http://wiki.wunderground.com/index.php/API_-_XML

Example: http://api.wunderground.com/auto/wui/geo/GeoLookupXML/index.xml?query=37.76834106,-122.39418793

jimyi
That's a nice find.
ceejayoz
I've found that wunderground goes down or times out quite often. just an fyi.
Frederico
+1  A: 

NOAA provides a forecast and current weather service based on latitude and longitude via SOAP, although I believe it's only for the US. It also appears that Google's undocumented Weather API may support longitude and latitude conditions (here's a blog post about it)

Zxaos
A: 

I have developed a weather forecast API which is in my opinion somewhat more flexible than existing technologies. The reason is that my application extracts and plots data from the 4-dimensional (time and space) weather forecast data files on the fly. Traditional API's simply make forecasts from a number of preselected stations available or are quite cumbersome to use. This means that my forecasts can be interpolated on the fly. One example is weather forecast time series at a specific point - they are interpolated to the point that you request. Another example is that you can request a forecast along a route in space and time. You can request either data or plots. The weather forecasts are mainly global forecasts from NOAA.

The API supports JSONP for cross domain data fetching (for mashups) and images can just be included using vanilla JavaScript.

That was the good parts. The bad part is that this service is in beta and will be so for some months to come and that the figures that are served are currently targetted "power weather users" (although I do plan to add more traditional figures with time - let me know what you need). You can however always request the data and create/use your own figures.

You can find a description of the API here:

World Wild Weather API

A: 

Google has a great unofficial XML API for this, example: http://www.google.com/ig/api?weather=,,,50500000,30500000

Mourner
I've never seen that representation for lat/lngs. Care to explain what it is or link to someplace that does? I'd really like to use gweather with lat/lngs.
Ben
It's just lat/lng multiplied by 1000000, so in the example above it's 50.5 lat and 30.5 long
Mourner
A: 

Try World Weather Online to get current weather and weather forecast via. Latitude/Longitude, Zipcode and Postcode absolutely free.

Andrew
Specifically: http://www.worldweatheronline.com/weather-api.aspx
Charlie Salts