# 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-amtrak-com-api-bab91953/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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/parse-amtrak-com-api-bab91953/get_cheapest_fare \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-amtrak-com-api-bab91953/get_everyday_discounts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-amtrak-com-api-bab91953/get_station_autocomplete \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-amtrak-com-api-bab91953/get_stations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-amtrak-com-api-bab91953/get_support_info \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-amtrak-com-api-bab91953/get_train_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-amtrak-com-api-bab91953/search_trains \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"departure_date":"<string>","destination":"<string>","num_adults":"<integer>","origin":"<string>","passenger_type":"<string>","return_date":"<string>"}'
```
