Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Latest commit

 

History

History
66 lines (48 loc) · 1.7 KB

README.md

File metadata and controls

66 lines (48 loc) · 1.7 KB

Syracuse Airport Flight Info API

An API for flight information data from the Syracuse Hancock International Airport.

Rationale

The Syracuse Hancock International Airport currently publishes an XML file with flight data that is used on the organization's public website.

In a way, this is awesome and the data is far easier to use than the data from many other public public organizations. However, this XML file is not as flexible as a full REST API, which would allow for searches by flight number, by gate assignment, etc.

To create a lightweight REST interface on top of the existing airport flight information XML file, this project uses Node.js and XPath to parse the XML file and expose search paths that make this data more easily consumed by civic apps.

Example usage

Get flights by flight number

~$ curl https://{host}/number/2815
[
  {
    "$": {
      "type": "A",
      "indicator": "D",
      "airlinecode": "DL",
      "date": "03/05/16",
      "claim": "B2",
      "remarks": "ARRIVED",
      "gate": "24",
      "actualtime": "1653",
      "scheduletime": "1707",
      "city": "ATLANTA",
      "flightnumber": "2815"
    }
  }
]

Get flights by gate number

~$ curl https://{host}/gate/20

Get flights by city

~$ curl https://{host}/city/toronto

Get flights by direction

~$ curl https://{host}/direction/arrival

Get all flights

~$ curl https://{host}/

Note: JSONP is supported by using a callback parameter with requests.