# Trenitalia live train status API

Get Trenitalia train status by number, origin and service day via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as output, raw, train_number, and retrieve structured data including source train number, selected origin station code, source service date, source last-observation timestamp, and observed stop-platform value for train status, and stop timeline.

Documentation: https://openany.si/market/apis/trenitalia/trenitalia-live-train-status-api/?offering=60944754-9f80-4aec-b770-03990b8496ac
API ID: 60944754-9f80-4aec-b770-03990b8496ac
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/trenitalia/v1/train-status
Page update time: 2026-12-03T02:46:48.404Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:46:46.270Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Trenitalia live train status API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "train_number": {
          "type": "string",
          "description": "Train number, e.g. 9516 (a category prefix such as FR is ignored)."
        },
        "origin_code": {
          "type": "string",
          "description": "Origin station code, to pick among trains with the same number."
        },
        "date": {
          "type": "string",
          "description": "Service day (YYYY-MM-DD) among the matches."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      },
      "required": [
        "train_number"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "arrived": {
      "type": "boolean"
    },
    "cached": {
      "type": "boolean"
    },
    "cancelled_stops": {
      "type": "array",
      "items": {}
    },
    "credits_used": {
      "type": "integer"
    },
    "date": {
      "type": "string"
    },
    "delay_minutes": {
      "type": "integer"
    },
    "delay_reason": {
      "type": "null"
    },
    "destination": {
      "type": "string"
    },
    "destination_code": {
      "type": "string"
    },
    "fetched_at": {
      "type": "string"
    },
    "last_seen_at": {
      "type": "string"
    },
    "last_seen_time": {
      "type": "string"
    },
    "not_departed": {
      "type": "boolean"
    },
    "notice": {
      "type": "null"
    },
    "origin": {
      "type": "string"
    },
    "origin_code": {
      "type": "string"
    },
    "other_matches": {
      "type": "array",
      "items": {}
    },
    "running": {
      "type": "boolean"
    },
    "scheduled_arrival": {
      "type": "string"
    },
    "scheduled_departure": {
      "type": "string"
    },
    "stops": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "actual_arrival": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ]
          },
          "actual_departure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "arrival_delay_minutes": {
            "type": "integer"
          },
          "cancelled": {
            "type": "boolean"
          },
          "code": {
            "type": "string"
          },
          "departure_delay_minutes": {
            "type": "integer"
          },
          "platform_actual": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "platform_scheduled": {
            "type": "string"
          },
          "scheduled_arrival": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ]
          },
          "scheduled_departure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "station": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      }
    },
    "train": {
      "type": "string"
    },
    "train_number": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/trenitalia/v1/train-status?output=json&raw=0&train_number=9516' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "arrived": false,
  "cached": false,
  "cancelled_stops": [],
  "credits_used": 1,
  "date": "2026-11-19",
  "delay_minutes": 27,
  "delay_reason": null,
  "destination": "TORINO PORTA NUOVA",
  "destination_code": "S00219",
  "fetched_at": "2026-11-19T12:25:39.506Z",
  "last_seen_at": "QUADRIVIO ZAPPATA",
  "last_seen_time": "2026-11-19T12:22:30.000Z",
  "not_departed": false,
  "notice": null,
  "origin": "SALERNO",
  "origin_code": "S09818",
  "other_matches": [],
  "running": true,
  "scheduled_arrival": "2026-11-19T12:00:00.000Z",
  "scheduled_departure": "2026-11-19T04:50:00.000Z",
  "stops": [
    {
      "actual_arrival": null,
      "actual_departure": "2026-11-19T05:13:30.000Z",
      "arrival_delay_minutes": 0,
      "cancelled": false,
      "code": "S09818",
      "departure_delay_minutes": 24,
      "platform_actual": "2",
      "platform_scheduled": "3",
      "scheduled_arrival": null,
      "scheduled_departure": "2026-11-19T04:50:00.000Z",
      "station": "SALERNO",
      "type": "origin"
    },
    {
      "actual_arrival": "2026-11-19T05:50:30.000Z",
      "actual_departure": "2026-11-19T06:03:30.000Z",
      "arrival_delay_minutes": 23,
      "cancelled": false,
      "code": "S09218",
      "departure_delay_minutes": 24,
      "platform_actual": "18",
      "platform_scheduled": "21",
      "scheduled_arrival": "2026-11-19T05:28:00.000Z",
      "scheduled_departure": "2026-11-19T05:40:00.000Z",
      "station": "NAPOLI CENTRALE",
      "type": "stop"
    },
    {
      "actual_arrival": "2026-11-19T06:14:00.000Z",
      "actual_departure": "2026-11-19T06:19:30.000Z",
      "arrival_delay_minutes": 20,
      "cancelled": false,
      "code": "S09988",
      "departure_delay_minutes": 24,
      "platform_actual": "4",
      "platform_scheduled": "1",
      "scheduled_arrival": "2026-11-19T05:54:00.000Z",
      "scheduled_departure": "2026-11-19T05:56:00.000Z",
      "station": "NAPOLI AFRAGOLA",
      "type": "stop"
    },
    {
      "actual_arrival": "2026-11-19T07:20:00.000Z",
      "actual_departure": "2026-11-19T07:32:00.000Z",
      "arrival_delay_minutes": 25,
      "cancelled": false,
      "code": "S08409",
      "departure_delay_minutes": 22,
      "platform_actual": "5",
      "platform_scheduled": "8",
      "scheduled_arrival": "2026-11-19T06:55:00.000Z",
      "scheduled_departure": "2026-11-19T07:10:00.000Z",
      "station": "ROMA TERMINI",
      "type": "stop"
    },
    {
      "actual_arrival": "2026-11-19T09:03:00.000Z",
      "actual_departure": "2026-11-19T09:13:30.000Z",
      "arrival_delay_minutes": 17,
      "cancelled": false,
      "code": "S06421",
      "departure_delay_minutes": 19,
      "platform_actual": "8",
      "platform_scheduled": "8",
      "scheduled_arrival": "2026-11-19T08:46:00.000Z",
      "scheduled_departure": "2026-11-19T08:55:00.000Z",
      "station": "FIRENZE SANTA MARIA NOVELLA",
      "type": "stop"
    },
    {
      "actual_arrival": "2026-11-19T09:49:00.000Z",
      "actual_departure": "2026-11-19T09:52:30.000Z",
      "arrival_delay_minutes": 16,
      "cancelled": false,
      "code": "S05046",
      "departure_delay_minutes": 17,
      "platform_actual": "16",
      "platform_scheduled": "16",
      "scheduled_arrival": "2026-11-19T09:33:00.000Z",
      "scheduled_departure": "2026-11-19T09:36:00.000Z",
      "station": "BOLOGNA C.LE/AV",
      "type": "stop"
    },
    {
      "actual_arrival": "2026-11-19T10:14:00.000Z",
      "actual_departure": "2026-11-19T10:17:00.000Z",
      "arrival_delay_minutes": 16,
      "cancelled": false,
      "code": "S05254",
      "departure_delay_minutes": 17,
      "platform_actual": "1",
      "platform_scheduled": "1",
      "scheduled_arrival": "2026-11-19T09:58:00.000Z",
      "scheduled_departure": "2026-11-19T10:00:00.000Z",
      "station": "REGGIO EMILIA AV MEDIOPADANA",
      "type": "stop"
    },
    {
      "actual_arrival": "2026-11-19T10:53:30.000Z",
      "actual_departure": "2026-11-19T10:56:30.000Z",
      "arrival_delay_minutes": 15,
      "cancelled": false,
      "code": "S01820",
      "departure_delay_minutes": 16,
      "platform_actual": "7",
      "platform_scheduled": "7",
      "scheduled_arrival": "2026-11-19T10:39:00.000Z",
      "scheduled_departure": "2026-11-19T10:41:00.000Z",
      "station": "MILANO ROGOREDO",
      "type": "stop"
    },
    {
      "actual_arrival": "2026-11-19T11:05:00.000Z",
      "actual_departure": "2026-11-19T11:18:30.000Z",
      "arrival_delay_minutes": 15,
      "cancelled": false,
      "code": "S01700",
      "departure_delay_minutes": 17,
      "platform_actual": "6",
      "platform_scheduled": "14",
      "scheduled_arrival": "2026-11-19T10:50:00.000Z",
      "scheduled_departure": "2026-11-19T11:02:00.000Z",
      "station": "MILANO CENTRALE",
      "type": "stop"
    },
    {
      "actual_arrival": "2026-11-19T12:16:30.000Z",
      "actual_departure": "2026-11-19T12:20:00.000Z",
      "arrival_delay_minutes": 28,
      "cancelled": false,
      "code": "S00035",
      "departure_delay_minutes": 29,
      "platform_actual": "1",
      "platform_scheduled": "1",
      "scheduled_arrival": "2026-11-19T11:49:00.000Z",
      "scheduled_departure": "2026-11-19T11:51:00.000Z",
      "station": "TORINO PORTA SUSA",
      "type": "stop"
    },
    {
      "actual_arrival": null,
      "actual_departure": null,
      "arrival_delay_minutes": 0,
      "cancelled": false,
      "code": "S00219",
      "departure_delay_minutes": 0,
      "platform_actual": null,
      "platform_scheduled": "16",
      "scheduled_arrival": "2026-11-19T12:00:00.000Z",
      "scheduled_departure": null,
      "station": "TORINO PORTA NUOVA",
      "type": "destination"
    }
  ],
  "train": "FR 9516",
  "train_number": 9516
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- apish: https://openany.si/market/apis/trenitalia/trenitalia-live-train-status-api/?offering=60944754-9f80-4aec-b770-03990b8496ac

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
