# Skiplagged — 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 flights across airlines including hidden-city ticketing options, and look up airport information by name or code to find the best travel deals. Access Skiplagged's flight inventory and routing data to discover cheaper itineraries and alternative airport combinations.

**Category:** Travel | **Website:** [skiplagged.com/](https://skiplagged.com/) | **Docs:** [parse.bot/marketplace/3bb9c6c3-ec6d-48b3-a229-bc8bf03838ff/skiplagged-com-api](https://parse.bot/marketplace/3bb9c6c3-ec6d-48b3-a229-bc8bf03838ff/skiplagged-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-skiplagged-com-api-3bb9c6c3/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### search_airports

Search for airports and cities by name or IATA code. Returns matching airports with their codes, city names, labels, and parent codes. Useful for resolving user-typed location names into IATA codes for use in search_flights.

**Estimated cost:** Metered

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

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

### search_flights

Search for flight itineraries between two airports on a given date. Returns all available flights including hidden-city itineraries with full segment details, pricing, and duration. Results are sorted by price by default. Polls for additional results automatically. Each itinerary includes segments with airline, timing, and duration; a hidden-city flag when the booked route is longer than the intended destination; and a booking link. Pagination is not supported — the max_results param caps the total returned in one call.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `adults` | string | No | Number of adult passengers. |
| `children` | string | No | Number of child passengers. |
| `depart` | string | No | Departure date in YYYY-MM-DD format. If omitted, defaults to 14 days from today. |
| `from` | string | Yes | Origin airport IATA code (e.g. JFK, ICT, ORD) |
| `max_results` | integer | No | Maximum number of itineraries to return. |
| `return` | string | No | Return date in YYYY-MM-DD format for round-trip searches. Omit for one-way. |
| `sort` | string | No | Sort order for results. |
| `to` | string | Yes | Destination airport IATA code (e.g. LAX, JFK, ORD) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-skiplagged-com-api-3bb9c6c3/search_flights \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"adults":"<string>","children":"<string>","depart":"<string>","from":"<string>","max_results":"<integer>","return":"<string>","sort":"<string>","to":"<string>"}'
```
