GnistAI GnistAI
Log in

Earthquakes (USGS)

Recent and historical earthquake data — magnitude, location, depth, and alerts.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 4 tools tools 4 4 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Environment

Data source: USGS Earthquake Hazards

MCP Endpoint (Streamable HTTP) https://context.gnist.ai/mcp/earthquakes/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (4)

search_earthquakes

Search earthquakes from the USGS seismic event database.

Query by magnitude range, date range, geographic bounding box, and depth.
Data is sourced from the USGS Earthquake Hazards Program and updated every minute.

Args:
min_magnitude: Minimum magnitude (e.g. 4.5 for significant quakes).
max_magnitude: Maximum magnitude.
start_time: Start date/time in ISO 8601 (e.g. "2024-01-01" or "2024-01-01T00:00:00").
end_time: End date/time in ISO 8601.
min_latitude: Southern boundary (-90 to 90).
max_latitude: Northern boundary (-90 to 90).
min_longitude: Western boundary (-180 to 180).
max_longitude: Eastern boundary (-180 to 180).
min_depth: Minimum depth in km.
max_depth: Maximum depth in km.
limit: Maximum results to return (1-200, default 20).
order_by: Sort order — "time" (newest first), "time-asc", "magnitude", "magnitude-asc".

Returns:
Dict with 'count' and 'results' list of earthquakes. Each earthquake includes
magnitude, location (place, lat/lon), depth, time, alert level, tsunami flag,
and a USGS detail URL.

ParameterTypeRequiredDescription
min_magnitudeanyoptionalMinimum magnitude (e.g. 4.5 for significant quakes).
max_magnitudeanyoptionalMaximum magnitude.
start_timeanyoptionalStart date/time in ISO 8601 (e.g. "2024-01-01" or "2024-01-01T00:00:00").
end_timeanyoptionalEnd date/time in ISO 8601.
min_latitudeanyoptionalSouthern boundary (-90 to 90).
max_latitudeanyoptionalNorthern boundary (-90 to 90).
min_longitudeanyoptionalWestern boundary (-180 to 180).
max_longitudeanyoptionalEastern boundary (-180 to 180).
min_depthanyoptionalMinimum depth in km.
max_depthanyoptionalMaximum depth in km.
limitintegeroptionalMaximum results to return (1-200, default 20). (default: 20)
order_bystringoptionalSort order — "time" (newest first), "time-asc", "magnitude", "magnitude-asc". (default: "time")
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_earthquakes",
    "arguments": {}
  }
}
get_earthquake

Get detailed information about a specific earthquake by its USGS event ID.

Args:
event_id: The USGS event identifier (e.g. "us7000n7q6").

Returns:
Dict with earthquake details including magnitude, location, depth, time,
felt reports count, alert level (green/yellow/orange/red), tsunami flag,
and the USGS detail URL. Returns an error if the event is not found.

ParameterTypeRequiredDescription
event_idstringrequiredThe USGS event identifier (e.g. "us7000n7q6").
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_earthquake",
    "arguments": {
      "event_id": "example"
    }
  }
}
latest_earthquakes

Get the latest significant earthquakes globally or near a specific location.

By default returns recent M4.5+ earthquakes worldwide. Optionally filter
to a specific area by providing a center point and radius.

Args:
min_magnitude: Minimum magnitude threshold (default 4.5).
limit: Maximum results to return (1-100, default 10).
latitude: Center latitude for geographic filter (-90 to 90). Requires longitude.
longitude: Center longitude for geographic filter (-180 to 180). Requires latitude.
max_radius_km: Search radius in kilometers from the center point (default 500 if lat/lon given).

Returns:
Dict with 'count' and 'results' list of recent earthquakes sorted by time (newest first).

ParameterTypeRequiredDescription
min_magnitudenumberoptionalMinimum magnitude threshold (default 4.5). (default: 4.5)
limitintegeroptionalMaximum results to return (1-100, default 10). (default: 10)
latitudeanyoptionalCenter latitude for geographic filter (-90 to 90). Requires longitude.
longitudeanyoptionalCenter longitude for geographic filter (-180 to 180). Requires latitude.
max_radius_kmanyoptionalSearch radius in kilometers from the center point (default 500 if lat/lon given).
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "latest_earthquakes",
    "arguments": {}
  }
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "report_feedback",
    "arguments": {
      "feedback": "example"
    }
  }
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/mcp/earthquakes/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_earthquake", "arguments": {"event_id": "example"}}}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/earthquakes/",
    headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_earthquake",
    "arguments": {
      "event_id": "example"
    }
  }
},
)
print(resp.json())

Related Toolkits (Environment)

Resources