> ## Documentation Index
> Fetch the complete documentation index at: https://docs.terraquakeapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stations API Overview

> Access INGV seismic monitoring stations across Italy

## Introduction

The TerraQuake Stations API provides comprehensive access to the INGV (Istituto Nazionale di Geofisica e Vulcanologia) seismic monitoring network. Query active and historical seismic stations, retrieve their locations in GeoJSON format for mapping, and access network statistics.

## INGV Seismic Network

The INGV operates one of the most advanced seismic monitoring networks in the Mediterranean region, with hundreds of stations distributed across Italy. These stations continuously monitor seismic activity, providing critical data for earthquake detection, early warning systems, and scientific research.

### Station Data Includes:

* **Location**: Precise latitude, longitude, and elevation
* **Metadata**: Station code, name, site information
* **Status**: Operational state (open/closed/inactive)
* **Network**: Network affiliation and creation dates
* **Channels**: Available sensor channels and types

## Available Endpoints

> **[Get All Stations](https://docs.terraquakeapi.com/api/stations/get-all.md)**
>
> Retrieve all seismic monitoring stations with pagination

> **[Get Station by Code](https://docs.terraquakeapi.com/api/stations/by-code.md)**
>
> Search for a specific station using its unique code

> **[GeoJSON Format](https://docs.terraquakeapi.com/api/stations/geojson.md)**
>
> Get stations in GeoJSON format for mapping applications

> **[Active Stations](https://docs.terraquakeapi.com/api/stations/status-open.md)**
>
> List all currently operational stations

> **[Closed Stations](https://docs.terraquakeapi.com/api/stations/status-closed.md)**
>
> Retrieve historical/inactive stations

> **[Statistics](https://docs.terraquakeapi.com/api/stations/statistics.md)**
>
> Get network statistics and aggregate metrics

## Common Use Cases

### 1. Interactive Mapping

Use the `/stations/geojson` endpoint to display seismic stations on interactive maps:

```javascript theme={null}
const response = await fetch(
  'https://api.terraquakeapi.com/v1/stations/geojson',
);
const data = await response.json();

// Add to Mapbox, Leaflet, or other mapping library
map.addSource('stations', {
  type: 'geojson',
  data: data.payload,
});
```

### 2. Network Monitoring

Monitor the operational status of the seismic network:

```python theme={null}
import requests

# Get statistics
response = requests.get('https://api.terraquakeapi.com/v1/stations/statistics')
stats = response.json()['payload']['statistics']

print(f"Total stations: {stats['totalStations']}")
print(f"Active: {stats['stationsOpen']}")
print(f"Inactive: {stats['stationsClosed']}")
```

### 3. Station Lookup

Retrieve detailed information for a specific station:

```bash theme={null}
curl "https://api.terraquakeapi.com/v1/stations/code?code=ACATE"
```

### 4. Regional Analysis

Filter active stations for specific regions or applications:

```javascript theme={null}
// Get all active stations
const activeStations = await fetch(
  'https://api.terraquakeapi.com/v1/stations/status/open?limit=500',
);

// Filter by location, network, or other criteria
const filtered = activeStations.payload.filter(
  (station) => station.Latitude > 40 && station.Latitude < 45,
);
```

## Base URL

All station endpoints use the base URL:

```
https://api.terraquakeapi.com/v1/stations
```

## Authentication

No authentication required. All endpoints are publicly accessible.

## Rate Limits

* **Limit**: 100 requests per minute per IP
* **Window**: 1 minute (fixed window)
* **Headers**: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`

See [Rate Limiting](https://docs.terraquakeapi.com/concepts/rate-limiting.md) for details.

## Response Format

All endpoints return standardized JSON responses:

```json theme={null}
{
  "success": true,
  "code": 200,
  "status": "OK",
  "message": "Descriptive message",
  "payload": [...],
  "meta": {
    "method": "GET",
    "path": "/v1/stations",
    "timestamp": "2025-11-06T00:40:01.490Z"
  },
  "totalStations": 450,
  "pagination": {
    "page": 1,
    "totalPages": 9,
    "limit": 50,
    "hasMore": true
  }
}
```

## Data Source

Station data is sourced from the INGV FDSN (International Federation of Digital Seismograph Networks) Station service, which provides standardized access to seismic station metadata in XML format (converted to JSON by the API).

## Next Steps

> **[Get All Stations](https://docs.terraquakeapi.com/api/stations/get-all.md)**
>
> Start with retrieving all available stations

> **[GeoJSON Format](https://docs.terraquakeapi.com/api/stations/geojson.md)**
>
> Build a station map with GeoJSON data


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.