✈️ An API for flight information from the Syracuse Hancock International Airport
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docker
test
.gitignore
.travis.yml
README.md
config.js
index.js
package-lock.json
package.json
server.js
utilities.js

README.md

Build Status

Syracuse Airport Flight Info API

An API for flight 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://apis.opensyracuse.org/flightinfo/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://apis.opensyracuse.org/flightinfo/gate/20

Get flights by city

~$ curl https://apis.opensyracuse.org/flightinfo/city/toronto

Get flights by direction

~$ curl https://apis.opensyracuse.org/flightinfo/direction/arrival

Get all flights

~$ curl https://apis.opensyracuse.org/flightinfo/

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