PNR EXPERT PREMIUM IS NOW CALLED PNR EXPERT PLUS - LEARN MORE HERE

API Documentation

Overview

Our PNR Conversion API allows you to query our endpoint with a PNR and instantly receive a structured JSON object with the decoded flight, airport, and passenger data.

Our API returns the most comprehensive results available, along with standard airport details, including carbon emissions, transit times, operated by carrier if different from the ticketed carrier, image link, aircraft (where this information is available), and more.

Our API is easy to integrate. We have full documentation below, or alternatively, see our quick start guide here.

Get Started

To get started, simply sign up for an account, click through to the Manage API, and follow instructions there to get going!

Demo:

curl -X POST https://www.pnrexpert.com/api/v1/pnr \
  -H "Content-Type: application/json" \
  -H "Authorization: bearer my-secret-token" \
  -d '{"pnr":" 1.1JOHNSON/HAL MR  
 1 MH 183S 11MAY Q MAAKUL HK1  1145A  615P /DCMH*THBBIP /E 
 2 MH5620S 14MAY S KULICN HK1  1125P  655A  15MAY M             
                                               /DCMH*THBBIP /E  
OPERATED BY KOREAN AIR                                          
 3 MH  39N 20MAY J ICNKUL HK1  1210A  545A /DCMH*THBBIP /E      
 4 MH 182N 20MAY J KULMAA HK1   935A 1045A /DCMH*THBBIP /E  "}'

Example Implementation

curl -X POST https://www.pnrexpert.com/api/v1/pnr \
  -H "Content-Type: application/json" \
  -H "Authorization: bearer my-secret-token" \
  -d '{"pnr":" 1.1JOHNSON/HAL MR  
 1 MH 183S 11MAY Q MAAKUL HK1  1145A  615P /DCMH*THBBIP /E 
 2 MH5620S 14MAY S KULICN HK1  1125P  655A  15MAY M             
                                               /DCMH*THBBIP /E  
OPERATED BY KOREAN AIR                                          
 3 MH  39N 20MAY J ICNKUL HK1  1210A  545A /DCMH*THBBIP /E      
 4 MH 182N 20MAY J KULMAA HK1   935A 1045A /DCMH*THBBIP /E  "}'

API Response Documentation

Root Level Keys

  • data: Contains the main payload of the response.
  • remaining: Indicates the remaining number of flights available for the query (integer).

Data Object

  • flights: An array of flight objects. Each object represents an individual flight segment.
  • passengers: An array of passenger objects (empty in the provided response).

Flights Array

Each object in the flights array represents a flight segment and includes the following keys:

Flight Object

departingFrom

Object containing details about the departure airport.

  • id: Unique identifier for the departure airport (integer).
  • airportName: Name of the departure airport (string).
  • cityName: City where the departure airport is located (string).
  • countryName: Country where the departure airport is located (string).
  • airportCode: IATA code for the departure airport (string).
  • latitude: Latitude coordinate of the departure airport (string).
  • longitude: Longitude coordinate of the departure airport (string).
  • timezone: Time zone of the departure airport (string).
  • type: Type of location, airport, port, station (string).
  • time: Scheduled departure time in ISO 8601 format (string).

arrivingAt

Object containing details about the arrival airport.

  • id: Unique identifier for the arrival airport (integer).
  • airportName: Name of the arrival airport (string).
  • cityName: City where the arrival airport is located (string).
  • countryName: Country where the arrival airport is located (string).
  • airportCode: IATA code for the arrival airport (string).
  • latitude: Latitude coordinate of the arrival airport (string).
  • longitude: Longitude coordinate of the arrival airport (string).
  • timezone: Time zone of the arrival airport (string).
  • type: Type of location, airport, port, station (string).
  • time: Scheduled arrival time in ISO 8601 format (string).
  • dayOffset: Indicates if the flight arrives on a different day than it departs (integer).

aircraftType

Object containing details about the aircraft type.

  • name: Name of the aircraft model (string, null if not specified).
  • code: Code of the aircraft model (string, null if not specified).

distance

Object containing the distance of the flight.

  • miles: Distance of the flight in miles (integer).
  • km: Distance of the flight in kilometers (integer).

techStop

Information about any technical stopovers (null if there are none).

carbonEmissions

Carbon emissions for the flight segment in metric tonnes (float).

flightDuration

Object containing the duration of the flight.

  • years: Duration in years (integer).
  • months: Duration in months (integer).
  • days: Duration in days (integer).
  • hours: Duration in hours (integer).
  • minutes: Duration in minutes (integer).

bookingClass

The class in which the flight is booked (string).

flightNumber

The flight number (string).

operatedBy

Object containing details about the airline operating the flight.

  • airlineName: Name of the operating airline (string).
  • iataCode: IATA code of the operating airline (string).

transitTime

Object containing the duration of the transit time, if applicable.

  • hours: Transit time in hours (integer).
  • minutes: Transit time in minutes (integer).

Authentication

The API requires a JWT token for authentication to access the data. The token should be included in the Authorization header of the request.

Endpoints

Process PNR Entry

Endpoint: https://www.pnrexpert.com/api/v1/pnr

Method: POST

Request Headers

  • Authorization: Bearer token for authentication.

Request Body

