# Amtrak — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search for Amtrak trains across stations, compare fares, and discover discounts to plan your rail journey with current pricing and availability. Get detailed train information, autocomplete station names, and find the cheapest routes for your travel dates.

**Category:** Travel | **Website:** [amtrak.com/](https://amtrak.com/) | **Docs:** [parse.bot/marketplace/bab91953-1b15-4b51-948f-cab3a006ca2f/amtrak-com-api](https://parse.bot/marketplace/bab91953-1b15-4b51-948f-cab3a006ca2f/amtrak-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/amtrak/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get cheapest fare

Find the cheapest available fare for a route and date. Searches all available trains and returns the single lowest-priced option with train name, number, departure/arrival times, travel class, and fare family code. Supports optional time-of-day and fare-family filters to narrow results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `departure_date` | string | Yes | Departure date in YYYY-MM-DD format. Must be a future date. |
| `destination` | string | Yes | Destination station code (e.g. NYP, WAS, MKE) |
| `earliest_departure_time` | string | No | Earliest acceptable departure time in HH:MM format (e.g. '08:00'). Trains departing before this time are excluded. |
| `fare_family` | string | No | Filter to a specific fare family. |
| `latest_departure_time` | string | No | Latest acceptable departure time in HH:MM format (e.g. '20:00'). Trains departing after this time are excluded. |
| `origin` | string | Yes | Origin station code (e.g. BOS, CHI, NYP) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/amtrak/get-cheapest-fare \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"departure_date":"<string>","destination":"<string>","earliest_departure_time":"<string>","fare_family":"<string>","latest_departure_time":"<string>","origin":"<string>"}'
```

### Get everyday discounts

Retrieve information about Amtrak's permanent everyday discount programs including programs for children, seniors, students, military personnel, passengers with disabilities, and groups.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/amtrak/get-everyday-discounts \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get station autocomplete

Search for Amtrak stations by keyword. Returns matching stations with codes, addresses, and geographic coordinates. Useful for resolving user-typed city or station names into station codes required by search_trains and get_cheapest_fare.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `term` | string | Yes | Station name or code fragment to search for (e.g. 'Boston', 'NYP', 'Chicago') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/amtrak/get-station-autocomplete \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"term":"<string>"}'
```

### Get stations

Retrieve all Amtrak stations with their codes and accessibility details. Returns the full station list in a single response. Each station includes flags for QuikTrak kiosk availability, staffing, ADA accessibility, and wheelchair availability.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/amtrak/get-stations \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get support info

Retrieve Amtrak support and contact information including FAQ answers, department phone numbers, headquarters mailing address, safety/police contacts, and available support channels (phone, chat, email, SMS).

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/amtrak/get-support-info \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get train details

Get detailed schedule and stop information for a specific train including all intermediate stops, arrival/departure times, station facilities, and onboard amenities. The train_number and start_date should be obtained from search_trains results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `destination` | string | Yes | Destination station code |
| `origin` | string | Yes | Origin station code |
| `start_date` | string | Yes | Departure datetime in ISO format (e.g. 2026-06-25T05:00:00). Obtain from search_trains departure times. |
| `train_number` | string | Yes | Amtrak train number (e.g. '2151', '95'). Obtain from search_trains results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/amtrak/get-train-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"destination":"<string>","origin":"<string>","start_date":"<string>","train_number":"<string>"}'
```

### Search trains

Search for available trains between origin and destination stations on a given date. Returns all journey solution options with departure/arrival times, travel class, fare families (Value, Flexible, Saver), seat availability inventory, and ancillary options (pets, bicycles). Supports one-way and round-trip searches with multiple passenger types.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `departure_date` | string | Yes | Departure date in YYYY-MM-DD format. Must be a future date within 11 months. |
| `destination` | string | Yes | Destination station code (e.g. NYP, WAS, MKE). Must differ from origin. |
| `num_adults` | integer | No | Number of travelers (1-8). |
| `origin` | string | Yes | Origin station code (e.g. BOS, CHI, NYP). Obtain valid codes from get_stations or get_station_autocomplete. |
| `passenger_type` | string | No | Passenger type code. |
| `return_date` | string | No | Return date in YYYY-MM-DD format for round-trip bookings. Must be on or after departure_date. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/amtrak/search-trains \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"departure_date":"<string>","destination":"<string>","num_adults":"<integer>","origin":"<string>","passenger_type":"<string>","return_date":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.