Conditions from different cities in one country in one request

  • 7
  • Question
  • Updated 5 years ago
is there a way to get weather conditions from different cities in one country in one request ?

I want to display the temperatures from different cities on a map from a country.
Photo of joost_bijnens

joost_bijnens

  • 1 Post
  • 0 Reply Likes

Posted 6 years ago

  • 7
Photo of juanbond

juanbond

  • 20 Posts
  • 8 Reply Likes
According to the API docs, no. With that said, it's simple enough to do with code and multiple API requests. I totally agree, it would be really nice to be able to pass in multiple locations, much in the same way we can currently make multiple "feature" requests in one URL.
Photo of Alexbgreat

Alexbgreat

  • 3 Posts
  • 0 Reply Likes
Same problem here, except I need to make about 15 calls in a minute, 12 minimum, under the current api, about once per hour (My application generates a local weather video for a TV station), which isn't possible under my plan without using up raindrops. I would like to be able to grab about 8 cities worth of simple data (temp, wind, sky condition, nothing fancy) in one go. Obviously I can't deploy this until I figure out something, and moving up to even the drizzle level isn't possible (Drizzle is $300 a month for everything we need...our last provider charged only 900 a year, and that was still wayyyy too expensive to keep up for just a cable access channel)

I also looked into caching the data. It wouldn't be possible, as the app (it's built in flash) is restarted for each new copy of the video.
Photo of EIZSOFT

EIZSOFT

  • 17 Posts
  • 0 Reply Likes
we are facing the same problem also, our app is using about 40,000 request from only 4000 users and paying 300$ a mouth for that is too much..
Photo of Alexbgreat

Alexbgreat

  • 3 Posts
  • 0 Reply Likes
I'm sorry, that's nothing like my problem. I have one app...one user..strict (nearly unchangable) time constraints on downloading my data...and near zero monetization potential. Being able to exceed the minute rate, but not daily, would fix it too, but I wasn't going to ask about doing that. So combining several calls was my next choice.
I stay WELL under my daily count no matter what.

You, on the other hand, seem to have a userbase that is about 4000 times larger than mine, each user gives the potential to offset the cost of API access. Consider a new pricing model...free app...paid service, since you get your data exclusively from Wunderground. It's the cost of doing business.
Photo of WebGuruDave

WebGuruDave

  • 14 Posts
  • 0 Reply Likes
You can write your script to track the number of API calls and not go over.

I have 22 cities I'm getting data for, so my script grabs data for 8 cities at a time per minute until the whole list is processed. Essentially doing 8 api calls, waiting 65 seconds, doing 8 more api calls, waiting 65 seconds, etc.. until the complete city list is done. Right now the script takes roughly 3 minutes to execute and I run it every 15 minutes.
Photo of WunderWilliam

WunderWilliam

  • 267 Posts
  • 18 Reply Likes
The API provides one location per call, but you can combine requests into a single line (like current astronomy + forecast + conditions). Like this:

http://api.wunderground.com/api/____Y...

This will save some calls if you preemptively grab all of your app's supported features per location, even if the user has only asked for one of them. You can also cache results. This can save a great deal of calls if your users are primarily in the same overall area.