pnr (string): The Passenger Name Record to be processed.

Example Request

{
"pnr": "1 QF8405Q 05AUG 7 MELDXB*HK1  1800  0450   06AUG 1
                                              /DCQF*SQP8UD /E
OPERATED BY EMIRATES
 2 QF8135Q 06AUG 1 DXBVCE*HK1  0905  1325  /DCQF*SQP8UD /E
"
}

Response

The response contains flight information related to the provided PNR.

Success Response
{
  "success": "Authorized 2",
  "data": {
    "flights": [
      {
        "departingFrom": {
          "id": 14681,
          "airportName": "Melbourne Intl Airport",
          "cityName": "Melbourne",
          "countryName": "Australia",
          "airportCode": "MEL",
          "latitude": "-37.6733017",
          "longitude": "144.8430023",
          "timezone": "Australia/Hobart",
          "type": "airport",
          "time": "2024-08-05T18:00:00.000+10:00"
        },
        "arrivingAt": {
          "id": 13573,
          "airportName": "Dubai Intl Airport",
          "cityName": "Dubai",
          "countryName": "United Arab Emirates",
          "airportCode": "DXB",
          "latitude": "25.25279999",
          "longitude": "55.36439896",
          "timezone": "Asia/Dubai",
          "type": "airport",
          "time": "2024-08-06T04:50:00.000+04:00",
          "dayOffset": 0
        },
        "aircraftType": {
          "name": null,
          "code": null
        },
        "distance": {
          "miles": 6801,
          "km": 10944
        },
        "techStop": null,
        "carbonEmissions": 1.25856,
        "flightDuration": {
          "years": 0,
          "months": 0,
          "days": 0,
          "hours": 16,
          "minutes": 50
        },
        "bookingClass": "Q",
        "flightNumber": "8405",
        "operatedBy": {
          "airlineName": "Emirates",
          "iataCode": "EK"
        },
        "transitTime": {
          "hours": 4,
          "minutes": 15
        }
      },
      {
        "departingFrom": {
          "id": 13573,
          "airportName": "Dubai Intl Airport",
          "cityName": "Dubai",
          "countryName": "United Arab Emirates",
          "airportCode": "DXB",
          "latitude": "25.25279999",
          "longitude": "55.36439896",
          "timezone": "Asia/Dubai",
          "type": "airport",
          "time": "2024-08-06T09:05:00.000+04:00"
        },
        "arrivingAt": {
          "id": 15708,
          "airportName": "Venice Marco Polo Airport",
          "cityName": "Venice",
          "countryName": "Italy",
          "airportCode": "VCE",
          "latitude": "45.505299",
          "longitude": "12.3519",
          "timezone": "Europe/Rome",
          "type": "airport",
          "time": "2024-08-06T13:25:00.000+02:00",
          "dayOffset": 0
        },
        "aircraftType": {
          "name": null,
          "code": null
        },
        "distance": {
          "miles": 2748,
          "km": 4423
        },
        "techStop": null,
        "carbonEmissions": 0.508645,
        "flightDuration": {
          "years": 0,
          "months": 0,
          "days": 0,
          "hours": 6,
          "minutes": 20
        },
        "bookingClass": "Q",
        "flightNumber": "8135",
        "operatedBy": null,
        "iataCode": "QF",
        "airlineName": "Qantas",
        "q": "Economy",
        "cabin": "Economy",
        "transitTime": null
      }
    ],
    "passengers": []
  },
  "remaining": 99998
}
Error Responses

Unauthorized

{
"error": "Unauthorized"
}

Please check your authentication token is correct.

No PNR Provided

{
"error": "No PNR Provided"
}

Please provide a valid PNR entry in your request body.

Request Limit Reached

{
"error": "Request Limit Reached"
}

You've reached your quota for requests for the month. Please either upgrade your subscription in the account area, or wait for your request allowance to be reset. You can find your renewal date inside your account area.

Notes

  • All times are in ISO 8601 format.
  • Distances are provided in both miles and kilometers.
  • Carbon emissions are provided in metric tons.
  • Flight duration is broken down into years, months, days, hours, and minutes.
  • Transit time is only provided if applicable.

Pricing

Prices are based on the number of monthly API uses. Users can cancel at any time.

Starter

£22.00 GBP

Number of API requests: 2,500

2,500 API Calls a month. Credit card required. Cancel anytime.

Value

£40.00 GBP

Number of API requests: 10,000

10,000 API Calls a month. Credit card required. Cancel anytime.

Professional

£100.00 GBP

Number of API requests: 50,000

50,000 API Calls a month. Credit card required. Cancel anytime.

Advanced

£250.00 GBP

Number of API requests: 100,000

100,000 API Calls a month. Credit card required. Cancel anytime.

Premium

£1,000.00 GBP

Number of API requests: 500,000

500,000 API Calls a month. Credit card required. Cancel anytime.

Ultimate

£1,750.00 GBP

Number of API requests: 1,000,000

1,000,000 API Calls a month. Credit card required. Cancel anytime.

FAQs

How do I access the API?

To access the API, you need to sign up for an account and generate an API key. You can find your API key in the account area.

I get a 308 redirecting status

If you receive a 308 status, please ensure you have included www in your endpoint.