# Airlines Reference – Airlines by Country

> Airlines Reference – Airlines by Country is a paid API for AI agents from airlines-reference.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-02).

Returns a paginated list of airlines registered in a given country (by OpenFlights name), with optional active/inactive filter, or a country-level summary count via 'list'.

## Facts

- Endpoint: GET https://airlines-reference.x402tookit.com/airlines-by-country?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/airlines-reference-airlines-by-country-36d0597b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZyiOBfnRDGnDwP5vv4tZK

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 airlines-reference-airlines-by-country-36d0597b
```

Example prompt: Can you list the active airlines registered in Japan using the OpenFlights reference data? Show me up to 50 results.

## When to prefer this

Use this endpoint when you need to enumerate or count airlines by country using OpenFlights reference data, with control over active/inactive filtering and pagination. Prefer this over the name-search sibling when you know the country and want a complete list rather than a keyword match. Choose the 'list' mode when you need a cross-country airline count summary.

## Known failure modes

- Missing required 'country' query parameter returns an error
- Country name not matching OpenFlights spelling returns zero results
- Offset beyond total results returns empty results array
- Invalid 'active' filter value may return unexpected results
- Data is a static snapshot (circa 2017), so recently founded or dissolved airlines may be missing

## How this service works

List airlines of a country (name as OpenFlights spells it) with active filter and paging; 'list' gives country counts.

## Output

Returns a JSON object with a paginated array of airline records (name, IATA, ICAO, callsign, alias, active flag, OpenFlights ID, route count in snapshot), plus totalInCountry, matching count, offset, country echoed back, data source attribution, and an asOf timestamp. When country='list', returns per-country airline counts instead.

## 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": [
      "country"
     ],
     "properties": {
      "limit": {
       "type": "integer",
       "description": "Results 1 to 100 (default 50)"
      },
      "active": {
       "type": "string",
       "description": "Y active only (default), N inactive only, any"
      },
      "offset": {
       "type": "integer",
       "description": "Skip this many results (default 0)"
      },
      "country": {
       "type": "string",
       "description": "Country name like 'United States' or 'Japan', or 'list' for all country counts"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "offset": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "country": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "results": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "iata": {
          "type": [
           "null",
           "string"
          ]
         },
         "icao": {
          "type": [
           "null",
           "string"
          ]
         },
         "name": {
          "type": [
           "null",
           "string"
          ]
         },
         "alias": {
          "type": [
           "null",
           "string"
          ]
         },
         "active": {
          "type": [
           "boolean",
           "null"
          ]
         },
         "country": {
          "type": [
           "null",
           "string"
          ]
         },
         "callsign": {
     
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/airlines-reference-airlines-by-country-36d0597b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from airlines-reference.x402tookit.com](https://www.zero.xyz/host/airlines-reference.x402tookit.com/llms.txt)
