Today we will be using the HTML5 geolocation API to present the user with a personalized weather forecast. Using jQuery, we will issue AJAX request to two of Yahoo's popular APIs to obtain additional geographical information and a weather forecast. This example also makes use of the wonderful.
Active1 year, 5 months ago
I created a google weather api which allowed a user to type in a city and get weather details back for 3 days.
Google have since shut this service down.
With yahoo api i need a WOEID to get the weatehr details. Is there a way for me to get weather from yahoo for 3 days and change a location to a WOEID in the process or should i look at alternative api. An example of what yahoo api requires is below.
closed as off-topic by Baum mit Augen♦, Gert Arnold, Martin James, AdrianHHH, SteveMar 25 '18 at 17:05
This question appears to be off-topic. The users who voted to close gave this specific reason:
'Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.' – Baum mit Augen, Gert Arnold, Martin James, AdrianHHH, Steve
If this question can be reworded to fit the rules in the help center, please edit the question.
6 Answers
I'm using OpenWeatherMap for my website. One alternative you may check out.
pierrepierre
I would strongly recommend using forecast.io, which is very easy to use APIs with rich weather data sources
Another good alternative would be the OpenWeatherMap. for any given location it offers the urrent conditions, the weather forcast and a very attractive interactive map.
The OpenWeatherMap offers historical data, although the list of available cities of the free weather data plan is limited. Unlike the Weather Underground API it allows for a lot more than 500 calls per day.
HispacarHispacar
You can check out this free weather API - https://www.mashape.com/george-vustrey/ultimate-weather-forecasts#!documentation
I'd look at an alternative. Getting the WOEID is complex (and changing to a pay-per search model), and Yahoo's API doesn't offer much more than the current conditions at the location.
The Weather Underground API is one that offers a fairly rich amount of history. However, if you exceed 500 calls/day, it will cost you at least $520 per month for their API access.
There are other weather APIs out there. Most history APIs are paid services. It pays to shop around for the best price for what you need.
If you're site is country-specific, your country may have a free data product. Look at the NOAA data services for the USA or the Met Office services in the UK for example.
You can use Metwit weather api. If you can implement them client-side: 200 request/day (ip based throttling) no authentication required. Worldwide coverage, JSON and REST compliant. You can register for extra API calls for free and if you still need it to call them server side the basic plan is pretty cheap.
Here a little example in jQuery: http://jsbin.com/isukam/1 that use our weather resource.