# American Airlines — 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 real-time American Airlines flight information including departure/arrival times, gates, terminals, and aircraft details, plus look up airports and countries to plan your travel. Get live flight status updates and discover available amenities for your journey.

**Category:** Travel | **Website:** [www.aa.com/](https://www.aa.com/) | **Docs:** [parse.bot/marketplace/66ac517e-6342-4cea-9ecc-523ee1ace934/aa-com-api](https://parse.bot/marketplace/66ac517e-6342-4cea-9ecc-523ee1ace934/aa-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-aa-com-api-66ac517e/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_countries

Get list of all countries served by American Airlines airports. Returns the full set of countries where AA operates or partners with carriers.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `locale` | string | No | Locale for country names (e.g., 'en_US') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-aa-com-api-66ac517e/get_countries \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"locale":"<string>"}'
```

### get_flight_status

Get real-time flight status by flight number and date. Returns detailed information including departure/arrival times, gates, terminals, aircraft type, amenities (WiFi, power ports), and current status (on time, delayed, canceled). A single flight number may resolve to multiple legs. The response always includes a `found` boolean; when false the `flights` array is empty.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `carrier` | string | No | Airline code (e.g., 'AA' for American Airlines) |
| `date` | string | No | Flight date in YYYY-MM-DD format. When omitted, defaults to today's date (UTC). |
| `flight_number` | string | Yes | Flight number (e.g., '100', '2345') |

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

### search_airports

Search for airports by name, city, or IATA code. Returns matching airports with their codes and locations. Partial matches are supported; searching 'New' returns New York area airports.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search term - airport name, city name, or IATA code (e.g., 'LAX', 'New York', 'Chicago') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-aa-com-api-66ac517e/search_airports \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
