Skip to main content
Fetches complete details for a single earthquake event using its unique event identifier. This endpoint is ideal for retrieving full details about a specific event and deep-dive analysis.

Endpoint

Method: GET
Path: /v1/earthquakes/eventId
Authentication: Not required

Parameters

eventId
integer
required
Unique earthquake event identifier.Validation:
  • Must be a valid integer
  • Must exist in the current year’s earthquake database
  • Returns 404 error if not found: “No event found with ID

Request Example

curl "https://api.terraquakeapi.com/v1/earthquakes/eventId?eventId=44278572"

Response

success
boolean
Indicates if the request was successful
code
integer
HTTP status code (200 for success, 404 if not found)
status
string
HTTP status message (“OK” for success, “Not Found” if event doesn’t exist)
message
string
Human-readable message. Format: “Earthquakes event with id
payload
array
Array containing a single GeoJSON Feature object with complete earthquake details:Properties:
  • eventId (integer) - Unique event identifier (matches query parameter)
  • originId (integer) - Origin identifier from INGV
  • time (string) - ISO 8601 timestamp of earthquake occurrence
  • author (string) - Reporting agency/organization
  • magType (string) - Magnitude type (ML, Mw, Mb, Ms)
  • mag (float) - Magnitude value
  • magAuthor (string) - Magnitude determination author
  • type (string) - Event type (“earthquake”)
  • place (string) - Human-readable location description
  • version (integer) - Event data version number
  • geojson_creationTime (string) - GeoJSON creation timestamp
Geometry:
  • type (string) - Always “Point”
  • coordinates (array) - [longitude, latitude, depth in km]
meta
object
Request metadata containing method, path, and timestamp

Response Example

{
  "success": true,
  "code": 200,
  "status": "OK",
  "message": "Earthquakes event with id 44278572",
  "payload": [
    {
      "type": "Feature",
      "properties": {
        "eventId": 44278572,
        "originId": 140102761,
        "time": "2025-09-26T19:33:46.440000",
        "author": "SURVEY-INGV",
        "magType": "ML",
        "mag": 1,
        "magAuthor": "--",
        "type": "earthquake",
        "place": "Costa Calabra sud-orientale (Reggio di Calabria)",
        "version": 100,
        "geojson_creationTime": "2025-11-06T00:52:30"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [16.2387, 37.9982, 10.5]
      }
    }
  ],
  "meta": {
    "method": "GET",
    "path": "/v1/earthquakes/eventId?eventId=44278572",
    "timestamp": "2025-11-06T00:52:31.974Z"
  }
}

Error Responses

Event Not Found

{
  "success": false,
  "code": 404,
  "status": "Not Found",
  "message": "No event found with ID 44278572"
}

Implementation Details

  • Search Scope: Searches events from start of current year to today
  • Filter Logic: feature.properties.eventId === parseInt(eventId)
  • Return Format: Single-item array in payload (maintains consistency with other endpoints)
  • Event ID Type: Converted to integer for comparison
  • Data Source: INGV API with format=geojson
  • Metrics: Increments event counter by 1 when found

Use Cases

  • Retrieve complete details for a specific earthquake
  • Deep-dive analysis of individual seismic events
  • Event tracking and monitoring
  • Reference lookups from other systems
  • Event detail pages in applications
  • Historical event research

How to Find Event IDs

Event IDs can be obtained from:
  1. Other API endpoints (all return eventId in response)
  2. INGV official reports and bulletins
  3. Seismic monitoring dashboards
  4. Previous API queries
// Step 1: Get specific event details
const eventResponse = await fetch(
  'https://api.terraquakeapi.com/v1/earthquakes/eventId?eventId=44278572'
);
const eventData = await eventResponse.json();

if (eventData.success) {
  const event = eventData.payload[0];
  const [lon, lat] = event.geometry.coordinates;
  
  // Step 2: Find nearby earthquakes using location endpoint
  const nearbyResponse = await fetch(
    `https://api.terraquakeapi.com/v1/earthquakes/location?` +
    `latitude=${lat}&longitude=${lon}&radius=50`
  );
  const nearbyData = await nearbyResponse.json();
  
  console.log(`Found ${nearbyData.totalEarthquakes} earthquakes within 50km`);
}

Field Descriptions

Event Properties

  • eventId: Unique identifier assigned by INGV
  • originId: Origin/source identifier for event determination
  • time: Exact timestamp when earthquake occurred (UTC)
  • author: Agency that determined event parameters (e.g., “SURVEY-INGV”)
  • magType: Type of magnitude scale used:
    • ML: Local Magnitude (Richter)
    • Mw: Moment Magnitude
    • Mb: Body Wave Magnitude
    • Ms: Surface Wave Magnitude
  • mag: Magnitude value on specified scale
  • magAuthor: Agency/system that calculated magnitude
  • type: Event classification (typically “earthquake”)
  • place: Human-readable location description
  • version: Data revision version number
  • geojson_creationTime: When GeoJSON was generated

Geometry

  • coordinates[0]: Longitude (East-West position, -180 to 180)
  • coordinates[1]: Latitude (North-South position, -90 to 90)
  • coordinates[2]: Depth below surface in kilometers

Build docs developers (and LLMs) love