vNCRCC API Documentation

Real-time VATSIM aircraft tracking and monitoring for the Washington DC region

API Access

The API is available on two domains:

Documentation is available at /docs/ on both domains.

Overview

The vNCRCC API provides real-time access to VATSIM aircraft tracking data for the Washington DC region. The API monitors special airspace zones including the SFRA (Special Flight Rules Area), FRZ (Flight Restricted Zone), and P-56 Presidential restricted areas.

Note: All API endpoints return JSON responses. Data is cached server-side and updated approximately every 15 seconds from VATSIM.

Rate Limiting

Most endpoints are rate-limited to prevent abuse. Common limits are:

Response Caching

Precomputed endpoints (aircraft, SFRA, FRZ, P56) support HTTP caching with ETag headers for efficient bandwidth usage. Responses include Cache-Control headers allowing 10-second browser/CDN caching.

Base Endpoints

GET /health No limit
Health check endpoint for monitoring service availability.

Response:

{
  "status": "ok"
}
GET /api/version 6/min
Get the current deployment version (git commit hash and timestamp).

Response:

{
  "version": "abc1234",
  "timestamp": 1700000000,
  "status": "deployed"
}
GET /api/metrics No limit
Get high-level server metrics including active users and resource usage.

Response:

{
  "timestamp": 1700000000.0,
  "uptime_seconds": 86400,
  "active_users": 15,
  "request_rate": {...},
  "resources": {...}
}

Aircraft Endpoints

GET /api/v1/aircraft/latest 30/min
Get the latest raw VATSIM snapshot data (unfiltered).

Response:

{
  "data": {
    "pilots": [...],
    "general": {...}
  },
  "fetched_at": 1700000000.0
}
GET /api/v1/aircraft/list 30/min
Get filtered aircraft list. By default returns aircraft within 300nm of DCA. Uses precomputed cache for fast response.

Query Parameters:

range_nm float optional
Filter aircraft by distance from DCA in nautical miles

Response:

{
  "aircraft": [
    {
      "cid": "id-3f9a1c0b7e42",
      "callsign": "UAL123",
      "latitude": 38.8514,
      "longitude": -77.0377,
      "altitude": 5000,
      "groundspeed": 250,
      "heading": 180,
      "flight_plan": {...}
    }
  ],
  "vatsim_update_timestamp": "20231115120000",
  "computed_at": 1700000000.0
}
GET /api/v1/aircraft/list/history 30/min
Get aircraft with position history trails. Returns historical positions for tracked aircraft.

Query Parameters:

range_nm float optional
Filter aircraft by distance from DCA in nautical miles

Response:

{
  "history": {
    "id-3f9a1c0b7e42": [
      {"lat": 38.85, "lon": -77.03, "alt": 5000, "ts": 1700000000}
    ]
  },
  "fetched_at": 1700000000.0,
  "vatsim_update_timestamp": "20231115120000"
}

Controllers

GET /api/v1/controllers/ 30/min
Get currently active ZDC (Washington Center) controllers from vNAS. Filters for positions at PCT, DCA, NYG, ZDC, and ADW facilities.

Response:

{
  "controllers": [
    {
      "cid": "id-3f9a1c0b7e42",
      "callsign": "ZDC_CTR",
      "frequency": "132.850",
      "facility": "ZDC",
      "rating": 7
    }
  ],
  "count": 1
}

Airspace Monitoring (SFRA/FRZ)

GET /api/v1/sfra/ 30/min
Get aircraft currently inside the DC SFRA (Special Flight Rules Area). Only includes aircraft at or below 17,999 ft.

Query Parameters:

name string optional, default: "sfra"
Keyword to find the SFRA GeoJSON file

Response:

{
  "aircraft": [
    {
      "aircraft": {...},
      "matched_props": {"name": "SFRA"},
      "dca": {
        "radial_range": "DCA180015",
        "bearing": 180,
        "range_nm": 15.5
      }
    }
  ]
}
GET /api/v1/frz/ 30/min
Get aircraft currently inside the DC FRZ (Flight Restricted Zone). Only includes aircraft at or below 17,999 ft.

Query Parameters:

name string optional, default: "frz"
Keyword to find the FRZ GeoJSON file

Response:

{
  "aircraft": [
    {
      "aircraft": {...},
      "matched_props": {"name": "FRZ"},
      "dca": {
        "radial_range": "DCA090013",
        "bearing": 90,
        "range_nm": 13.2
      }
    }
  ]
}

