Skip to main content
Fetches earthquake events with magnitude greater than a specified value. This endpoint is ideal for filtering significant earthquakes and analyzing major seismic events.

Endpoint

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

Parameters

number
required
Minimum magnitude threshold. Returns earthquakes with magnitude > this value.Validation:
  • Must be a positive number > 0
  • Returns 400 error if missing: “The ‘mag’ parameter is required and must be a positive number greater than 0.”
  • Returns 400 error if invalid: “The ‘mag’ parameter must be a positive number greater than 0.”
integer
default:"1"
Page number for pagination. Must be a positive integer greater than 0.Validation:
  • Must be > 0
  • Returns 400 error if invalid
integer
default:"50"
Number of results per page. Must be a positive integer greater than 0.Validation:
  • Must be > 0
  • Returns 400 error if invalid
string
default:"-time"
Sort order for results. Prefix with - for descending order.Allowed values:
  • time or -time (default: descending)
  • magnitude or -magnitude
  • depth or -depth
string
Comma-separated list of fields to include in response.Allowed values:
  • time
  • magnitude
  • depth
  • place
  • coordinates

Request Example

Response

boolean
Indicates if the request was successful
integer
HTTP status code (200 for success)
string
HTTP status message (“OK” for success)
string
Human-readable message. Format: “Earthquake events with magnitude > ”
array
Array of GeoJSON Feature objects. Magnitude is stored in properties.mag
object
Request metadata containing method, path, and timestamp
integer
Total count of earthquakes with magnitude greater than specified value
object
Pagination details with page, limit, totalPages, and hasMore

Response Example

Error Responses

Missing Magnitude Parameter

Invalid Magnitude Value

Invalid Pagination

Implementation Details

  • Filter Logic: feature.properties.mag > magValue (strictly greater than)
  • Date Range: From start of current year to today
  • Filtering: Applied after fetching all events from INGV (client-side filtering)
  • Sorting: Default sort is by time (most recent first: -time)
  • Pagination: Manual pagination applied after magnitude filtering
  • Data Source: INGV API with orderby=time and format=geojson

Magnitude Scale Reference

Not usually felt by people. Detected by seismographs. Occurs millions of times per year.
Often felt but rarely causes damage. Occurs hundreds of thousands of times per year.
Noticeable shaking of indoor objects. Minor damage to buildings. Occurs tens of thousands of times per year.
Can cause damage to poorly constructed buildings. Slight damage to well-designed buildings. Occurs thousands of times per year.
Destructive in populated areas up to 160 km away. Occurs about 100-150 times per year.
Serious damage over large areas. Strong to violent shaking. Occurs about 10-20 times per year.
Can cause catastrophic damage over vast areas. Occurs about once per year or less.

Magnitude Types

The API returns different magnitude types in the magType field:
  • ML (Local Magnitude / Richter Scale) - Best for nearby earthquakes
  • Mw (Moment Magnitude) - Most accurate for large earthquakes
  • Mb (Body Wave Magnitude) - Based on body waves
  • Ms (Surface Wave Magnitude) - Based on surface waves

Use Cases

  • Filter for significant earthquakes only
  • Analyze major seismic events
  • Create alerts for high-magnitude earthquakes
  • Research and statistical analysis
  • News and media earthquake reporting

Example Queries