Connect
Endpoint: wss://api.adsbiq.com/ws/
Authenticate by registered feeder IP or append ?token=YOUR_API_KEY. Keep credentials out of public client code and logs. Connections negotiate permessage-deflate; the server pings every 30 seconds.
const aircraft = new Map(); let lastSeq;
const ws = new WebSocket("wss://api.adsbiq.com/ws/?lat=40.7&lon=-74.0&token=YOUR_API_KEY");
ws.onmessage = ({data}) => { const msg = JSON.parse(data);
if (msg.type === "delta" && lastSeq !== undefined && msg.seq !== lastSeq + 1) return ws.close();
lastSeq = msg.seq;
if (msg.type === "full") { aircraft.clear(); msg.ac.forEach(ac => aircraft.set(ac.hex, ac)); }
else { (msg.new || []).forEach(ac => aircraft.set(ac.hex, ac));
(msg.update || []).forEach(ac => aircraft.set(ac.hex, {...aircraft.get(ac.hex), ...ac}));
(msg.remove || []).forEach(hex => aircraft.delete(hex)); }
};
Channels and geographic filtering
| Channel | URL | Cadence |
|---|---|---|
| Global | /ws/ | Tier-dependent; contributors normally 10 seconds |
| Zone (250 nm) | /ws/?lat=40.7&lon=-74.0 | 1 second |
Switch with {"action":"set_zone","lat":40.7,"lon":-74.0} or {"action":"set_global"}.
Snapshot and delta contract
The first frame is type: "full" with an ac array. Later delta frames contain full objects in new, sparse patches in update, and ICAO hex identifiers in remove. Merge sparse updates; never replace stored state with a patch.
seq is monotonic. On a gap, malformed frame, or reconnect, discard local state and reconnect for a fresh full snapshot. Delta frames may omit total.
Limits, volume, and compatibility
Prefer zone mode when global coverage is unnecessary. Free non-feeders receive a reduced cadence; contributors receive the normal stream. Excessive connections may be limited under fair use. Tested with browser WebSocket clients and Python websockets. Protocol schema version: 1.
Troubleshooting
401/403: verify feeder IP or API key.- State drift or sequence gap: reconnect and rebuild from
full. - High bandwidth: enable compression and use a zone.