Skip to main content
POST
/
v1
/
flight_search
Get live flight pricing — search by route, or re-price a known offer
curl --request POST \
  --url https://api.example.com/v1/flight_search \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "origin": "JFK",
  "destination": "CDG",
  "departure_date": "2026-09-01",
  "return_date": "2026-09-08",
  "trip_type": "roundtrip",
  "cabin_class": "economy",
  "adults": 1,
  "currency": "USD"
}
'
import requests

url = "https://api.example.com/v1/flight_search"

payload = {
"origin": "JFK",
"destination": "CDG",
"departure_date": "2026-09-01",
"return_date": "2026-09-08",
"trip_type": "roundtrip",
"cabin_class": "economy",
"adults": 1,
"currency": "USD"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
origin: 'JFK',
destination: 'CDG',
departure_date: '2026-09-01',
return_date: '2026-09-08',
trip_type: 'roundtrip',
cabin_class: 'economy',
adults: 1,
currency: 'USD'
})
};

fetch('https://api.example.com/v1/flight_search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/flight_search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'origin' => 'JFK',
'destination' => 'CDG',
'departure_date' => '2026-09-01',
'return_date' => '2026-09-08',
'trip_type' => 'roundtrip',
'cabin_class' => 'economy',
'adults' => 1,
'currency' => 'USD'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);

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

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.example.com/v1/flight_search"

payload := strings.NewReader("{\n \"origin\": \"JFK\",\n \"destination\": \"CDG\",\n \"departure_date\": \"2026-09-01\",\n \"return_date\": \"2026-09-08\",\n \"trip_type\": \"roundtrip\",\n \"cabin_class\": \"economy\",\n \"adults\": 1,\n \"currency\": \"USD\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.example.com/v1/flight_search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"JFK\",\n \"destination\": \"CDG\",\n \"departure_date\": \"2026-09-01\",\n \"return_date\": \"2026-09-08\",\n \"trip_type\": \"roundtrip\",\n \"cabin_class\": \"economy\",\n \"adults\": 1,\n \"currency\": \"USD\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/flight_search")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"origin\": \"JFK\",\n \"destination\": \"CDG\",\n \"departure_date\": \"2026-09-01\",\n \"return_date\": \"2026-09-08\",\n \"trip_type\": \"roundtrip\",\n \"cabin_class\": \"economy\",\n \"adults\": 1,\n \"currency\": \"USD\"\n}"

response = http.request(request)
puts response.read_body
{
  "offers": [
    {
      "offer_id": "off_3a9f1b27c4",
      "origin": {
        "code": "JFK",
        "name": "New York John F. Kennedy"
      },
      "destination": {
        "code": "LAX",
        "name": "Los Angeles Intl"
      },
      "fares": [
        {
          "trip_item_token": "tit_5f8c1d3e9a",
          "cabin_class": "economy",
          "brand_name": "Main Cabin",
          "total_price": {
            "amount": 318.4,
            "value": 123,
            "currency": "USD",
            "decimal_places": 2
          },
          "price_per_person": {
            "amount": 318.4,
            "value": 123,
            "currency": "USD",
            "decimal_places": 2
          },
          "included_baggage": "1 carry-on, 1 checked bag",
          "carry_on_baggage": "1 carry-on included",
          "is_changeable": true
        }
      ],
      "provider": "sabre",
      "provider_name": "Sabre",
      "is_round_trip": false,
      "total_duration_minutes": 385,
      "outbound": {
        "origin": "JFK",
        "destination": "LAX",
        "departure_datetime": "2026-07-15T08:30:00-04:00",
        "arrival_datetime": "2026-07-15T11:55:00-07:00",
        "duration_minutes": 385,
        "airline": "AA",
        "airline_name": "American Airlines",
        "stops": 0
      },
      "inbound": {
        "origin": "JFK",
        "destination": "LAX",
        "departure_datetime": "2026-07-15T08:30:00-04:00",
        "arrival_datetime": "2026-07-15T11:55:00-07:00",
        "duration_minutes": 385,
        "airline": "AA",
        "airline_name": "American Airlines",
        "stops": 0
      }
    }
  ],
  "exact_match_found": true
}
{
"error": {
"code": "BAD_REQUEST",
"message": "Malformed JSON in request body.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}
{
"error": {
"code": "AUTH_REQUIRED",
"message": "Invalid or expired API key.",
"doc_url": "https://docs.gojinko.com/api-reference/authentication"
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "origins: origins is required; trip_type: trip_type is required",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}
{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit or quota exceeded.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}
{
"error": {
"code": "UPSTREAM_ERROR",
"message": "Upstream travel provider returned an error. Please retry.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}
Fetch live, bookable pricing for a specific route and date pair. Use it once the user has settled on exact travel dates, for example “Paris to New York departing June 1 returning June 8 in economy”. It also reprices an offer surfaced earlier by the calendar or destination tools so you can confirm availability before adding it to a trip.

Two modes, one endpoint

POST /v1/flight_search serves both modes:
  • Search mode: filter-based live search by origin, destination, departure_date, and passengers. Returns priced offers, each fare carrying a trip_item_token you can add to a trip.
  • Reprice mode: pass an offer_token from discovery (find_destination, flight_calendar) to re-price that specific offer before adding it to a trip. The other route fields are ignored when offer_token is present.
The CLI mirrors this: pass --offer-token for reprice mode, omit it for search mode.

Authorizations

X-API-Key
string
header
required

Body

application/json
origin
string
Example:

"JFK"

destination
string
Example:

"LAX"

departure_date
string
Pattern: ^\d{4}-\d{2}-\d{2}$
return_date
string
Pattern: ^\d{4}-\d{2}-\d{2}$
trip_type
enum<string>
Available options:
oneway,
roundtrip
cabin_class
enum<string>
Available options:
economy,
premium_economy,
business,
first
direct_only
boolean
max_price
number
Required range: x > 0
include_carriers
string[]
exclude_carriers
string[]
limit
integer

Max results to return (1-100). Default 20. Search mode only. Caps how many flights come back — only trims the set, since providers bound the real count.

Required range: 1 <= x <= 100
Example:

20

adults
integer
default:1
Required range: x >= 1
children
integer
Required range: x >= 0
infants
integer
Required range: x >= 0
currency
string
locale
string
offer_token
string
intent
object

Response

Priced offers

offers
object[]
required
exact_match_found
boolean
Example:

true