> ## 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.

# GET v1/stations

> Retrieve all seismic monitoring stations from the INGV network

## Endpoint

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

## Description

Retrieves all available seismic monitoring stations from the INGV (Istituto Nazionale di Geofisica e Vulcanologia) network. The data is sourced from the FDSN Station service and includes complete metadata for each station including location, elevation, network affiliation, and operational status.

Supports pagination for efficient data retrieval from the complete network of hundreds of stations.

## Use Cases

* **Network Overview**: Get a complete list of all monitoring stations
* **Data Analysis**: Analyze station distribution and network coverage
* **Integration**: Sync station metadata with local databases
* **Research**: Study network evolution and station deployment patterns

## Parameters

**limit** `integer` (default: 50)

Number of stations to return per page. Must be a positive integer greater than
0\. **Maximum**: 1000 **Example**: `?limit=100`

**page** `integer` (default: 1)

Page number for pagination. Must be a positive integer greater than 0.
**Example**: `?page=2`

## Request Examples

```bash cURL theme={null}
curl "https://api.terraquakeapi.com/v1/stations?limit=50&page=1"
```

```javascript JavaScript theme={null}
const response = await fetch(
  'https://api.terraquakeapi.com/v1/stations?limit=50&page=1',
);
const data = await response.json();

if (data.success) {
  console.log(`Total stations: ${data.totalStations}`);
  console.log(
    `Retrieved ${data.payload.length} stations on page ${data.pagination.page}`,
  );

  data.payload.forEach((station) => {
    console.log(`${station.$.code} - ${station.Site.Name}`);
  });
}
```

```python Python theme={null}
import requests

url = "https://api.terraquakeapi.com/v1/stations"
params = {"limit": 50, "page": 1}

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

if data.get('success'):
    print(f"Total stations: {data.get('totalStations')}")
    for station in data.get('payload', []):
        code = station.get('$', {}).get('code')
        name = station.get('Site', {}).get('Name')
        print(f"{code} - {name}")
```

```php PHP theme={null}
<?php
$url = "https://api.terraquakeapi.com/v1/stations?limit=50&page=1";
$response = file_get_contents($url);
$data = json_decode($response, true);

if ($data['success']) {
    echo "Total stations: " . $data['totalStations'] . "\n";

    foreach ($data['payload'] as $station) {
        $code = $station['$']['code'];
        $name = $station['Site']['Name'];
        echo "$code - $name\n";
    }
}
?>
```

## 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 of the response

**payload** `array`

Array of station objects (see Station Object structure below)

**totalStations** `integer`

Total number of stations in the network

**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** `string`

HTTP method used

**path** `string`

Request path

**timestamp** `string`

ISO 8601 timestamp of the request

## Station Object

Each station in the `payload` array has the following structure:

**\$** `object`

Station metadata attributes

**code** `string`

Unique station code (e.g., "ACATE", "IV.ACER")

**name** `string`

Station name

**restrictedStatus** `string`

Operational status: "open", "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 applicable)

**Latitude** `float`

Station latitude in decimal degrees (-90 to 90)

**Longitude** `float`

Station longitude in decimal degrees (-180 to 180)

**Elevation** `float`

Station elevation above sea level in meters

**Site** `object`

Site information

**Name** `string`

Human-readable site location name

**CreationDate** `string`

ISO 8601 timestamp when the station record was created

## Response Example

```json theme={null}
{
  "success": true,
  "code": 200,
  "status": "OK",
  "message": "List of seismic monitoring stations (INGV Network)",
  "payload": [
    {
      "$": {
        "code": "ACATE",
        "name": "IV.ACATE",
        "restrictedStatus": "open",
        "startDate": "2015-06-10T00:00:00"
      },
      "Latitude": 37.0287,
      "Longitude": 14.4983,
      "Elevation": 206.0,
      "Site": {
        "Name": "Acate (RG)"
      },
      "CreationDate": "2015-06-10T00:00:00"
    },
    {
      "$": {
        "code": "ACER",
        "name": "IV.ACER",
        "restrictedStatus": "open",
        "startDate": "2009-03-12T00:00:00"
      },
      "Latitude": 40.7328,
      "Longitude": 15.9428,
      "Elevation": 652.0,
      "Site": {
        "Name": "Acerenza (PZ)"
      },
      "CreationDate": "2009-03-12T00:00:00"
    }
  ],
  "meta": {
    "method": "GET",
    "path": "/v1/stations?limit=2&page=1",
    "timestamp": "2025-11-06T10:30:15.240Z"
  },
  "totalStations": 450,
  "pagination": {
    "page": 1,
    "totalPages": 225,
    "limit": 2,
    "hasMore": true
  }
}
```

## Error Responses

### Invalid Limit Parameter

```json theme={null}
{
  "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

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

### Service Unavailable

```json theme={null}
{
  "success": false,
  "code": 500,
  "status": "Internal Server Error",
  "message": "HTTP error! status: 503 - INGV service temporarily unavailable"
}
```

## Pagination Example

To retrieve all stations, iterate through pages:

```javascript theme={null}
async function getAllStations() {
  const allStations = [];
  let page = 1;
  let hasMore = true;

  while (hasMore) {
    const response = await fetch(
      `https://api.terraquakeapi.com/v1/stations?limit=100&page=${page}`,
    );
    const data = await response.json();

    if (data.success) {
      allStations.push(...data.payload);
      hasMore = data.pagination.hasMore;
      page++;
    } else {
      break;
    }
  }

  console.log(`Retrieved ${allStations.length} total stations`);
  return allStations;
}
```

## Related Endpoints

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

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

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

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


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