GSIN API Documentation
Real-time global seismic intelligence, stress-field modeling, and forecasting data via RESTful and WebSocket interfaces.
Quick Start
Authentication Required
All API endpoints require an API key. Include your key in theX-API-Keyheader for all requests.
Real-time data from USGS, EMSC, JMA, GFZ, and 50+ seismic networks
Event data updated within 250ms of source publication
99.9% uptime SLA, rate limiting, webhook callbacks
Core Endpoints
/events/recentRecent Seismic Events
Retrieve the latest earthquake events from the global network.
limitintegerNumber of events to return (1-1000, default: 100)
min_magnitudefloatMinimum magnitude filter (default: 2.5)
start_timeISO8601Filter events after this timestamp
end_timeISO8601Filter events before this timestamp
regionstringGeographic region code (e.g., 'asia-pacific', 'americas')
{
"events": [
{
"id": "us7000kx3e",
"timestamp": "2025-11-07T14:32:18Z",
"latitude": 35.6762,
"longitude": 139.6503,
"depth_km": 12.4,
"magnitude": 5.7,
"magnitude_type": "Mw",
"location": "Tokyo Bay, Japan",
"source": "JMA",
"status": "reviewed"
}
],
"count": 1,
"timestamp": "2025-11-07T14:35:42Z"
}/events/{event_id}Event Details
Get comprehensive information about a specific seismic event.
event_idstringrequiredUnique event identifier
{
"event": {
"id": "us7000kx3e",
"timestamp": "2025-11-07T14:32:18Z",
"location": {
"latitude": 35.6762,
"longitude": 139.6503,
"depth_km": 12.4,
"description": "Tokyo Bay, Japan"
},
"magnitude": {
"value": 5.7,
"type": "Mw",
"uncertainty": 0.2
},
"felt_reports": 1247,
"intensity": "VII (Very Strong)",
"source": "JMA",
"phases": {
"p_wave": "2025-11-07T14:32:18.234Z",
"s_wave": "2025-11-07T14:32:22.891Z"
}
}
}/stress/regionRegional Stress Fields
Retrieve 3D crustal stress modeling data for a specified region.
regionstringrequiredRegion identifier (e.g., 'ring-of-fire-west')
resolutionstringGrid resolution: 'low' (64³), 'medium' (128³), 'high' (256³)
timestampISO8601Specific timestamp (default: latest)
{
"region": "ring-of-fire-west",
"timestamp": "2025-11-07T14:00:00Z",
"resolution": [128, 128, 128],
"bounds": {
"lat_min": 20.0,
"lat_max": 50.0,
"lon_min": 120.0,
"lon_max": 150.0,
"depth_max_km": 700
},
"stress_field": {
"url": "https://cdn.gsin.dev/stress/2025-11-07/ring-of-fire-west.h5",
"format": "HDF5",
"size_mb": 142.3
},
"anomalies_detected": 3,
"forecast_confidence": 0.87
}/forecast/regionsForecast Hotspots
Get current stress accumulation forecasts and high-risk regions.
thresholdfloatMinimum forecast confidence (0.0-1.0, default: 0.7)
timeframestringForecast window: '24h', '72h', '7d' (default: '72h')
{
"forecasts": [
{
"region": "Philippine Trench",
"coordinates": {
"latitude": 12.5,
"longitude": 127.3
},
"confidence": 0.84,
"magnitude_range": [5.5, 6.2],
"timeframe": "48-72 hours",
"stress_accumulation_index": 0.91,
"last_major_event": "2024-08-15T03:21:00Z",
"historical_pattern_match": "2018-07-22 M6.1 sequence"
}
],
"generated_at": "2025-11-07T14:35:42Z"
}/swarms/activeActive Earthquake Swarms
Detect and monitor ongoing earthquake swarm sequences.
min_eventsintegerMinimum events in cluster (default: 5)
max_age_hoursintegerMaximum swarm age in hours (default: 72)
{
"swarms": [
{
"id": "swarm_2025_1107_ph01",
"status": "active",
"region": "Philippines East Coast",
"centroid": {
"latitude": 14.2,
"longitude": 125.8
},
"event_count": 23,
"duration_hours": 18.5,
"magnitude_range": [3.2, 5.1],
"largest_event": {
"magnitude": 5.1,
"timestamp": "2025-11-07T08:14:32Z"
},
"classification": "normal_swarm",
"forecast_mainshock_probability": 0.42
}
]
}/webhooks/subscribeWebhook Subscriptions
Subscribe to real-time event notifications via webhooks.
urlstringrequiredYour webhook endpoint URL
event_typesarrayEvent types to subscribe to: ['earthquake', 'forecast', 'swarm']
min_magnitudefloatMinimum magnitude threshold (default: 4.0)
regionsarraySpecific regions to monitor (empty = global)
{
"subscription_id": "sub_a1b2c3d4e5f6",
"status": "active",
"created_at": "2025-11-07T14:35:42Z",
"config": {
"url": "https://your-domain.com/webhook",
"event_types": ["earthquake", "forecast"],
"min_magnitude": 5.0,
"regions": ["asia-pacific"]
}
}WebSocket Streaming
Connect to real-time seismic event streams with sub-second latency. Perfect for dashboards, monitoring systems, and real-time alerting.
Connection Endpoint
Send API key as first message after connection:
- • Sub-second event delivery
- • Automatic reconnection
- • Filtered event streams
- • Binary data support (HDF5)
- • Max 5 concurrent connections
- • 1000 messages/minute
- • Auto-throttle on overload
- • Enterprise plans: unlimited
Rate Limits & Authentication
API Key Tiers
| Tier | Requests/Hour | WebSocket Connections | Data Export |
|---|---|---|---|
| Free | 100 | 1 | CSV only |
| Developer | 1,000 | 3 | CSV, JSON, HDF5 |
| Professional | 10,000 | 10 | All formats + Raw |
| Enterprise | Unlimited | Unlimited | Custom pipelines |
Getting an API Key
Free tier keys are available immediately. Developer and Professional tiers require verification. Enterprise deployments include dedicated support.
Request API KeyHTTP Response Codes
Request successful
Invalid parameters or malformed request
Missing or invalid API key
API key valid but lacks permission for this endpoint
Too many requests, retry after specified time
Server error, please retry or contact support
Temporary downtime for maintenance
Code Examples
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://api.gsin.dev/v1"
headers = {"X-API-Key": API_KEY}
# Get recent earthquakes
response = requests.get(
f"{BASE_URL}/events/recent",
headers=headers,
params={"min_magnitude": 5.0, "limit": 50}
)
events = response.json()["events"]
for event in events:
print(f"{event['magnitude']} - {event['location']}")const API_KEY = "your_api_key_here";
const BASE_URL = "https://api.gsin.dev/v1";
async function getRecentEvents() {
const response = await fetch(
`${BASE_URL}/events/recent?min_magnitude=5.0&limit=50`,
{
headers: { "X-API-Key": API_KEY }
}
);
const data = await response.json();
return data.events;
}
getRecentEvents().then(events => {
events.forEach(event => {
console.log(`${event.magnitude} - ${event.location}`);
});
});# Get recent earthquakes
curl -H "X-API-Key: your_api_key_here" \
"https://api.gsin.dev/v1/events/recent?min_magnitude=5.0&limit=50"
# Get specific event details
curl -H "X-API-Key: your_api_key_here" \
"https://api.gsin.dev/v1/events/us7000kx3e"
# Subscribe to webhooks
curl -X POST -H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"url": "https://your-domain.com/webhook", "event_types": ["earthquake"], "min_magnitude": 6.0}' \
"https://api.gsin.dev/v1/webhooks/subscribe"Support & Resources
Technical Support
Need help integrating the API? Our engineering team provides direct support for all paid tiers.
api@gsin.dev →Documentation Updates
API documentation is continuously updated. Subscribe to our changelog for breaking changes and new features.
View Changelog →SDKs & Libraries
Official client libraries for Python, JavaScript, Go, and R coming Q2 2026.
GitHub Repository →System Status
Real-time API status, uptime monitoring, and scheduled maintenance windows.
View Status Page →