[Realtime-feeds] Rate Limiting

Fee, Jeremy M jmfee at usgs.gov
Mon Jan 10 20:28:59 UTC 2022


Hello,

We recently implemented rate-limiting for the USGS Earthquake Feeds and FDSN Event Web Service.  These changes are intended to improve availability for all users.
https://earthquake.usgs.gov/earthquakes/feed/v1.0/
https://earthquake.usgs.gov/fdsnws/event/1/

If you exceed the rate limit, you will receive a "429 Too May Requests" HTTP response.


- Feeds and API responses are cached for 60 seconds

Checking more frequently will not return new data any faster.
The "Expires" http response header is the earliest time another request will potentially include new data.

Note that many events outside the US are not reported until 15+ minutes after origin time.
https://earthquake.usgs.gov/earthquakes/map/?about=true&help=missing


- Feeds and API responses support compression.

Compressed responses are 70+% smaller and significantly faster.

The http request header "accept-encoding: gzip" enables a gzip compressed response.
The curl argument "--compressed" includes the request header and decompressed the response automatically.


- Properties in the summary feed should be used to reduce details requests:

"updated" is a timestamp that changes when an event has new information
If the updated property has not changed since a previous details request, there are no changes since the previous request.
https://earthquake.usgs.gov/data/comcat/index.php#updated

"types" is a comma separated list of information available for an event
If the types property does not include "shakemap" then there is no ShakeMap product for the event.
https://earthquake.usgs.gov/data/comcat/index.php#types


Please contact Lynda Lastowka <llastowka at usgs.gov> and/or Jeremy Fee <jmfee at usgs.gov> with any questions or concerns.


Thanks,

--
Jeremy Fee (he/him)
Computer Scientist
USGS Geologic Hazards Science Center, Golden, CO









More information about the Realtime-feeds mailing list