P-56 Presidential TFR Monitoring

Warning: P-56 monitoring detects unauthorized airspace penetrations. Admin endpoints require authentication.
GET /api/v1/p56/ 30/min
Get current P-56 airspace breaches. Returns aircraft that crossed into P-56 zones based on trajectory analysis between snapshots.

Query Parameters:

name string optional, default: "p56"
Keyword to find the P-56 GeoJSON file

Response:

{
  "breaches": [
    {
      "identifier": "id-3f9a1c0b7e42",
      "callsign": "N12345",
      "cid": "id-3f9a1c0b7e42",
      "prev_position": {"lon": -77.03, "lat": 38.85},
      "latest_position": {"lon": -77.04, "lat": 38.86},
      "prev_ts": 1700000000.0,
      "latest_ts": 1700000015.0,
      "zones": ["P-56A"],
      "evidence": {...},
      "flight_plan": {...}
    }
  ],
  "history": {
    "events": [...],
    "current_inside": [...]
  }
}
GET /api/v1/p56/incidents 30/min
Get historical P-56 incidents logged to the database.

Query Parameters:

limit integer optional, default: 100
Maximum number of incidents to return

Response:

{
  "incidents": [
    {
      "detected_at": 1700000000.0,
      "callsign": "N12345",
      "cid": "id-3f9a1c0b7e42",
      "lat": 38.86,
      "lon": -77.04,
      "altitude": 3000,
      "zone": "P-56A",
      "evidence": "{...}"
    }
  ],
  "count": 1
}
POST /api/v1/p56/clear 6/min
Clear all P-56 history (events and current_inside). Requires admin password.

Request Body:

{
  "password": "your-admin-password"
}

Response:

{
  "status": "ok",
  "cleared": true
}
POST /api/v1/p56/purge 6/min
Purge specific P-56 events from history. Requires admin password. Used to remove false positives.

Request Body:

{
  "password": "your-admin-password",
  "keys": ["id-3f9a1c0b7e42:1700000000.0"],
  // OR
  "items": [
    {"cid": "id-3f9a1c0b7e42", "recorded_at": 1700000000.0}
  ]
}

Response:

{
  "status": "ok",
  "result": {
    "purged": 1
  }
}

VIP Aircraft Tracking

GET /api/v1/vip/ 30/min
Get currently active VIP aircraft (Air Force One, Marine One, etc.) on the VATSIM network. Scans globally with no range restriction.

Response:

{
  "aircraft": [
    {
      "cid": "id-3f9a1c0b7e42",
      "callsign": "AF1",
      "latitude": 38.8514,
      "longitude": -77.0377,
      "altitude": 35000,
      "flight_plan": {...}
    }
  ],
  "count": 1,
  "fetched_at": 1700000000.0
}

VSO (Virtual Special Operations)

GET /api/v1/vso/ 6/min
Get aircraft within specified range of DCA, optionally filtered by affiliation patterns in flight plan remarks.

Query Parameters:

range_nm integer optional, default: 60
Maximum range from DCA in nautical miles
affiliations string optional
Comma-separated list of patterns to match in remarks (e.g., "vusaf.us,vuscg,usnv")

Response:

{
  "aircraft": [
    {
      "aircraft": {...},
      "dca": {
        "radial_range": "DCA270045",
        "bearing": 270,
        "range_nm": 45.3
      },
      "matched_affiliations": ["vusaf.us"],
      "position_history": [...]
    }
  ]
}

Geography & Elevation

GET /api/v1/geo/ 30/min
Get GeoJSON features for specified geographic zones (SFRA, FRZ, P-56, etc.).

Query Parameters:

name string required
Keyword to find geo files (e.g., "sfra", "frz", "p56")

Response:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [...]
      },
      "properties": {...}
    }
  ]
}
GET /api/v1/elevation/ 60/min
Get ground elevation at specified coordinates using local raster data. Results are cached for 6 hours.

Query Parameters:

lat float required
Latitude in decimal degrees
lon float required
Longitude in decimal degrees

Response:

{
  "elevation_m": 25.5,
  "cached": false,
  "source": "local-raster"
}
GET /api/v1/incidents/ 6/min
Get all logged incidents (SFRA, FRZ, P-56 violations).

Query Parameters:

limit integer optional, default: 100
Maximum number of incidents to return

Response:

