> For the complete documentation index, see [llms.txt](https://space-axolotls.gitbook.io/space-axolotls-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://space-axolotls.gitbook.io/space-axolotls-docs/api-documentation/test.md).

# USGS Earthquake Hazards Program API

This is a robust, publicly accessible API maintained by the United States Geological Survey (USGS). It provides detailed real-time and historical data on earthquakes occurring worldwide.

**Overview**

* Provider: U.S. Geological Survey (USGS)
* Purpose: To distribute information about seismic activity recorded by the global network of seismographs.
* Authentication: None required. It is a free and open API.
* Primary Data Format: GeoJSON (also available in KML, CSV, and XML).

**Main Endpoints**

The API has several endpoints. The most common is the real-time feed, which can be easily customized.

* Base URL for Feeds: `https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/{magnitude}_{timespan}.geojson`
  * `{magnitude}`: The minimum magnitude of earthquakes to display (e.g., `all`, `1.0`, `2.5`, `4.5`, `significant`).
  * `{timespan}`: The time period to query (e.g., `hour`, `day`, `week`, `month`).
* Example (Earthquakes in the last 24 hours, all magnitudes):

  ```
  https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson
  ```

**Advanced Search Endpoint**

For more specific queries, the `query` endpoint can be used.

* Base URL: `https://earthquake.usgs.gov/fdsnws/event/1/query`

**Common Search Parameters**

These can be added as parameters to the advanced search URL (e.g., `?format=geojson&starttime=...`).

| Parameter      | Description                                         | Example                                   |
| -------------- | --------------------------------------------------- | ----------------------------------------- |
| `format`       | The format of the response data.                    | `geojson`                                 |
| `starttime`    | Start date and time (ISO 8601 format).              | `2025-10-01`                              |
| `endtime`      | End date and time (ISO 8601 format).                | `2025-10-05T23:00:00`                     |
| `minmagnitude` | Minimum magnitude of the earthquake.                | `5.5`                                     |
| `latitude`     | Latitude for the center of the search.              | `19.4326`                                 |
| `longitude`    | Longitude for the center of the search.             | `-99.1332`                                |
| `maxradiuskm`  | Maximum radius in kilometers from the center point. | `500`                                     |
| `orderby`      | Sort the results.                                   | `time` (most recent first) or `magnitude` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://space-axolotls.gitbook.io/space-axolotls-docs/api-documentation/test.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
