# ADS-B Exchange closest aircraft to a point API

Find the closest matching ADS-B Exchange aircraft to coordinates via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as lat, lon, output, and retrieve structured data including source aircraft address, distance nm, source aircraft latitude, and source aircraft longitude for point lookup, and observation detail.

Documentation: https://openany.si/ads-b-exchange/ads-b-exchange-closest-aircraft-to-a-point-api/94523a7c-b953-4e2e-923b-c721b04faec7/
API ID: 94523a7c-b953-4e2e-923b-c721b04faec7
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/adsbexchange/v1/closest
Page update time: 2026-12-03T02:47:13.443Z
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.
Contract update time: 2026-12-03T02:47:11.638Z. 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": []
  }
}
```

## Usage and limits
## ADS-B Exchange Closest Aircraft API

Pass lat and lon, optionally radius\_nm and supported aircraft filters. Unlike list operations, aircraft is a single returned object; preserve distance\_nm, on\_ground and position-age context.

## What You Can Build

- **Point lookup**: Keep the query coordinates and source distance attached.
- **Observation detail**: Retain source age and ground-state information.

## Returned Data

| Field | Meaning |
| --- | --- |
| `aircraft.hex` | Source aircraft address |
| `aircraft.distance_nm` | Source distance from the query point in nautical miles |
| `aircraft.latitude` | Source aircraft latitude |
| `aircraft.longitude` | Source aircraft longitude |
| `aircraft.seconds_since_position` | Seconds since source position update |
| `radius_nm` | Selected search radius in nautical miles |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "ADS-B Exchange closest aircraft to a point 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": {
        "lat": {
          "type": "number",
          "description": "Latitude."
        },
        "lon": {
          "type": "number",
          "description": "Longitude."
        },
        "radius_nm": {
          "type": "number",
          "description": "Search radius in nautical miles (1-500, default 100)."
        },
        "min_altitude_ft": {
          "type": "number",
          "description": "Only aircraft at or above this barometric altitude (feet)."
        },
        "max_altitude_ft": {
          "type": "number",
          "description": "Only aircraft at or below this altitude (feet)."
        },
        "military": {
          "type": "boolean",
          "description": "true: military aircraft only."
        },
        "squawk": {
          "type": "string",
          "description": "Only aircraft squawking this code (4 octal digits)."
        },
        "callsign_prefix": {
          "type": "string",
          "description": "Only callsigns starting with this (e.g. `BAW`)."
        },
        "type": {
          "type": "string",
          "description": "Only this ICAO aircraft type (e.g. `A320`)."
        },
        "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."
        }
      },
      "required": [
        "lat",
        "lon"
      ]
    },
    "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": "object",
      "properties": {
        "adsb_version": {
          "type": "integer"
        },
        "aircraft_type": {
          "type": "string"
        },
        "altitude_baro_ft": {
          "type": "null"
        },
        "altitude_geom_ft": {
          "type": "null"
        },
        "callsign": {
          "type": "null"
        },
        "category": {
          "type": "null"
        },
        "distance_nm": {
          "type": "number"
        },
        "emergency": {
          "type": "null"
        },
        "ground_speed_kt": {
          "type": "integer"
        },
        "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": "null"
        },
        "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": "null"
        },
        "seconds_since_position": {
          "type": "number"
        },
        "seconds_since_seen": {
          "type": "number"
        },
        "selected_altitude_fms_ft": {
          "type": "null"
        },
        "selected_altitude_ft": {
          "type": "null"
        },
        "selected_heading_deg": {
          "type": "null"
        },
        "sil": {
          "type": "integer"
        },
        "source": {
          "type": "string"
        },
        "squawk": {
          "type": "null"
        },
        "total_air_temp_c": {
          "type": "null"
        },
        "track_deg": {
          "type": "integer"
        },
        "track_rate": {
          "type": "null"
        },
        "true_airspeed_kt": {
          "type": "null"
        },
        "true_heading_deg": {
          "type": "null"
        },
        "vertical_rate_baro_fpm": {
          "type": "null"
        },
        "vertical_rate_geom_fpm": {
          "type": "null"
        },
        "wind_direction_deg": {
          "type": "null"
        },
        "wind_speed_kt": {
          "type": "null"
        }
      }
    },
    "applied_filters": {
      "type": "object",
      "properties": {}
    },
    "cached": {
      "type": "boolean"
    },
    "credits_used": {
      "type": "integer"
    },
    "fetched_at": {
      "type": "string"
    },
    "point": {
      "type": "object",
      "properties": {
        "lat": {
          "type": "number"
        },
        "lon": {
          "type": "number"
        }
      }
    },
    "radius_nm": {
      "type": "integer"
    },
    "time": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/adsbexchange/v1/closest?lat=51.47&lon=-0.45&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": 0,
    "aircraft_type": "TWR",
    "altitude_baro_ft": null,
    "altitude_geom_ft": null,
    "callsign": null,
    "category": null,
    "distance_nm": 0.1,
    "emergency": null,
    "ground_speed_kt": 0,
    "hex": "42584b",
    "indicated_airspeed_kt": null,
    "interesting": false,
    "latitude": 51.470575,
    "longitude": -0.447044,
    "mach": null,
    "magnetic_heading_deg": null,
    "messages": 8,
    "military": false,
    "nac_p": 11,
    "nac_v": null,
    "nic": 11,
    "on_ground": true,
    "outside_air_temp_c": null,
    "qnh_hpa": null,
    "receivers": 2,
    "registration": "TWR",
    "roll_deg": null,
    "rssi": -23.5,
    "sda": null,
    "seconds_since_position": 1.2,
    "seconds_since_seen": 1.2,
    "selected_altitude_fms_ft": null,
    "selected_altitude_ft": null,
    "selected_heading_deg": null,
    "sil": 2,
    "source": "adsb_icao_nt",
    "squawk": null,
    "total_air_temp_c": null,
    "track_deg": 0,
    "track_rate": null,
    "true_airspeed_kt": null,
    "true_heading_deg": null,
    "vertical_rate_baro_fpm": null,
    "vertical_rate_geom_fpm": null,
    "wind_direction_deg": null,
    "wind_speed_kt": null
  },
  "applied_filters": {},
  "cached": false,
  "credits_used": 1,
  "fetched_at": "2026-11-19T12:23:51.785Z",
  "point": {
    "lat": 51.47,
    "lon": -0.45
  },
  "radius_nm": 100,
  "time": "2026-11-19T12:23:51.001Z"
}
```

## 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.

## Common questions
### What radius is supported?
radius_nm accepts 1–500 nautical miles and defaults to 100, different from the Area Aircraft radius limit.

### Is aircraft a list?
This operation returns a single aircraft object. Do not apply the list endpoints' array structure to it.

### Can I filter the nearest candidate?
Supported filters include barometric altitude, military, squawk, callsign_prefix and ICAO aircraft type.

### Does the nearest observation prove an aircraft is overhead now?
Keep the returned distance, coordinates, source time and position age. Observation age and ground state remain relevant to interpretation.

### How do I bypass cached results?
Pass fresh=1. A cache bypass retrieves available source data; it does not make unpublished or restricted records available.

### Can I request CSV or NDJSON?
This OpenAny implementation serves JSON only. Omit output or set output=json.

## Available implementations
- apish: https://openany.si/ads-b-exchange/ads-b-exchange-closest-aircraft-to-a-point-api/94523a7c-b953-4e2e-923b-c721b04faec7/

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