Flights

A flight represents a departure point and an arrival point and an optional number of intermediary stops (vias).

Entry point
https://www.avdelphi.com/api/1.0/flights.svc
Parameter Type Values
api_key
mandatory Your API Key
api_password
mandatory Your API Password. Send this OR an access_token
api_access_token
mandatory Your API access token which can be used instead of sending your password.
cmd
mandatory API Command
itemlist
optional List of fields to return. Each command has a specific list of items that can be returned.
format
optional Data return type XML,JSON,CSV or CSV-
  • JSON is the default when no format parameter is specified
  • CSV output starts with a series of comment lines - starting with the # character. You may need to remove these before importing the CSV data.
  • CSV- output omits the comment lines - including any error messages.
search parameter
see note below Each command has a set of parameters that can be specified to identify the target data, such as registration, serial number etc.

Examples

Note When using the TEST credentials (TESTAPIKEY & TESTAPIKEYPASSWORD) the result flight will always be Swiss International flight 'LX16'.

Get a specific set of fields for a flight by flight code (flight number)
https://www.avdelphi.com/api/1.0/flights.svc?api_key=TESTAPIKEY&api_password=TESTAPIKEYPASSWORD&cmd=info&code=lx16&itemlist=code;from_airport;to_airport;days


Result (JSON)
{
	"api":"flight",
	"version":1,
	"command":"info",
	"num_results":1,
	"result_type":"valid",
	"results_limit":5,
	"rate_limit":
	{
		"flights":
		{
			"current":8,"maximum":5
		}
	},
	"result":
	[
		{
			"code":"SWR16",
			"from_airport":"LSZH",
			"to_airport":"KJFK",
			"days":"1111111"
		}
	]
}


https://www.avdelphi.com/api/1.0/flights.svc?api_key=TESTAPIKEY&api_password=TESTAPIKEYPASSWORD&cmd=info&code=lx16&itemlist=from_airport;to_airport;days&format=csv


Result (CSV)
#api=flight
#version=1
#command=info
#result_type=valid
#from_airport,to_airport,days
LSZH,KJFK,1111111



https://www.avdelphi.com/api/1.0/flights.svc?api_key=TESTAPIKEY&api_password=TESTAPIKEYPASSWORD&cmd=info&code=lx16&itemlist=from_airport;to_airport;days&format=xml


Result (XML)
<?xml version="1.0" encoding="UTF-8"?>
<data>
   <api>flight</api>
   <version>1</version>
   <command>info</command>
   <num_results>2</num_results>
   <result_type>valid</result_type>
   <results_limit>5</results_limit>
   <rate_limit>
      <flights>
         <current>10</current>
         <maximum>5</maximum>
      </flights>
   </rate_limit>
   <result>
      <item0>
         <from_airport>LSZH</from_airport>
         <to_airport>KJFK</to_airport>
         <days>1111111</days>
      </item0>
   </result>
</data>

Pricing

Access to this API is based on a per flight per month pricing plan. Volume discounts apply. Contact your API team using the contact form below to create or edit your plan.

Mandatory Parameters

api_key

TypeMandatory
ContentHexadecimal value of your API key.
Get your API key here if you don't have one.
Case sensitiveYES
Example
api_key=NTlhZGUl7kZW

Back to top 

api_password

TypeMandatory (You must send either password or access token with each request)
ContentHexadecimal value of your API password.
Get your API key here if you don't have one.
Case sensitiveYES
Example
api_password=ciUyQmdPWTJaTGNQc2pkU05tRlVNaWZZ11NpdCUyRmVpVEF6THBm7SUzRA

Back to top 

api_access_token

TypeMandatory (You must send either password or access token with each request)
ContentHexadecimal value of your API access token.
Click on any API Key here to manage access tokens.
Case sensitiveYES
Example
api_access_token=2d1a099fd880c0fcfd6fd5e63a769e11b2c2db92

Back to top 

cmd

TypeMandatory
ContentAPI command to execute
Case sensitiveNo
Command Purpose
info Retrieve information about a specific flight. The list of data fields returned is specified using the itemlist parameter.
news Show any recent news items relating to this flight.
position Gets the latest position report for the flight. The return field list is set - latitude, longitude, altitude and timestamp of that position report.
Example
cmd=info
cmd=news
cmd=position

Back to top 

info

FunctionRetrieve information about a specific flight. The list of data fields returned is specified using the itemlist parameter.
Search ParameterUse any ONE of the following parameters to specify which airport to return data for.

ParameterDescription
codeFlight number. Use the basic flight number without leading zeros.
Back to commands 

news

FunctionShow any recent news items relating to this flight.
Search ParameterUse any ONE of the following parameters to specify which airport to return data for.

ParameterDescription
codeFlight number. Use the basic flight number without leading zeros.
Back to commands 

position

FunctionGets the latest position report for the flight. The return field list is set - latitude, longitude, altitude and timestamp of that position report.
Search ParameterUse any ONE of the following parameters to specify which airport to return data for.

ParameterDescription
Back to commands 

status

FunctionShows the current status of the flight where available.
Search ParameterUse any ONE of the following parameters to specify which airport to return data for.

ParameterDescription
codeFlight number. Use the basic flight number without leading zeros.
Back to commands 

Optional Parameters

format

TypeOptional
ContentSpecifies the data return format JSON,XML or CSV(-). By default, data is returned as JSON.
Case sensitiveNo
Example
format=xml
format=csv
format=csv-
format=json

Back to top 

itemlist

TypeOptional depending on command used. Some commands return default data, others allow you to specify which fields to return.
ContentList of fields to retrieve separated with semi-colons.
Case sensitiveNo
Fieldname Description
code Flight number. Use the basic flight number without leading zeros.
codeshares
alt_codes
from_airport
from_airport_iata
from_airport_icao
to_airport
to_airport_iata
to_airport_icao
via
via_airport_iata
via_airport_icao
fromtopair_iata
fromtopair_icao
operator
operator_icao
distance
duration_minutes
equipment
departure_time_scheduled
departure_terminal
arrival_time_scheduled
arrival_terminal
flight_time
days
Example
itemlist=code;codeshares;alt_codes

Back to top