# Flight Search (Google Flights via ZeroClick)

> Flight Search (Google Flights via ZeroClick) is a paid API for AI agents from ZeroClick x402 Service Registry at flights.withzero.ai, paid per call via MPP, $0.05/call, status healthy (last checked 2026-10-11, last successful call 2026-09-14).

Searches one-way or round-trip flights between two airports with real-time pricing and schedules sourced from Google Flights.

## Facts

- Endpoint: POST https://flights.withzero.ai/run?utm_source=zero.xyz
- Price: $0.05/call
- Payment: MPP
- Status: healthy
- Last checked: 2026-10-11
- Last successful call: 2026-09-14
- Success rate: 93% of calls made through Zero
- Rating: 3.1 / 5 from 4 reviews
- Activations on Zero: 75
- Provider: ZeroClick x402 Service Registry
- Website: https://withzero.ai
- Tags: travel, flights, airline, search, booking
- Canonical page: https://www.zero.xyz/c/zeroclick-x402-service-registry-flight-search-cd3e3f02
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jQP7Ag8XgOInFHQzUhFgI

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 zeroclick-x402-service-registry-flight-search-cd3e3f02 -d '<json body>'
```

Example prompt: Search for round-trip flights from LAX to JFK for 1 adult, departing July 15 and returning July 22 — nonstop only, show me the top 5 options with prices and airlines.

## When to prefer this

Use this endpoint when you need real-time Google Flights pricing and schedule data for a specific route and date. Ideal for travel planning agents that need live fare comparisons, itinerary building, or helping users find the cheapest or most convenient flight options. Prefer this over static flight databases when freshness and actual booking prices matter.

## Known failure modes

- Invalid IATA code returns an error or empty results
- No flights available for the requested route/date returns an empty results array
- Past or unparseable departure date causes a validation error
- Exceeding maxResults limit of 20 returns an error
- Network timeout from Google Flights upstream causes a 5xx response

## How this service works

Search flights between airports with real-time pricing from Google Flights. Input: origin/destination IATA codes, departure date, optional return date, stop preferences. Output: flight offers with prices, airlines, schedules, stops, and segment details. Supports one-way and round-trip searches.

## Output

Returns an array of flight offers, each with airline name, formatted price in USD, total duration, number of stops, departure and arrival times, a booking link, and full segment-level details (flight number, aircraft type, per-leg departure/arrival airports and times). Also echoes back origin, destination, departure date, return date, and result count.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "origin",
  "destination",
  "departureDate"
 ],
 "properties": {
  "stops": {
   "enum": [
    "any",
    "nonstop",
    "1stop"
   ],
   "type": "string",
   "default": "any",
   "description": "Stop preference (default: any)"
  },
  "adults": {
   "type": "integer",
   "default": 1,
   "maximum": 9,
   "minimum": 1,
   "description": "Number of adult passengers (default: 1)"
  },
  "origin": {
   "type": "string",
   "maxLength": 4,
   "minLength": 3,
   "description": "Origin airport IATA code (e.g. \"LAX\")"
  },
  "maxResults": {
   "type": "integer",
   "default": 5,
   "maximum": 20,
   "minimum": 1,
   "description": "Maximum results to return (default: 5)"
  },
  "returnDate": {
   "type": "string",
   "description": "Return date for round trip (YYYY-MM-DD). Omit for one-way."
  },
  "destination": {
   "type": "string",
   "maxLength": 4,
   "minLength": 3,
   "description": "Destination airport IATA code (e.g. \"JFK\")"
  },
  "departureDate": {
   "type": "string",
   "description": "Departure date (YYYY-MM-DD)"
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "origin",
  "destination",
  "departureDate",
  "returnDate",
  "resultCount",
  "results"
 ],
 "properties": {
  "origin": {
   "type": "string",
   "description": "Origin airport"
  },
  "results": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "airline",
     "price",
     "priceFormatted",
     "duration",
     "stops",
     "departureTime",
     "arrivalTime",
     "segments",
     "bookingLink"
    ],
    "properties": {
     "price": {
      "type": "number",
      "description": "Price in USD"
     },
     "stops": {
      "type": "number",
      "description": "Number of stops (0 = direct)"
     },
     "airline": {
      "type": "string",
      "description": "Primary airline"
     },
     "duration": {
      "type": "string",
      "description": "Total duration (e.g. \"5h 30m\")"
     },
     "segments": {
      "type": "array",
      "items": {
       "type": "object",
       "required": [
        "airline",
        "flightNumber",
        "departure",
        "arrival",
        "departureTime",
        "arrivalTime",
        "duration",
        "airplane"
       ],
       "properties": {
        "airline": {
         "type": "string",
         "description": "Airline name"
        },
        "arrival": {
         "type": "string",
         "description": "Arrival airport IATA code"
        },
        "airplane": {
         "type": "string",
         "nullable": true,
         "description": "Aircraft type"
        },
        "duration": {
         "type": "string",
         "description": "Segment duration (e.g. \"5h 30m\")"
        },
        "departure": {
         "type": "string",
         "description": "Departure airport IATA code"
        },
        "arrivalTime": {
         "type": "string",
         "description": "Arrival time"
        },
        "flightNumber": {
         "type": "string",
         "description": "Flight number (e.g. \"DL 123\")"
        },
        "departureTime": {
         "type": "string",
         "description": "Departure time"
        }
       },
       "additionalProperties": false
      },
      "description": "Flight segments"
     },
     "arrivalTime": {
      "type": "string",
      "description": "Final arrival time"
     },
     "bookingLink": {
      "type": "string",
      "nullable": true,
      "description": "Link to book (if available)"
     },
     "departureTime": {
      "type": "string",
      "description": "First depa
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/zeroclick-x402-service-registry-flight-search-cd3e3f02/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from flights.withzero.ai](https://www.zero.xyz/host/flights.withzero.ai/llms.txt)
