# Rafid Intelligence Network — Flight Compare API

> Rafid Intelligence Network — Flight Compare API is a paid API for AI agents from api.rafidsystem.com, paid per call via x402, $0.15/call, status unknown (last checked 2026-10-30).

Compares flight options across providers and returns structured recommendations ranked by price, duration, stops, and reliability using deterministic weighted scoring.

## Facts

- Endpoint: POST https://api.rafidsystem.com/api/v1/x402/travel/flight-compare?utm_source=zero.xyz
- Price: $0.15/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rafid-intelligence-network-flight-compare-api-52ec8458
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y4768E3CQDWIFjblSegPh

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 rafid-intelligence-network-flight-compare-api-52ec8458 -d '<json body>'
```

Example prompt: Can you compare flights from London Heathrow to New York JFK departing on December 10th for 2 passengers in economy, and tell me which option is cheapest, fastest, and has the fewest stops?

## When to prefer this

Choose this endpoint when you need a structured, scored comparison of flight options rather than raw search results — it is ideal for AI agents that need to present a clear recommendation (cheapest, fastest, or best overall) without doing their own ranking logic. Prefer this over raw flight search APIs when deterministic weighted scoring with reason codes is needed for downstream decision-making in travel planning workflows.

## Known failure modes

- NO_FLIGHT_RESULTS returned when no flights found for the route/date combination — all ranked fields return null
- Upstream provider (letsfg) unavailable — provider status field indicates error
- Invalid route or date parameters cause empty comparison results
- Missing required body fields result in schema validation error
- Live data mode may return stale or incomplete results during provider outages

## How this service works

Rafid Agent API provides structured intelligence and paid APIs for AI agents across property, company and risk, supplier, finance, document, website, automotive, logistics, recruitment, trading, voice, video and business-planning workflows.

## Output

Returns a structured JSON object containing: the cheapest, fastest, and fewest-stops flight options; a recommended flight based on deterministic weighted scoring (price 50%, duration 25%, stops 15%, reliability 10%); a list of alternative options; price range and duration range across all results; provider name and upstream latency; search timestamp; methodology details; and reason codes (e.g. NO_FLIGHT_RESULTS) if no results are found.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "additionalProperties": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "fastest": null,
  "cheapest": null,
  "dataMode": "live",
  "provider": {
   "name": "letsfg",
   "status": "ok",
   "upstreamLatencyMs": 0
  },
  "comparison": {
   "priceRange": null,
   "durationRangeMinutes": null
  },
  "searchedAt": "2026-10-04T00:00:00.000Z",
  "fewestStops": null,
  "methodology": {
   "type": "deterministic_weighted_comparison",
   "scope": "Returned offers only",
   "weights": {
    "priceWeight": 0.5,
    "stopsWeight": 0.15,
    "durationWeight": 0.25,
    "reliabilityWeight": 0.1
   },
   "missingSignals": "Missing signals excluded"
  },
  "reasonCodes": [
   "NO_FLIGHT_RESULTS"
  ],
  "recommended": null,
  "alternatives": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rafid-intelligence-network-flight-compare-api-52ec8458/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.rafidsystem.com](https://www.zero.xyz/host/api.rafidsystem.com/llms.txt)
