# Amtrak API

> Amtrak provides train status and stop-by-stop times as a workflow and API.

Amtrak's Check train status method returns current status and stop-by-stop times using a train number and departure date. You can optionally limit results to a station by name or code.

- Page: https://fous.com/tools/amtrak
- Handle: `@amtrak`
- Category: [Travel](https://fous.com/tools/category/travel)
- Source website: https://amtrak.com
- Last verified: Sep 29, 2026

## Methods

### Check train status

Operation `check_train_status`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Check an Amtrak train’s current status and stop-by-stop times by train number and departure date. Covers trips shown on the public Track Your Train map; future or older trips may not be available.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `date` | string | no | `"2026-09-28"` | Train’s departure date, for example 2026-09-28. Defaults to today in US Eastern time. |
| `station` | string | no | `"Chicago"` | Only show this station, by name or code, for example Boston or BOS. |
| `train_number` | string | yes | `"5"` | Train number on your ticket, for example 179. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "train_number"
  ],
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Train’s departure date, for example 2026-09-28. Defaults to today in US Eastern time.",
      "examples": [
        "2026-09-28"
      ]
    },
    "station": {
      "type": "string",
      "description": "Only show this station, by name or code, for example Boston or BOS.",
      "examples": [
        "Chicago",
        "BOS"
      ]
    },
    "train_number": {
      "type": "string",
      "description": "Train number on your ticket, for example 179.",
      "examples": [
        "5",
        "179"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "date": "2026-09-28",
      "station": "Chicago",
      "train_number": "5"
    },
    {
      "date": "2026-09-28",
      "station": "BOS",
      "train_number": "179"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `date` | string | `"2026-09-28"` |  |
| `stops` | array |  |  |
| `stops[].page_url` | string | `"https://www.amtrak.com/stations/chi"` | Amtrak station page. |
| `stops[].minutes_late` | integer or null | `0` | Minutes late for arrival or departure, zero when on time; null when not reported. |
| `stops[].station_code` | string | `"CHI"` | Station code. |
| `stops[].station_name` | string | `"Chicago, IL"` | Station name. |
| `stops[].scheduled_arrival` | string or null |  | Scheduled arrival in local time, or null at the starting station. |
| `stops[].scheduled_departure` | string or null | `"2026-09-28T14:00:00-05:00"` | Scheduled departure in local time, or null at the ending station. |
| `stops[].estimated_or_actual_arrival` | string or null |  | Latest estimated or actual arrival in local time, if available. |
| `stops[].estimated_or_actual_departure` | string or null | `"2026-09-28T14:00:00-05:00"` | Latest estimated or actual departure in local time, if available. |
| `status` | string | `"on time"` | On time, late, cancelled, or arrived. |
| `page_url` | string | `"https://www.amtrak.com/track-your-train.html"` |  |
| `train_name` | string or null | `"California Zephyr"` | Train service name. |
| `train_number` | string | `"5"` |  |
| `origin_station` | string or null | `"Chicago, IL"` |  |
| `destination_station` | string or null | `"Emeryville, CA"` |  |

**Example input**

```json
{
  "date": "2026-09-28",
  "station": "Chicago",
  "train_number": "5"
}
```

**Example output**

```json
{
  "date": "2026-09-28",
  "stops": [
    {
      "page_url": "https://www.amtrak.com/stations/chi",
      "minutes_late": 0,
      "station_code": "CHI",
      "station_name": "Chicago, IL",
      "scheduled_arrival": null,
      "scheduled_departure": "2026-09-28T14:00:00-05:00",
      "estimated_or_actual_arrival": null,
      "estimated_or_actual_departure": "2026-09-28T14:00:00-05:00"
    }
  ],
  "status": "on time",
  "page_url": "https://www.amtrak.com/track-your-train.html",
  "train_name": "California Zephyr",
  "train_number": "5",
  "origin_station": "Chicago, IL",
  "destination_station": "Emeryville, CA"
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@amtrak",
  "visibility": "public",
  "operation": "check_train_status",
  "version": 1,
  "input": {
    "date": "2026-09-28",
    "station": "Chicago",
    "train_number": "5"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@amtrak\",\n  \"visibility\": \"public\",\n  \"operation\": \"check_train_status\",\n  \"version\": 1,\n  \"input\": {\n    \"date\": \"2026-09-28\",\n    \"station\": \"Chicago\",\n    \"train_number\": \"5\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@amtrak",
  "visibility": "public",
  "operation": "check_train_status",
  "version": 1,
  "input": {
    "date": "2026-09-28",
    "station": "Chicago",
    "train_number": "5"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/amtrak`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `check_train_status`: Check train status. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-amtrak https://api.fous.com/mcp/tools/amtrak --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Check whether a train is on time, late, cancelled, or arrived.
- Review estimated or actual arrival and departure times by stop.
- Find a train's scheduled times at a specific station.

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Amtrak tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Amtrak account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from amtrak.com when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### Is my train on time or delayed?

Use Check train status with the train number and departure date to see the train's status and stop-by-stop delay information.

### When will my train arrive at a station?

Check train status returns scheduled and estimated or actual arrival times for each stop, when available.

### What time is my train scheduled to depart?

Check train status returns scheduled departure times by stop. Add a station name or code to show only that station.

## Related

- [MTA API](https://fous.com/tools/mta.md): New York transit service status and alerts.
- [Flightradar24 API](https://fous.com/tools/flightradar24.md): Flightradar24 provides live flight tracking, recent history, flight status and times, plus upcoming airport departures and arrivals; history and schedules are limited to recent and upcoming flights.
- [FlightAware API](https://fous.com/tools/flightaware.md): FlightAware provides public flight status and dated flight details, airport arrivals and departures limited to displayed history and 20 flights per direction, plus today’s delays and cancellations when shown.
- [Transport for London API](https://fous.com/tools/transport-for-london.md): Transport for London reports current or currently published future-day service status and ordered journey options with directions and adult pay-as-you-go fares when available.
- [USPS API](https://fous.com/tools/usps.md): USPS provides latest available package tracking, standardized U.S. addresses with ZIP+4, recommended cities for five-digit ZIP Codes, and estimated domestic postage and delivery dates.
- [Deutsche Bahn API](https://fous.com/tools/deutsche-bahn.md): Train schedules, tickets and travel information in Germany.
- [FlixBus API](https://fous.com/tools/flixbus.md): Find and book bus and train trips on FlixBus.
- [TSA Wait Times API](https://fous.com/tools/tsa-wait-times.md): Security wait time estimates at US airports.
- [All Travel tools](https://fous.com/tools/category/travel)
