Lufthansa Group Open API

Open Data Initiative from Lufthansa Group

Overview

The Lufthansa Group Open API is a direct channel to the Lufthansa Airline Group Content. Developers can reference data such as Countries, Airports, Airlines, and Aircraft. You can also use the Operations endpoint to view data regarding Lufthansa's schedules and flight status'. # Terms of Service The terms of service can be found here https://developer.lufthansa.com/General_Terms_and_Conditions

API Status Page

You can view the API status page here https://developer.lufthansa.com/API_Status

Authentication

The Lufthansa API uses OAuth2.0 as the authentication method on their API. To retrieve the credentials required register an account.

Once registered, Enter the details of your application to request access. Once submitted a client id and client key are issued.

The next step is to retrieve an access token from the server.

curl "https://api.lufthansa.com/v1/oauth/token" -X POST -d "client_id=28fu8yg7tx35qkqnc6jg96fy" -d "client_secret=6jc9Zj9PE2" -d "grant_type=client_credentials"

This returns the following token schema

{"access_token":"hsjiwpsj5tr4pkasodnhp5u3","token_type":"bearer","expires_in":129600}

The access_token can then be used to request data from the API

curl -H "Authorization: Bearer hsjiwpsj5tr4pkasodnhp5u3" -H "Accept: application/xml" https://api.lufthansa.com/v1/references/airports/FRA