Endpoint
Method: GETPath:
/v1/earthquakes/magnitudeAuthentication: Not required
Parameters
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.”
Page number for pagination. Must be a positive integer greater than 0.Validation:
- Must be > 0
- Returns 400 error if invalid
Number of results per page. Must be a positive integer greater than 0.Validation:
- Must be > 0
- Returns 400 error if invalid
Sort order for results. Prefix with
- for descending order.Allowed values:timeor-time(default: descending)magnitudeor-magnitudedepthor-depth
Comma-separated list of fields to include in response.Allowed values:
timemagnitudedepthplacecoordinates
Request Example
Response
Indicates if the request was successful
HTTP status code (200 for success)
HTTP status message (“OK” for success)
Human-readable message. Format: “Earthquake events with magnitude > ”
Array of GeoJSON Feature objects. Magnitude is stored in
properties.magRequest metadata containing method, path, and timestamp
Total count of earthquakes with magnitude greater than specified value
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=timeandformat=geojson
Magnitude Scale Reference
Micro (< 2.0)
Micro (< 2.0)
Not usually felt by people. Detected by seismographs. Occurs millions of times per year.
Minor (2.0 - 3.9)
Minor (2.0 - 3.9)
Often felt but rarely causes damage. Occurs hundreds of thousands of times per year.
Light (4.0 - 4.9)
Light (4.0 - 4.9)
Noticeable shaking of indoor objects. Minor damage to buildings. Occurs tens of thousands of times per year.
Moderate (5.0 - 5.9)
Moderate (5.0 - 5.9)
Can cause damage to poorly constructed buildings. Slight damage to well-designed buildings. Occurs thousands of times per year.
Strong (6.0 - 6.9)
Strong (6.0 - 6.9)
Destructive in populated areas up to 160 km away. Occurs about 100-150 times per year.
Major (7.0 - 7.9)
Major (7.0 - 7.9)
Serious damage over large areas. Strong to violent shaking. Occurs about 10-20 times per year.
Great (8.0+)
Great (8.0+)
Can cause catastrophic damage over vast areas. Occurs about once per year or less.
Magnitude Types
The API returns different magnitude types in themagType 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
Related Endpoints
- By Depth - Filter by depth
- By Date Range - Custom date range with magnitude filter
- Recent Earthquakes - Year-to-date events