Replies: 1 comment 2 replies
-
NWS API uses a caching layer and re-requesting data before the 'expires' time will simply return the same data you already have. The expiration time is set per endpoint (i.e., forecasts have a longer The exact rate limits are unpublished, but are generally liberal enough to handle the majority of use cases. Once or twice a minute isn't going to run into any issues. Product expiration time (from CAP data or the WMO header) is unrelated. It would have to be attached to a specific issuance of a specific product, and would also get tripped up by corrections. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
To whom it may concern:
HTTP GET requests to api.weather.gov/alerts/active return a "expires" response header which is usually 30 - 45 seconds in the future.
Is this a significant value which actually takes the maximum of active advisories' "Product Expiration Time" (NWS Directive 10-1701 § 3.9.2), or is it a random refresh interval?
Is it acceptable use for our ingest script, running on a single server, to poll this endpoint as fast as the next "expires" interval? If not, is there more concrete information about rate limit compliance? We wouldn't need faster than this, but it appears the preferred method of letting "expires" response header dictate next request would lead to an average cadence of about 30 seconds, which I want to ensure is acceptable for a single 24/7 server to poll.
We are developing a real-time service and already have NWWS integrated, but we love the highly refined parsing that api.weather.gov offers, and seek to implement a dual-source solution. By having 1-3 centralized servers polling/ingesting NWS resources we seek to reduce overall system efficiency by eliminating direct weather.gov access in our client apps.
Kind regards
Beta Was this translation helpful? Give feedback.
All reactions