# Delta — 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.

> Look up Delta Airlines flight schedules, check real-time flight status, and retrieve detailed trip information to plan your travel. Find your nearest airport and access the data you need to monitor flights and make booking decisions.

**Category:** Travel | **Website:** [delta.com/](https://delta.com/) | **Docs:** [parse.bot/marketplace/0bd9e73a-d6d4-40d4-b068-d9a5b6a895c3/delta-com-api](https://parse.bot/marketplace/0bd9e73a-d6d4-40d4-b068-d9a5b6a895c3/delta-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-delta-com-api-0bd9e73a/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_closest_airport

Identifies the closest Delta-served airport based on the caller's geographic location via IP-based geolocation. Returns the airport code, city name, state, and country. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-delta-com-api-0bd9e73a/get_closest_airport \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_flight_schedules

Search for Delta flight schedules and real-time status by route. Both origin and destination airport codes are required. Optionally filter by a specific flight number within the route. Returns all matching trips with flight segments including departure/arrival times, status, aircraft type, and number of stops. Paginates up to 30 results per call. Duration is ISO 8601 (e.g. PT04H40M).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | Yes | Departure date in YYYY-MM-DD format. Must be within Delta's schedule window (typically today through approximately 330 days ahead). |
| `destination` | string | Yes | 3-letter IATA destination airport code (e.g. LAX, ORD, MIA, JFK, ATL, SFO, SEA, BOS, DFW, MSP). |
| `flight_number` | string | No | Delta flight number to filter results within the route (e.g. 0742). Must be used together with origin and destination, not as a standalone search. |
| `origin` | string | Yes | 3-letter IATA origin airport code (e.g. JFK, ATL, LAX, ORD, SFO, SEA, BOS, DFW, MSP, DTW). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-delta-com-api-0bd9e73a/get_flight_schedules \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"<string>","destination":"<string>","flight_number":"<string>","origin":"<string>"}'
```

### get_trip_details

Looks up booking/reservation details using a confirmation number (PNR) and passenger name. Returns flight itinerary, passenger info, and booking details for valid reservations. Returns a descriptive error for invalid/expired PNRs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `confirmation_number` | string | Yes | 6-character booking confirmation number (PNR), e.g. SFTORB |
| `first_name` | string | No | Passenger's first name (optional but recommended) |
| `last_name` | string | Yes | Passenger's last name |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-delta-com-api-0bd9e73a/get_trip_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"confirmation_number":"<string>","first_name":"<string>","last_name":"<string>"}'
```
