# Flight Search & Airfares

> Flight Search & Airfares is a paid API for AI agents from flights.use.x402atlas.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Search live flight itineraries and compare fares between two airports by departure and arrival IATA codes

## Facts

- Endpoint: GET https://flights.use.x402atlas.com/search/%7Bdeparture%7D/%7Barrival%7D
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/flight-search-airfares-c35e2ed7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DnSbXGcbdVyrBLHtp4MMm

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability flight-search-airfares-c35e2ed7
```

Example prompt: Can you search for round-trip economy flights from LHR to JFK departing August 11 and returning August 18, and show me the best fares with airline details and carbon emissions?

## When to prefer this

Use this endpoint when you need real-time flight search with fare comparison across a specific city-pair route, especially when you want structured data including price insights, carbon emissions, and itinerary details. Prefer this over generic travel aggregator scraping when you need clean JSON output suitable for agent reasoning or downstream booking workflows, and when cost-per-call economics ($0.05 USDC) fit your usage pattern.

## Known failure modes

- Invalid or unrecognized IATA airport codes return an error or empty results
- No flights available for the requested route and dates returns empty best_flights array
- Missing payment header triggers a 402 challenge response requiring X-PAYMENT header
- Malformed date parameters may cause request rejection
- Extremely obscure routes with no direct or connecting service return no results

## How this service works

**Flight Search & Airfares** on x402 Atlas — pay-per-call over the [x402 protocol](https://x402.org).

Paid routes are billed per call in USDC on Base, Polygon, or Arbitrum, starting at $0.005; each operation states its exact price below. Request a route with no payment to receive the `402` challenge, then repeat it with an `X-PAYMENT` header — an x402 client (`x402-fetch` / `x402-axios`) performs that exchange for you.

Full onboarding, quickstart, and the other APIs: https://use.x402atlas.com/docs

## Output

Returns a structured JSON object with the best matching flight itineraries including airline names, flight numbers, departure and arrival airports with times, total duration, travel class, ticket price in USD, carbon emissions data (this flight vs. typical), a departure token for return leg selection, and price insights including price level classification and typical price range for the route.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "currency": "USD",
  "trip_type": "round_trip",
  "arrival_id": "JFK",
  "queried_at": "2026-07-28T10:00:00Z",
  "return_date": "2026-08-18",
  "best_flights": [
   {
    "type": "Round trip",
    "price": 612,
    "flights": [
     {
      "airline": "British Airways",
      "duration": 475,
      "travel_class": "Economy",
      "flight_number": "EA 101",
      "arrival_airport": {
       "id": "JFK",
       "name": "John F. Kennedy International Airport",
       "time": "2026-08-11 13:25"
      },
      "departure_airport": {
       "id": "LHR",
       "name": "Heathrow Airport",
       "time": "2026-08-11 10:30"
      }
     }
    ],
    "total_duration": 475,
    "departure_token": "opaque-return-selection-token",
    "carbon_emissions": {
     "this_flight": 410000,
     "difference_percent": -8,
     "typical_for_this_route": 445000
    }
   }
  ],
  "departure_id": "LHR",
  "travel_class": "economy",
  "other_flights": [],
  "outbound_date": "2026-08-11",
  "price_insights": {
   "price_level": "typical",
   "lowest_price": 612,
   "typical_price_range": [
    540,
    760
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/flight-search-airfares-c35e2ed7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from flights.use.x402atlas.com](https://www.zero.xyz/host/flights.use.x402atlas.com/llms.txt)
