Make your first API request
Retrieve a small set of earthquake records and understand the response.
Before you start
You need an Upperblue account with appropriate API permission and an API key from the account page. An account does not automatically grant every dataset. Store your key in your own secret environment; keep it out of public source and browser bundles.
Send a small request
This example asks for up to ten most recent available earthquake records from one catalogue. It does not fabricate measurements or assume a non-empty result.
curl --fail-with-body \
-H "X-API-Key: $UPPERBLUE_API_KEY" \
'https://api.upperblue.com/geodynamics/quakes?source_system=seiscomp&event_type=earthquake&limit=10&sort=event_time:desc'Read the response
- Check the HTTP status before interpreting the data.
datacontains the records.limitis the requested page size andoffsetits position.event_timeis the event time;magnitudeis the recorded magnitude. Inspect provenance, review status and missing values.totaldescribes matching records for the filters. Ten displayed records are not a count of all earthquake activity.
If there are no records
A successful response with an empty data array is different from a failed or denied request. Check filters and access before changing the query. Different catalogues can describe the same physical event; this example uses one catalogue to keep its scope clear.
Next step
Choose a fixed interval and page through results. Exact endpoint and parameter definitions remain in the API reference.