Real-Time API
Stream live aircraft data, safety alerts, and aviation weather via Socket.IO.
The SkySpy Real-Time API uses Socket.IO to stream aircraft positions, safety events, and aviation data to your application in real-time.
%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#1e3a5f', 'primaryTextColor': '#fff', 'primaryBorderColor': '#3b82f6', 'lineColor': '#60a5fa'}}}%%
flowchart LR
subgraph Server["🖥️ SkySpy API"]
DATA["📡 Live Data"]
SOCKETIO["🔌 Socket.IO"]
end
subgraph Clients["📱 Your Apps"]
WEB["🌐 Web App"]
MOBILE["📲 Mobile App"]
BOT["🤖 Discord Bot"]
end
DATA --> SOCKETIO
SOCKETIO <-->|"⚡ Bi-directional"| WEB
SOCKETIO <-->|"⚡ Bi-directional"| MOBILE
SOCKETIO <-->|"⚡ Bi-directional"| BOT
style Server fill:#0d4f8b,stroke:#3b82f6,stroke-width:2px,color:#fff
style Clients fill:#065f46,stroke:#10b981,stroke-width:2px,color:#fff
Quick Start
Connection Settings
| Setting | Value |
|---|---|
| URL | http://<host>:5000 |
| Path | /socket.io/socket.io |
| Transports | websocket, polling |
| Query: topics | Comma-separated list of topics |
Topics
Comparison: Socket.IO vs SSE
| Feature | Socket.IO | SSE |
|---|---|---|
| Direction | Bi-directional | Server → Client only |
| Request/Response | ✅ Yes | ❌ No |
| Weather API | ✅ Yes | ❌ No |
| Browser Support | Requires library | Native EventSource |
| Best For | Full-featured apps | Simple dashboards |
Implementation
📤 Events
Aircraft, safety, alert, and ACARS events
🔄 Request/Response
Fetch weather, airspace, and aircraft info
⚛️ React Hook
useSkySpySocket hook for React apps
Next Steps
Updated 7 days ago