Skip to main content

Endpoint

GET https://api.terraquakeapi.com/stations/geojson

Description

Returns the complete list of INGV seismic monitoring stations formatted as GeoJSON FeatureCollection. This endpoint is optimized for mapping applications, GIS integration, and spatial visualization libraries like Mapbox, Leaflet, and Google Maps. Each station is represented as a GeoJSON Point Feature with 3D coordinates (longitude, latitude, elevation) and essential metadata in the properties object.

Use Cases

  • Interactive Maps: Display stations on web maps (Mapbox, Leaflet, Google Maps)
  • GIS Analysis: Import into QGIS, ArcGIS, or other GIS software
  • Spatial Queries: Perform geometric operations and spatial filtering
  • Data Visualization: Create heatmaps, cluster maps, and coverage visualizations
  • Mobile Apps: Integrate with mobile mapping SDKs

Parameters

limit
integer
default:"50"
Number of station features to return per page. Must be a positive integer greater than 0.Maximum: 1000Example: ?limit=100
page
integer
default:"1"
Page number for pagination. Must be a positive integer greater than 0.Example: ?page=2

Request Examples

curl "https://api.terraquakeapi.com/stations/geojson?limit=100&page=1"

Response Format

success
boolean
Indicates if the request was successful
code
integer
HTTP status code (200 for success)
status
string
HTTP status message
message
string
Human-readable description (“Stations format geojson”)
payload
array
Array of GeoJSON Feature objects (see GeoJSON Feature structure below)
totalStations
integer
Total number of station features available
pagination
object
Pagination metadata
page
integer
Current page number
totalPages
integer
Total number of pages
limit
integer
Features per page
hasMore
boolean
Whether more pages are available
meta
object
Request metadata (method, path, timestamp)

GeoJSON Feature Structure

Each feature in the payload array follows the GeoJSON specification:
type
string
Always “Feature” for GeoJSON features
geometry
object
GeoJSON Point geometry
type
string
Always “Point”
coordinates
array
3D coordinate array: [longitude, latitude, elevation]
  • [0] (longitude): East-west position in decimal degrees (-180 to 180)
  • [1] (latitude): North-south position in decimal degrees (-90 to 90)
  • [2] (elevation): Height above sea level in meters
properties
object
Station metadata
code
string
Unique station code (e.g., “ACATE”)
name
string
Full station name including network prefix
site
string
Human-readable site location name
status
string
Operational status: “open”, “closed”, “inactive”, “deprecated”, “unavailable”, or “unknow” (sic)

Response Example

{
  "success": true,
  "code": 200,
  "status": "OK",
  "message": "Stations format geojson",
  "payload": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [14.4983, 37.0287, 206.0]
      },
      "properties": {
        "code": "ACATE",
        "name": "IV.ACATE",
        "site": "Acate (RG)",
        "status": "open"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [15.9428, 40.7328, 652.0]
      },
      "properties": {
        "code": "ACER",
        "name": "IV.ACER",
        "site": "Acerenza (PZ)",
        "status": "open"
      }
    }
  ],
  "meta": {
    "method": "GET",
    "path": "/stations/geojson?limit=2&page=1",
    "timestamp": "2025-11-06T11:15:30.420Z"
  },
  "totalStations": 450,
  "pagination": {
    "page": 1,
    "totalPages": 225,
    "limit": 2,
    "hasMore": true
  }
}

Error Responses

Invalid Limit Parameter

{
  "success": false,
  "code": 400,
  "status": "Bad Request",
  "message": "The 'limit' parameter must be a positive integer greater than 0. Example: ?limit=50"
}

Invalid Page Parameter

{
  "success": false,
  "code": 400,
  "status": "Bad Request",
  "message": "The 'page' parameter must be a positive integer greater than 0. Example: ?page=2"
}

Complete FeatureCollection Example

To use with most mapping libraries, wrap the payload in a FeatureCollection:
const response = await fetch(
  'https://api.terraquakeapi.com/stations/geojson?limit=500'
);
const data = await response.json();

// Create standard GeoJSON FeatureCollection
const featureCollection = {
  type: 'FeatureCollection',
  features: data.payload
};

// Now compatible with any GeoJSON library
map.addSource('stations', {
  type: 'geojson',
  data: featureCollection
});

Filtering by Status

Filter stations by operational status after fetching:
const response = await fetch(
  'https://api.terraquakeapi.com/stations/geojson?limit=500'
);
const data = await response.json();

// Filter for open stations only
const openStations = {
  type: 'FeatureCollection',
  features: data.payload.filter(f => f.properties.status === 'open')
};

console.log(`Open stations: ${openStations.features.length}`);

Coordinate Reference System

All coordinates use the WGS84 datum (EPSG:4326):
  • Longitude/Latitude in decimal degrees
  • Elevation in meters above mean sea level
This is the standard coordinate system for web mapping and GPS.

Get All Stations

Get full station details (non-GeoJSON)

Active Stations

Filter for operational stations

Closed Stations

Get inactive station locations

Statistics

View network metrics

Build docs developers (and LLMs) love