Skip to main content

Endpoint

GET https://api.terraquakeapi.com/stations/status/closed

Description

Returns the list of stations that are no longer active. This includes stations with status “closed”, “inactive”, “deprecated”, or “unavailable”. These stations are no longer collecting or transmitting seismic data but remain in the database for historical reference and network evolution studies. Useful for understanding the evolution of the INGV seismic network over time and identifying former monitoring locations.

Use Cases

  • Historical Analysis: Study network changes and station lifecycle
  • Coverage Evolution: Track how monitoring coverage has changed
  • Research: Analyze historical seismic data from decommissioned stations
  • Documentation: Maintain complete records of all stations ever deployed
  • Legacy Data: Reference stations from older earthquake catalogs

Parameters

limit
integer
default:"50"
Number of stations 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/status/closed?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 (“List of closed seismic stations”)
payload
array
Array of closed station objects (see Station Object structure)
totalStationsClosed
integer
Total number of inactive/closed stations
pagination
object
Pagination metadata
page
integer
Current page number
totalPages
integer
Total number of pages available
limit
integer
Number of results per page
hasMore
boolean
Whether more pages are available
meta
object
Request metadata (method, path, timestamp)

Station Object Structure

$
object
Station metadata attributes
code
string
Unique station code
name
string
Full station name with network prefix
restrictedStatus
string
Status: “closed”, “inactive”, “deprecated”, or “unavailable”
startDate
string
ISO 8601 date when the station became operational
endDate
string
ISO 8601 date when the station was closed (if available)
Latitude
float
Station latitude in decimal degrees
Longitude
float
Station longitude in decimal degrees
Elevation
float
Station elevation in meters above sea level
Site
object
Name
string
Human-readable site location name
CreationDate
string
ISO 8601 timestamp when the station record was created

Response Example

{
  "success": true,
  "code": 200,
  "status": "OK",
  "message": "List of closed seismic stations",
  "payload": [
    {
      "$": {
        "code": "OLDST",
        "name": "IV.OLDST",
        "restrictedStatus": "closed",
        "startDate": "2005-03-15T00:00:00",
        "endDate": "2018-09-20T00:00:00"
      },
      "Latitude": 42.1234,
      "Longitude": 13.5678,
      "Elevation": 450.0,
      "Site": {
        "Name": "Old Station Location (AQ)"
      },
      "CreationDate": "2005-03-15T00:00:00"
    },
    {
      "$": {
        "code": "INACT",
        "name": "IV.INACT",
        "restrictedStatus": "inactive",
        "startDate": "2010-06-01T00:00:00",
        "endDate": "2020-12-31T00:00:00"
      },
      "Latitude": 41.8967,
      "Longitude": 12.4822,
      "Elevation": 125.0,
      "Site": {
        "Name": "Inactive Station (RM)"
      },
      "CreationDate": "2010-06-01T00:00:00"
    }
  ],
  "meta": {
    "method": "GET",
    "path": "/stations/status/closed?limit=2&page=1",
    "timestamp": "2025-11-06T12:00:15.890Z"
  },
  "totalStationsClosed": 65,
  "pagination": {
    "page": 1,
    "totalPages": 33,
    "limit": 2,
    "hasMore": true
  }
}

Error Responses

Invalid Parameters

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

No Closed Stations Found

{
  "success": false,
  "code": 404,
  "status": "Not Found",
  "message": "No station found restrictedStatus closed"
}

Closure Status Types

This endpoint returns stations with the following status values:
StatusDescription
closedStation permanently decommissioned
inactiveStation temporarily not operational
deprecatedStation replaced or superseded
unavailableStation data currently unavailable

Practical Examples

Analyze Network Evolution

async function analyzeNetworkEvolution() {
  // Get closed stations
  const closedResp = await fetch(
    'https://api.terraquakeapi.com/stations/status/closed?limit=500'
  );
  const closedData = await closedResp.json();
  
  // Get open stations
  const openResp = await fetch(
    'https://api.terraquakeapi.com/stations/status/open?limit=500'
  );
  const openData = await openResp.json();
  
  console.log('INGV Network Evolution:');
  console.log(`Current active stations: ${openData.totalStationsOpen}`);
  console.log(`Historical closed stations: ${closedData.totalStationsClosed}`);
  console.log(`Total lifetime stations: ${openData.totalStationsOpen + closedData.totalStationsClosed}`);
  
  const retentionRate = (openData.totalStationsOpen / 
    (openData.totalStationsOpen + closedData.totalStationsClosed) * 100).toFixed(1);
  console.log(`Station retention rate: ${retentionRate}%`);
}

Map Historical Stations

// Create a map layer showing closed station locations
const response = await fetch(
  'https://api.terraquakeapi.com/stations/status/closed?limit=500'
);
const data = await response.json();

if (data.success) {
  const geojson = {
    type: 'FeatureCollection',
    features: data.payload.map(station => ({
      type: 'Feature',
      geometry: {
        type: 'Point',
        coordinates: [station.Longitude, station.Latitude, station.Elevation]
      },
      properties: {
        code: station.$.code,
        name: station.$.name,
        site: station.Site.Name,
        status: station.$.restrictedStatus,
        startDate: station.$.startDate,
        endDate: station.$.endDate || 'Unknown'
      }
    }))
  };
  
  // Add to map as historical layer
  map.addSource('historical-stations', {
    type: 'geojson',
    data: geojson
  });
  
  map.addLayer({
    id: 'historical-stations-circle',
    type: 'circle',
    source: 'historical-stations',
    paint: {
      'circle-radius': 5,
      'circle-color': '#94a3b8',
      'circle-opacity': 0.6,
      'circle-stroke-width': 1,
      'circle-stroke-color': '#64748b'
    }
  });
}

Export Closure Timeline

import requests
import pandas as pd
from datetime import datetime

url = "https://api.terraquakeapi.com/stations/status/closed"
params = {"limit": 500}

response = requests.get(url, params=params)
data = response.json()

if data.get('success'):
    stations = []
    for station in data['payload']:
        end_date = station.get('$', {}).get('endDate')
        if end_date:
            try:
                end_dt = datetime.fromisoformat(end_date.replace('Z', '+00:00'))
                stations.append({
                    'code': station['$']['code'],
                    'site': station['Site']['Name'],
                    'status': station['$']['restrictedStatus'],
                    'closure_year': end_dt.year,
                    'closure_date': end_date
                })
            except:
                pass
    
    df = pd.DataFrame(stations)
    
    # Closures by year
    print("Station closures by year:")
    print(df['closure_year'].value_counts().sort_index())
    
    # Export to CSV
    df.to_csv('closed_stations_timeline.csv', index=False)
    print(f"\nExported {len(df)} closed stations to CSV")

Active Stations

Get currently operational stations

Statistics

Compare open vs closed counts

Get All Stations

Browse all stations (open and closed)

Get Station by Code

Look up specific closed station

Build docs developers (and LLMs) love