# ADS-B Exchange aircraft squawking a code API

Search ADS-B Exchange aircraft by a four-digit squawk code via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as code, limit, output, and retrieve structured data including source aircraft address, source transponder squawk string, separate source emergency-state field, and selected squawk-code context for code lookup, and observation review.

Documentation: https://openany.si/market/apis/ads-b-exchange/ads-b-exchange-aircraft-squawking-a-code-api/?offering=222024ac-cbb8-4e4e-bfc9-1a498d55076a
API ID: 222024ac-cbb8-4e4e-bfc9-1a498d55076a
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/adsbexchange/v1/squawk
Page update time: 2026-12-03T02:47:13.467Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:47:11.779Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "ADS-B Exchange aircraft squawking a code API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Squawk code (4 octal digits), default 7700."
        },
        "limit": {
          "type": "integer",
          "description": "Aircraft per page (1-500, default 100)."
        },
        "offset": {
          "type": "integer",
          "description": "Skip this many aircraft."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "aircraft": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "adsb_version": {
            "type": "integer"
          },
          "aircraft_type": {
            "type": "string"
          },
          "altitude_baro_ft": {
            "type": "integer"
          },
          "altitude_geom_ft": {
            "type": "integer"
          },
          "callsign": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "emergency": {
            "type": "string"
          },
          "ground_speed_kt": {
            "type": "number"
          },
          "hex": {
            "type": "string"
          },
          "indicated_airspeed_kt": {
            "type": "null"
          },
          "interesting": {
            "type": "boolean"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "mach": {
            "type": "null"
          },
          "magnetic_heading_deg": {
            "type": "null"
          },
          "messages": {
            "type": "integer"
          },
          "military": {
            "type": "boolean"
          },
          "nac_p": {
            "type": "integer"
          },
          "nac_v": {
            "type": "integer"
          },
          "nic": {
            "type": "integer"
          },
          "on_ground": {
            "type": "boolean"
          },
          "outside_air_temp_c": {
            "type": "null"
          },
          "qnh_hpa": {
            "type": "null"
          },
          "receivers": {
            "type": "integer"
          },
          "registration": {
            "type": "string"
          },
          "roll_deg": {
            "type": "null"
          },
          "rssi": {
            "type": "number"
          },
          "sda": {
            "type": "integer"
          },
          "seconds_since_position": {
            "type": "integer"
          },
          "seconds_since_seen": {
            "type": "integer"
          },
          "selected_altitude_fms_ft": {
            "type": "null"
          },
          "selected_altitude_ft": {
            "type": "null"
          },
          "selected_heading_deg": {
            "type": "null"
          },
          "sil": {
            "type": "integer"
          },
          "source": {
            "type": "string"
          },
          "squawk": {
            "type": "string"
          },
          "total_air_temp_c": {
            "type": "null"
          },
          "track_deg": {
            "type": "number"
          },
          "track_rate": {
            "type": "null"
          },
          "true_airspeed_kt": {
            "type": "null"
          },
          "true_heading_deg": {
            "type": "null"
          },
          "vertical_rate_baro_fpm": {
            "type": "integer"
          },
          "vertical_rate_geom_fpm": {
            "type": "null"
          },
          "wind_direction_deg": {
            "type": "null"
          },
          "wind_speed_kt": {
            "type": "null"
          }
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "fetched_at": {
      "type": "string"
    },
    "next_offset": {
      "type": "integer"
    },
    "offset": {
      "type": "integer"
    },
    "squawk": {
      "type": "string"
    },
    "time": {
      "type": "string"
    },
    "total": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/adsbexchange/v1/squawk?code=7000&limit=1&output=json&raw=0' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "aircraft": [
    {
      "adsb_version": 2,
      "aircraft_type": "PA34",
      "altitude_baro_ft": 1425,
      "altitude_geom_ft": 1825,
      "callsign": "PHAPF",
      "category": "A1",
      "emergency": "none",
      "ground_speed_kt": 109.2,
      "hex": "486518",
      "indicated_airspeed_kt": null,
      "interesting": false,
      "latitude": 38.697006,
      "longitude": -8.9861,
      "mach": null,
      "magnetic_heading_deg": null,
      "messages": 82,
      "military": false,
      "nac_p": 10,
      "nac_v": 2,
      "nic": 9,
      "on_ground": false,
      "outside_air_temp_c": null,
      "qnh_hpa": null,
      "receivers": 4,
      "registration": "PH-APF",
      "roll_deg": null,
      "rssi": -6.3,
      "sda": 2,
      "seconds_since_position": 0,
      "seconds_since_seen": 0,
      "selected_altitude_fms_ft": null,
      "selected_altitude_ft": null,
      "selected_heading_deg": null,
      "sil": 3,
      "source": "adsb_icao",
      "squawk": "7000",
      "total_air_temp_c": null,
      "track_deg": 74.1,
      "track_rate": null,
      "true_airspeed_kt": null,
      "true_heading_deg": null,
      "vertical_rate_baro_fpm": 640,
      "vertical_rate_geom_fpm": null,
      "wind_direction_deg": null,
      "wind_speed_kt": null
    }
  ],
  "cached": false,
  "count": 1,
  "credits_used": 1,
  "fetched_at": "2026-11-19T12:23:53.502Z",
  "next_offset": 1,
  "offset": 0,
  "squawk": "7000",
  "time": "2026-11-19T12:23:53.001Z",
  "total": 199
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- apish: https://openany.si/market/apis/ads-b-exchange/ads-b-exchange-aircraft-squawking-a-code-api/?offering=222024ac-cbb8-4e4e-bfc9-1a498d55076a

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
