Monday 18 March 2024
UTC: 06:45:01 GMT (Zulu)   Local:
Monday 18 March 2024     UTC: 06:45:01 GMT (Zulu)   Local:

Airport Guide API Product Documentation

If you want to add Airport Guide data to your web site then you have come to the right place. Follow the steps below to get up and running quickly. These instructions are written towards the web developer that knows nothing about APIs. If something is not clear then just ask so this page can be made even better.

This guide is broken down into steps to walk you through the process. If you are already experienced in the ways of APIs then feel free to go straight to our API Pricing page to get started.
  • API Introduction

    An Application Program Interface (API) is what you use to query data from the Airport Guide server and display it on your web site. The Airport Guide API has been created using Mashape. Mashape is an API Marketplace for developers to find, test and consume APIs.
  • What Data is Available?

    There are many types of aviation data you can request from the Airport Guide API as shown in the groupings below. In API terms, the GET requests you make are for endpoints; simply a reference to a URL that accepts web requests. If you don't see certain data in the API that is on the web site, then just ask us to add it to the API.

    > Airline Group
         GET Airline by Code(IATA, ICAO)
         GET Airline by Country
         GET Airline by Name
    > Airport API Group
         GET Airport Details
         GET Airport Type by Country
         GET Airport USE by Country
         GET Get Airport by Use
         GET Nearby Airports
    > Airport Delays
         GET All Delays US
    > FBO & Fuel
         GET FBO & FUEL
    > Airmen Group
         GET GET AIRMEN
    > METAR TAF Group
         GET Get METAR Detail
         GET Get TAF Detail
    > Airportguide Calculators
         GET Sunset Sunrise


    For each GET endpoint we provide a sample request and response.
    The Request is the code you will put in your web page.
    The Response is the JSON code that is returned to you for parsing. The parsed data is displayed on your web site.

    Request Information Required

    Each request contains some of the same components; a Base URL, Authentication Code, X-Mashape Key, and Content Type.

    Base URL - For the Airport Guide API, the Base URL for the endpoints is https://forteweb-airportguide-airport-basic-info-v1.p.mashape.com

    Authentication Code - Seen as auth in Mashape, this code is hidden in your request and verifies to the Airport Guide server that the request is valid. This protects you from hackers trying to maliciously query the Airport Guide servers under your Mashape account.

    X-Mashape Key - This is the key assigned to the Mashape application you want to use for this session. You can create multiple apps to allow for separate tracking.

    Content Type - This is the format that the response will come back in. There is nothing you need to enter for this as it is automatic. You will see it listed as "application/json."
  • STEP 1. Login/Sign Up for a Mashape Account

    The Airport Guide API use Mashape as the vehicle to manage our API subscriptions so you will need to sign up with them to get access to our APIs. Simply go https://market.mashape.com to login to your existing account or sign up for a new account.
    Step 1 Mashape Login
  • STEP 2. The Mashape Dashboard

    Once you login to Mashape, you will be taken to the Mashape Marketplace Dashboard as seen below. From here, you can search through thousands of APIs to use on your web site.
    Step 2 Mashape Dashboard
  • STEP 3. Locate the Airport Guide API

    To locate the Airport Guide API, enter "airportguide" in the search box.
    Step 3 Mashape Search
    Click on the Airport Guide - Aviation Info link that is returned and you will end up at our API page. The list on the left shows all of the different API calls available to you. On the right, is a listing of the various languages you can get the code in such as JAVA, PHP, PYTHON, etc. The center shows the various parameters used in creating the query you like. To get the code for your site, you must first sign up for a pricing plan as detailed in the next step.
    Step 3.2 Mashape Aviation Info
  • STEP 4. Subscribe to a Pricing Plan

    Click on the Pricing menu option to get to the pricing page.
    Step 4 Mashape Airport API Group
    The pricing plans have 4 levels ranging from the BASIC, free level, with 1,000 queries per month up to the MEGA plan at $250 and 300,000 queries per month.

    To get started, subscribe to the BASIC plan for testing purposes and then you can always upgrade to another plan depending on your web site traffic volume.

    If you have different needs than what these plans provide, please contact us for a CUSTOM plan.
    Step 4-1 Mashape Pricing
    Once subscribed, you will be sent to the API screen to get your code.
    Step 4-2 Aviation Info Subscribed
  • STEP 5. Choose Your API Endpoint

    The left column shows your choices for which endpoint you would like to get the code for, the center shows the parameters you can input for the query, and the right column shows the various languages you can get the code in. For this example, we will use PHP. Click on "PHP" as seen in the figure below.
    Step 5 Select Code Language
    As mentioned earlier, "auth" is used as a protection against others just copying your code for use and you getting billed for it. This is all behind the signs so just know it's protecting you. The auth field will need to be filled in for any endpoint you wish to use. Enter "authairport567" into the auth field and click the gold Authorize button.

    Below the auth field you will see the values you can pass into the query. For the example shown below, we want the Airport Details for Los Angeles International Airport so we enter the ICAO ID, KLAX, in the field. You can also enter LAX which is used for the IATA and FAA ID to get the same results.

    It should be noted that there may be cases where there are multiple airports containing the same string across the IDs such as GNB. Go perform a search on GNB at https://airportguide.com/search/airport-search/ to see what I mean; there are 5 airports containing GNB in the ID.

    Now choose your application under the REQUEST HEADERS section. This is basically your personal app that you will use the API under. If you haven't created an app yet then do it now under the pulldown menu labeled Default Application.

    You are just about there!

    Copy the code from the REQUEST EXAMPLE box on the right and put it in a text editor for future use. For this example, it is
    // These code snippets use an open-source library. http://unirest.io/php
    $response = Unirest\Request::get("https://forteweb-airportguide-airport-basic-info-v1.p.mashape.com/get_airport?auth=authairport567&airport_id=KLAX",
    array(
    "X-Mashape-Key" => "4tMjSwOQgEmshCdnjx7LLdXyigw3p12S9VCjsnFbtOLuLD4Ltm",
    "Accept" => "application/json"
    )
    );

    Step 5-2 API Parameters
  • STEP 6. Install the Unirest Library

    You only need to install the Unirest Library ONCE!

    Mashape is an intermediary between the API code on the airportguide.com server and your web site. In order for your site to request the information, you will need to install the Unirest Library on your server which Mashape uses to process your request. Please ask your web host for help if you don't understand the process explained below.

    You will want to install the library for the language you need as seen at http://unirest.io. The following example shows the Unirest installation for PHP.

    Select PHP and follow the installation instructions for Unirest. To save you some time, the PHP library can be downloaded from https://github.com/Kong/unirest-php
    Step 6 Unirest Library
    Once on the GitHub page, click on the Clone or Download button and select Download to download the zip file to your hard drive.
    Step 6-2 Unirest Library PHP Download
    Extract the files and upload to your server.

    Add the following code to your web page before the API code you copied in earlier.*

    require_once 'unirest/src/Unirest.php

    This tells the web page to load the Unirest code since it is used in the Mashape code. The entire code copied to your web page will now look like this:

    Step 6-3 API Code
    * NOTE 1: For this example in PHP, don't forget to add the opening and closing php tags.

    * NOTE 2: Make sure the path used in the require_once code is the correct path to the Unirest Library you uploaded to your server.

    * NOTE 3: To view the query results in the json format, add the print_r command as shown above.
  • STEP 7. Sample Results

    The json output for the above code is shown below.
    Step 7 JSON Output
Open all Close all

Airport Guide API endpoint references are listed below for reference.

© 1998-2024 AirportGuide.com. All rights reserved.

AirportGuide.com does not guarantee the accuracy or timeliness of any information on this site. Use at your own risk.
NOT to be used as an official source for flight planning, navigation, or use in flight.