{
  "incidents": [...],
  "count": 10
}

Metrics & Monitoring

GET /api/v1/status/ 30/min
Get system status including surge mode activation and processing metrics.

Response:

{
  "status": "operational",
  "surge_mode_active": false,
  "total_aircraft_on_network": 450,
  "aircraft_processed": 120,
  "configured_radius_nm": 300,
  "effective_radius_nm": 300,
  "last_update": 1700000000.0,
  "message": "Surge mode reduces processing radius..."
}
GET /api/v1/metrics/ 30/min
Get comprehensive system metrics including active users, request rates, errors, and resource usage.

Response:

{
  "timestamp": 1700000000.0,
  "uptime_seconds": 86400,
  "active_users": 15,
  "request_rate": {
    "1min": 5.2,
    "5min": 4.8
  },
  "error_rate": {...},
  "delay": {...},
  "resources": {
    "cpu_percent": 15.5,
    "memory_percent": 42.3,
    "disk_usage_percent": 55.1
  },
  "endpoints": {...},
  "p56_purges": [...]
}
GET /api/v1/metrics/delay 30/min
Get detailed VATSIM data staleness/delay metrics with time-series history for graphing.

Response:

{
  "1min": {
    "avg": 2.5,
    "min": 1.2,
    "max": 5.3,
    "p50": 2.3,
    "p95": 4.8
  },
  "5min": {...},
  "history": [
    {"timestamp": 1700000000, "delay": 2.5},
    ...
  ]
}
GET /api/v1/metrics/vatsim-health 30/min
Diagnostic endpoint for VATSIM data pipeline health monitoring.

Response:

{
  "server_time": 1700000000.0,
  "fetcher_running": true,
  "last_fetch_ts": 1699999995.0,
  "vatsim_data_age": 2.5,
  "time_since_last_fetch": 5.0,
  "fetcher_status": "healthy",
  "latest_snapshot_ts": 1699999995.0,
  "time_since_snapshot": 5.0
}

Common Response Fields

Aircraft Object

Most endpoints return aircraft objects with the following common fields. For privacy, pilot and controller names are never returned, and VATSIM CIDs are replaced with an opaque token that is stable but cannot be converted back to a CID.

{
  "cid": "id-3f9a1c0b7e42",    // Opaque per-pilot token (not the VATSIM CID)
  "callsign": "UAL123",        // Aircraft callsign
  "latitude": 38.8514,         // Current latitude
  "longitude": -77.0377,       // Current longitude
  "altitude": 5000,            // Altitude in feet
  "groundspeed": 250,          // Ground speed in knots
  "heading": 180,              // Heading in degrees (0-360)
  "flight_plan": {             // Flight plan (if filed)
    "departure": "KDCA",
    "arrival": "KJFK",
    "route": "...",
    "remarks": "..."
  }
}

Timestamp Fields

DCA Radial/Range Format

Many endpoints include position relative to DCA (Ronald Reagan Washington National Airport):

{
  "radial_range": "DCA180015",  // Compact format: bearing (180°), range (15nm)
  "bearing": 180,               // Bearing from DCA in degrees
  "range_nm": 15.5              // Distance from DCA in nautical miles
}

Example Usage

JavaScript (Fetch API)

// Get aircraft within 50nm of DCA
const response = await fetch('https://api.vncrcc.org/api/v1/aircraft/list?range_nm=50');
const data = await response.json();
console.log(`Found ${data.aircraft.length} aircraft`);

// Get P-56 breaches
const p56Response = await fetch('https://api.vncrcc.org/api/v1/p56/');
const p56Data = await p56Response.json();
console.log(`Active breaches: ${p56Data.breaches.length}`);

Python (requests)

import requests

# Get aircraft list
response = requests.get('https://api.vncrcc.org/api/v1/aircraft/list',
                       params={'range_nm': 50})
data = response.json()
print(f"Found {len(data['aircraft'])} aircraft")

# Get SFRA traffic
sfra = requests.get('https://api.vncrcc.org/api/v1/sfra/').json()
print(f"Aircraft in SFRA: {len(sfra['aircraft'])}")

curl

# Get system status
curl https://api.vncrcc.org/api/v1/status/

# Get VIP aircraft
curl https://api.vncrcc.org/api/v1/vip/

# Get elevation at coordinates
curl "https://api.vncrcc.org/api/v1/elevation/?lat=38.8514&lon=-77.0377"