How often is the API updated?

  • 5
  • Question
  • Updated 5 years ago
I'd like to know how often current weather conditions are updated in the API.
Photo of david

david

  • 1 Post
  • 0 Reply Likes
  • hopeful

Posted 7 years ago

  • 5
Photo of juanbond

juanbond

  • 20 Posts
  • 8 Reply Likes
I would guess that it depends on the weather station you're requesting conditions from. Judging by the main website, some of the stations report observations every few seconds, and some only once an hour. Hopefully one of the API developers can shed some more light on this, though. Maybe they limit the refresh frequency...
Photo of Alex K

Alex K

  • 14 Posts
  • 0 Reply Likes
Specifically, I want to get the current weather, and if the location hasn't changed - only request new data at an interval that matches the max(my own limit,weather station observation interval). That way I'm not asking for info over and over that hasn't changed.
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
Each observation station has different update times. Personal Weather Stations update as frequently as every 2.5 seconds. National Weather Service (airports) update about once an hour in good weather, more frequently in bad weather. And some locations outside the United States only update every 3 hours. If you wanted to schedule update retrievals you could do them every 5 or 15 minutes and then you'll always have the most current data.
Photo of Alex K

Alex K

  • 14 Posts
  • 0 Reply Likes
Hi Brendan - we're doing 15 minutes right now, but we also know that we're wasting a bunch of our API hits by doing this. We're right at the 100,000 daily usage mark and that takes us from $300 to $1000 - a big jump.

We'd rather update 15 minutes for the often updating stations and 1-3 hours for the national ones if we're not going to get any new data. That would substantially help us keep costs down.

That's why it'd be nice to get this kind of info in the feed.
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
At the moment there isn't any data point that gives the update frequency, we don't have that on our site either. But something you could do is check the length of station_id because if the values is 4 characters long, it is an airport and probably updating every hour. If its longer than 4 then its a personal weather station and updating more frequently. For instance, this is the results for San Francisco Airport = station_id: "KSFO",