# 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-14).

Search live flight itineraries, fares, schedules, stops, and emissions between airports by IATA code, returning structured JSON comparable to Google Flights.

## Facts

- Endpoint: GET https://flights.use.x402atlas.com/search/:departure/:arrival
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/flight-search-airfares-980eb512
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ioVcYwaV8CXDihif5GNid

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-980eb512
```

Example prompt: Can you search for available flights from JFK to LAX and show me the best itineraries, prices, airlines, and number of stops?

## When to prefer this

Choose this endpoint when you need structured, machine-readable flight search results (itineraries, prices, schedules, stops, emissions) for a given airport pair without scraping a travel website. It is ideal for agents automating travel planning, fare comparison, or itinerary generation where Google Flights-style data is needed as clean JSON. Prefer this over a generic web search when you need normalized, schema-consistent flight data ready for downstream processing.

## Known failure modes

- Invalid or unsupported IATA airport codes return an error or empty results
- More than five IATA codes in departure or arrival parameter violates schema pattern
- No flights available for the requested route returns empty flight arrays
- Upstream data provider outage may result in stale or unavailable pricing
- Malformed IATA codes (wrong length or non-alphabetic) are rejected by regex validation

## How this service works

Flight search by departure and arrival airports in the URL — compare live itineraries, fares, schedules, stops and emissions across airlines, similar to Google Flights, as clean JSON.

## Output

A JSON object containing a list of best and other available flight itineraries for the given route, each with airline name and logo, flight number, airplane type, departure and arrival times and airports, segment duration, number of stops, legroom, travel class, fare price, trip type, currency, and carbon emissions data. Results include both 'best_flights' (top recommended) and 'other_flights' arrays, plus airport metadata.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "pathParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "departure",
      "arrival"
     ],
     "properties": {
      "arrival": {
       "type": "string",
       "pattern": "^[A-Za-z]{3}(,[A-Za-z]{3}){0,4}$",
       "description": "Arrival airport(s): one to five comma-separated IATA codes"
      },
      "departure": {
       "type": "string",
       "pattern": "^[A-Za-z]{3}(,[A-Za-z]{3}){0,4}$",
       "description": "Departure airport(s): one to five comma-separated IATA codes"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "queried_at",
      "departure_id",
      "arrival_id",
      "outbound_date",
      "trip_type",
      "travel_class",
      "currency",
      "best_flights",
      "other_flights"
     ],
     "properties": {
      "airports": {
       "type": "array",
       "items": {
        "type": "object"
       }
      },
      "currency": {
       "type": "string"
      },
      "trip_type": {
       "enum": [
        "round_trip",
        "one_way"
       ],
       "type": "string"
      },
      "arrival_id": {
       "type": "string"
      },
      "queried_at": {
       "type": "string",
       "format": "date-time"
      },
      "return_date": {
       "type": "string",
       "format": "date"
      },
      "best_flights": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string"
         },
         "price": {
          "type": "number"
         },
         "flights": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "airline": {
             "type": "string"
            },
            "legroom": {
             "type": "string"
            },
            "airplane": {
             "type": "string"
        
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/flight-search-airfares-980eb512/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)
