API 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 RapidAPI. RapidAPI 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-RapidAPI-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.rapidapi.com

    Authentication Code - Seen as auth in RapidAPI, 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 RapidAPI account.

    X-RapidAPI-Key - This is the key assigned to the RapidAPI 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 RapidAPI Account

    The Airport Guide API use RapidAPI 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 to https://rapidapi.com/AirportGuide/api/airport-guide-aviation-info to login to your existing account or sign up for a new account.
    Our API page is shown below. The list on the left shows all of the different API endpoints available to you. On the right, under Code Snippets, is a listing of the various languages you can get the code for your web site in such as Node.js, 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 2. Subscribe to a Pricing Plan

    Click on the Pricing menu option to get to the pricing page.
    The pricing plans have 4 levels ranging from the BASIC, free level, with 150 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 3. 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 cURL.
    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 scenes 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.

    In addition to 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 IATA ID, LAX, in the field.

    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 snippet from the box on the right and put it in a text editor for future use. For this example, the PHP code is
    ========
    $curl = curl_init();

    curl_setopt_array($curl, [
    CURLOPT_URL => "https://forteweb-airportguide-airport-basic-info-v1.p.rapidapi.com/get_airport_by_iata?airport_id=LAX&auth=authairport567",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
    "X-RapidAPI-Host: forteweb-airportguide-airport-basic-info-v1.p.rapidapi.com",
    "X-RapidAPI-Key: whqPQIeKmshNhPAbKj2l6TxlIvp1nxIFljsnBLICaxurAACZ"
    ],
    ]);

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

    curl_close($curl);

    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    }
    =========
  • STEP 4. Sample Results

    The json output for the above code is shown below.

    [
    {
    • airport_code:"LAX"
    • city:"Los Angeles"
    • commercial_airports_only:"1"
    • country:"United States"
    • country_code:"US"
    • elevation:"127.7"
    • gmt:"-8.0"
    • iata_id:"LAX"
    • icao_id:"KLAX"
    • lat_format:"33-56-33.4500N"
    • lat_map:"33.942625"
    • link_path:"https://airportguide.com/airport/info/LAX"
    • local_id:"LAX"
    • lon_format:"118-24-28.0900W"
    • lon_map:"-118.407803"
    • magnetic_variation:"12.1 E"
    • manager:"KEITH WILSCHETZ"
    • manager_address:"ONE WORLD WAY"
    • manager_csz:"LOS ANGELES, CA 90009"
    • manager_phone:"424-646-5060"
    • name:"Los Angeles International"
    • owner:"CITY OF LOS ANGELES"
    • owner_address:"1 WORLD WAY BOX 92216"
    • owner_csz:"LOS ANGELES, CA 90009-2216"
    • owner_phone:"424-646-5292"
    • state:"California"
    • state_abbrev:"CA"
    • type:"Airport"
    }
    ]
Open all Close all