# Fanfare MLB Flight Search

> Fanfare MLB Flight Search is a paid API for AI agents from fanfare.run, paid per call via x402, $0.25/call, status unknown (last checked 2026-09-15).

Search one-way economy flights to the nearest airport for any MLB team's home stadium, returning price-sorted offers with carrier, times, and expiry.

## Facts

- Endpoint: GET https://fanfare.run/mlb/flights
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fanfare-a8d8d4f3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_i2JSWZX3qZO8PMx3c30qR

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 fanfare-a8d8d4f3
```

Example prompt: Find me the cheapest one-way economy flights from ORD to see the Cubs play on June 14th — just 1 passenger, I want to see what's available and how much they cost.

## When to prefer this

Use this endpoint when you need to find economy flight options specifically tied to attending an MLB game — it abstracts away the need to know which airport serves a given MLB stadium and delivers pre-sorted, price-optimized offers via Duffel. Prefer this over generic flight search APIs when the destination is defined by an MLB team rather than a city or airport.

## Known failure modes

- Invalid or unknown MLB team ID returns an error or empty results
- Date in the past or too far in advance may return no available offers
- Invalid IATA origin code returns an error
- No flights available for the requested route/date combination returns empty offers array
- Rate limiting or payment failure returns 402 or 429 status

## How this service works

Search one-way economy flights to the nearest airport for any MLB team's home stadium, powered by Duffel. Returns offers sorted by price with carrier, times, and expiry. Params: teamId, date (YYYY-MM-DD), origin (IATA code), passengers.

## Output

A list of flight offers sorted by price, each including carrier name, departure and arrival times, total price, and offer expiry timestamp, for routes to the nearest airport to the specified MLB team's home stadium.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "teamId",
      "date",
      "origin"
     ],
     "properties": {
      "date": {
       "type": "string",
       "description": "Departure date (YYYY-MM-DD)"
      },
      "origin": {
       "type": "string",
       "description": "Origin airport IATA code (e.g. JFK)"
      },
      "teamId": {
       "type": "string",
       "description": "MLB Stats API team ID"
      },
      "passengers": {
       "type": "integer",
       "default": 1,
       "description": "Number of adult passengers"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fanfare-a8d8d4f3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fanfare.run](https://www.zero.xyz/host/fanfare.run/llms.txt)
