Get All Alerts #717
-
I would like to pull all the alerts in a single query to populate the alert system in our application. Right now, I see around 350 active alerts and there's little weather. I can see alert counts going above 500. I tried using the limit=1000 parameter and it was rejected. The documentation says 500 is the default. The error code says 500 is the maximum. So how do I pull the entire list of alerts? It's not an issue if it takes several requests but it does make it more complicated. Thanks! (RadarNow!) Edit: I may have found my own answer. Use a start time. I think this will solve it nicely. Decoded: (do not click) Encoded: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Set the limit really low. You'll get a "pagination" property in the response. Follow the provided link. Here's an excerpt from https://api.weather.gov/alerts?limit=5
|
Beta Was this translation helpful? Give feedback.
-
Currently the limit applies to /alerts with a max of 500 (default). /alerts/active does not currently use the limit feature (it will return all active alerts even if more than 500 and the limit filter can't be used either). |
Beta Was this translation helpful? Give feedback.
Set the limit really low. You'll get a "pagination" property in the response. Follow the provided link.
Here's an excerpt from https://api.weather.gov/alerts?limit=5