# x402engine Flight Search API

> x402engine Flight Search API is a paid API for AI agents from x402engine.app, paid per call via x402, $0.02/call, status healthy (last checked 2026-09-14, last successful call 2026-09-08).

Searches for available flights between two airports on a given date, with optional filters for stops, class, price, and passengers, billed per call via USDC micropayment.

## Facts

- Endpoint: GET https://x402engine.app/api/travel/flights
- Price: $0.02/call
- Payment: x402
- Status: healthy
- Last checked: 2026-09-14
- Last successful call: 2026-09-08
- Success rate: 100% of calls made through Zero
- Rating: 5.0 / 5 from 2 reviews
- Activations on Zero: 7
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402engine-flight-search-api-70aa4efd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BO4TcuT2IVYLqVvR3F0zb

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 x402engine-flight-search-api-70aa4efd
```

Example prompt: Find me nonstop economy flights from JFK to LAX on May 15 for 2 adults — show options under $400 USD.

## When to prefer this

Choose this endpoint when an AI agent needs to search for real-time flight availability and pricing between two specific airports on a given date, especially in a pay-per-call context without a subscription. It is well-suited for travel agents, trip-planning bots, or any workflow where the agent needs live flight data billed as a microtransaction in USDC on Base, MegaETH, or Solana rather than through a traditional API key subscription.

## Known failure modes

- Missing required parameters (origin, destination, departureDate) returns a 400 validation error
- Invalid IATA airport codes return no results or an error
- Dates in the past or invalid date format (not YYYY-MM-DD) return an error
- No flights found for the given route/date combination returns an empty result set
- Payment failure or insufficient USDC balance returns HTTP 402
- Rate limiting or upstream flight data provider outage returns a 5xx error

## How this service works

Search flights via Google Flights (SerpApi). Returns best flights, prices, airlines, and price insights.

## Output

Returns a list of available flights matching the search criteria, including airline, departure and arrival times, number of stops, travel class, price in the requested currency, and flight duration. Results are filtered by any optional parameters such as max price, stop count, or travel class provided in the query.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "origin",
      "destination",
      "departureDate"
     ],
     "properties": {
      "stops": {
       "type": "string",
       "description": "0=Nonstop only, 1=Up to 1 stop, 2=Up to 2 stops"
      },
      "adults": {
       "type": "string",
       "default": "1",
       "description": "Number of adult passengers"
      },
      "origin": {
       "type": "string",
       "example": "JFK",
       "description": "Departure airport IATA code"
      },
      "children": {
       "type": "string",
       "description": "Number of children"
      },
      "currency": {
       "type": "string",
       "default": "USD",
       "description": "Currency code (e.g. USD, EUR)"
      },
      "maxPrice": {
       "type": "string",
       "description": "Maximum price filter"
      },
      "returnDate": {
       "type": "string",
       "description": "Return date for round trips (YYYY-MM-DD)"
      },
      "destination": {
       "type": "string",
       "example": "LAX",
       "description": "Arrival airport IATA code"
      },
      "travelClass": {
       "type": "string",
       "default": "1",
       "description": "1=Economy, 2=Premium Economy, 3=Business, 4=First"
      },
      "departureDate": {
       "type": "string",
       "example": "2026-04-15",
       "description": "Departure date (YYYY-MM-DD)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402engine-flight-search-api-70aa4efd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402engine.app](https://www.zero.xyz/host/x402engine.app/llms.txt)
