# United — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 United Airlines flights, check real-time flight status, and view detailed seat maps to plan your perfect trip. Compare fare options and use airport autocomplete to quickly find your departure and arrival cities.

**Category:** Travel | **Website:** [united.com/](https://united.com/) | **Docs:** [parse.bot/marketplace/780bf9fc-f95b-4b07-b1a8-2b2e8ba7d02a/united-com-api](https://parse.bot/marketplace/780bf9fc-f95b-4b07-b1a8-2b2e8ba7d02a/united-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/parse-united-com-api-780bf9fc/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### Get fare options

Get available fare options for a selected flight. Requires a valid cart_id and flight_hash from a recent search_flights response. The server-side search session must still be active (typically a few minutes after search) for detailed fare quotes; an expired session returns Status 0 with an error array.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cart_id` | string | Yes | Cart ID from search_flights response (cart_id field) |
| `flight_hash` | string | Yes | Flight hash from search_flights response (hash field in flights array) |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-united-com-api-780bf9fc/get_fare_options \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cart_id":"<string>","flight_hash":"<string>"}'
```

### Get flight status

Get real-time flight status for a United Airlines flight by flight number and date. Returns departure/arrival times (scheduled and actual), gates, terminals, equipment info, delay information, weather data, and current operational status. Date must be within approximately 2 days of today.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | Yes | Flight date in YYYY-MM-DD format (must be within approximately +/- 2 days of today) |
| `flight_number` | string | Yes | UA flight number (e.g. 1960, 2115) |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-united-com-api-780bf9fc/get_flight_status \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"<string>","flight_number":"<string>"}'
```

### Get seat map

Retrieve the seat map for a specific United Airlines flight. Returns cabin layouts with seat-level availability, attributes (window, aisle, exit row, bulkhead), recline type, and cabin branding. The departure_time parameter should match the actual flight schedule for accurate results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `departure_date` | string | Yes | Departure date in YYYY-MM-DD format |
| `departure_time` | string | No | Departure time in HH:mm format matching the actual flight schedule (e.g. 07:00) |
| `destination` | string | Yes | Destination airport IATA code (e.g. SFO) |
| `flight_number` | string | Yes | UA flight number (e.g. 1960) |
| `origin` | string | Yes | Origin airport IATA code (e.g. EWR) |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-united-com-api-780bf9fc/get_seat_map \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"departure_date":"<string>","departure_time":"<string>","destination":"<string>","flight_number":"<string>","origin":"<string>"}'
```

### Search airport autocomplete

Autocomplete airport search by city name or airport code. Returns matching airports with IATA codes, city, country, and state information. Useful as the first step to resolve human-readable city names into machine-readable IATA codes for flight search.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query (city name or airport IATA code, e.g. Chicago, EWR, London) |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-united-com-api-780bf9fc/search_airport_autocomplete \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### Search flights

Search for available United Airlines flights between two airports. Returns a cart_id for session continuity, a list of flight options with per-cabin pricing, and fare family metadata. Each flight option includes a hash identifier for downstream fare selection via get_fare_options. All results arrive in one response (no pagination needed).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `book_with_miles` | boolean | No | Search for award travel with miles |
| `cabin_class` | string | No | Cabin class preference |
| `departure_date` | string | Yes | Departure date in YYYY-MM-DD format |
| `destination` | string | Yes | Destination airport IATA code (e.g. SFO, JFK, ORD) |
| `flexible_dates` | boolean | No | Search for refundable fares only |
| `num_adults` | integer | No | Number of adult passengers |
| `origin` | string | Yes | Origin airport IATA code (e.g. EWR, LAX, ORD) |
| `return_date` | string | No | Return date in YYYY-MM-DD format, required when trip_type is 2 |
| `trip_type` | integer | No | 1 for one-way, 2 for roundtrip |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-united-com-api-780bf9fc/search_flights \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"book_with_miles":"<boolean>","cabin_class":"<string>","departure_date":"<string>","destination":"<string>","flexible_dates":"<boolean>","num_adults":"<integer>","origin":"<string>","return_date":"<string>","trip_type":"<integer>"}'
```
