VATSIM Traffic over country

Updated Apr 09 2021

Return list of aircrafts that currently situated over specified country(-ies). This includes also pilots that don't have flight plan.

Output fields:

  • info: this key contain value found which represents number of found aircrafts with given parameters
  • result: will contain all found aircrafts and their details

Usage

Endpoint: /traffic_oc

Request method: GET

Headers:

Header parameterDescription
X-API-Key Your unique API key
filter REGEX-string that will be applied to filter countries that will be checked. Case-sensitive. This parameter represents Alpha-3 country codes (listed below).
Refer to manual to get familiar with Python regular expressions.
You can also test your expression here.

Alpha-3 country codes:

Contry codeCountry nameUS State codeUS State name
AFGAfghanistan US-AKAlaska
AGOAngola US-ALAlabama
ALBAlbania US-ARArkansas
AREUnited Arab Emirates US-AZArizona
ARGArgentina US-CACalifornia
ARMArmenia US-COColorado
ATAAntarctica US-CTConnecticut
ATFFrench Southern and Antarctic Lands US-DCDistrict of Columbia
AUSAustralia US-DEDelaware
AUTAustria US-FLFlorida
AZEAzerbaijan US-GAGeorgia
BDIBurundi US-HIHawaii
BELBelgium US-IAIowa
BENBenin US-IDIdaho
BFABurkina Faso US-ILIllinois
BGDBangladesh US-INIndiana
BGRBulgaria US-KSKansas
BHSThe Bahamas US-KYKentucky
BIHBosnia and Herzegovina US-LALouisiana
BLRBelarus US-MAMassachusetts
BLZBelize US-MDMaryland
BMUBermuda US-MEMaine
BOLBolivia US-MIMichigan
BRABrazil US-MNMinnesota
BRNBrunei US-MOMissouri
BTNBhutan US-MSMississippi
BWABotswana US-MTMontana
CAFCentral African Republic US-NCNorth Carolina
CANCanada US-NDNorth Dakota
CHESwitzerland US-NENebraska
CHLChile US-NHNew Hampshire
CHNChina US-NJNew Jersey
CIVIvory Coast US-NMNew Mexico
CMRCameroon US-NVNevada
CODDemocratic Republic of the Congo US-NYNew York
COGRepublic of the Congo US-OHOhio
COLColombia US-OKOklahoma
CRICosta Rica US-OROregon
CUBCuba US-PAPennsylvania
CYPCyprus US-PRPuerto Rico
CZECzech Republic US-RIRhode Island
DEUGermany US-SCSouth Carolina
DJIDjibouti US-SDSouth Dakota
DNKDenmark US-TNTennessee
DOMDominican Republic US-TXTexas
DZAAlgeria US-UTUtah
ECUEcuador US-VAVirginia
EGYEgypt US-VTVermont
ERIEritrea US-WAWashington
ESHWestern Sahara US-WIWisconsin
ESPSpain US-WVWest Virginia
ESTEstonia US-WYWyoming
ETHEthiopia
FINFinland
FJIFiji
FLKFalkland Islands
FRAFrance
GABGabon
GBRUnited Kingdom
GEOGeorgia
GHAGhana
GINGuinea
GMBGambia
GNBGuinea Bissau
GNQEquatorial Guinea
GRCGreece
GRLGreenland
GTMGuatemala
GUFFrench Guiana
GUYGuyana
HNDHonduras
HRVCroatia
HTIHaiti
HUNHungary
IDNIndonesia
INDIndia
IRLIreland
IRNIran
IRQIraq
ISLIceland
ISRIsrael
ITAItaly
JAMJamaica
JORJordan
JPNJapan
KAZKazakhstan
KENKenya
KGZKyrgyzstan
KHMCambodia
KORSouth Korea
KWTKuwait
LAOLaos
LBNLebanon
LBRLiberia
LBYLibya
LKASri Lanka
LSOLesotho
LTULithuania
LUXLuxembourg
LVALatvia
MARMorocco
MDAMoldova
MDGMadagascar
MEXMexico
MKDMacedonia
MLIMali
MLTMalta
MMRMyanmar
MNEMontenegro
MNGMongolia
MOZMozambique
MRTMauritania
MWIMalawi
MYSMalaysia
NAMNamibia
NCLNew Caledonia
NERNiger
NGANigeria
NICNicaragua
NLDNetherlands
NORNorway
NPLNepal
NZLNew Zealand
OMNOman
PAKPakistan
PANPanama
PERPeru
PHLPhilippines
PNGPapua New Guinea
POLPoland
PRIPuerto Rico
PRKNorth Korea
PRTPortugal
PRYParaguay
PSEWest Bank
QATQatar
ROURomania
RUSRussia
RWARwanda
SAUSaudi Arabia
SDNSudan
SENSenegal
SLBSolomon Islands
SLESierra Leone
SLVEl Salvador
SOMSomalia
SRBRepublic of Serbia
SSDSouth Sudan
SURSuriname
SVKSlovakia
SVNSlovenia
SWESweden
SWZSwaziland
SYRSyria
TCDChad
TGOTogo
THAThailand
TJKTajikistan
TKMTurkmenistan
TLSEast Timor
TTOTrinidad and Tobago
TUNTunisia
TURTurkey
TWNTaiwan
TZAUnited Republic of Tanzania
UGAUganda
UKRUkraine
URYUruguay
USAUnited States of America
UZBUzbekistan
VENVenezuela
VNMVietnam
VUTVanuatu
YEMYemen
ZAFSouth Africa
ZMBZambia
ZWEZimbabwe

Example request:

Python

    import requests

    url = "https://api.vacc-ua.org/api/traffic_oc"

    headers = {
        'X-API-Key': "123456",
        'filter': "POL|US-WA",
        'Cache-Control': "no-cache"
    }

    response = requests.request("GET", url, headers=headers)
    print(response.text)

PHP

    <?php

    $curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_PORT => "443",
        CURLOPT_URL => "https://api.vacc-ua.org/api/traffic_oc",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => array(
            "Cache-Control: no-cache",
            "X-API-Key: 123456",
            "filter: POL|US-WA"
        ),
    ));

    $response = curl_exec($curl);
    $err = curl_error($curl);

    curl_close($curl);

    if ($err) {
        echo "cURL Error #:" . $err;
    } else {
        echo $response;
    }