curl --request POST \
--url https://api.gojinko.com/v1/flight_calendar \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"origins": [
"NYC"
],
"destinations": [
"PAR"
],
"trip_type": "roundtrip",
"departure_date_ranges": [
{
"start": "2026-09-01",
"end": "2026-09-30"
}
],
"stay_days": 7,
"cabin_class": "economy",
"limit": 100,
"currency": "USD"
}
'import requests
url = "https://api.gojinko.com/v1/flight_calendar"
payload = {
"origins": ["NYC"],
"destinations": ["PAR"],
"trip_type": "roundtrip",
"departure_date_ranges": [
{
"start": "2026-09-01",
"end": "2026-09-30"
}
],
"stay_days": 7,
"cabin_class": "economy",
"limit": 100,
"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({
origins: ['NYC'],
destinations: ['PAR'],
trip_type: 'roundtrip',
departure_date_ranges: [{start: '2026-09-01', end: '2026-09-30'}],
stay_days: 7,
cabin_class: 'economy',
limit: 100,
currency: 'USD'
})
};
fetch('https://api.gojinko.com/v1/flight_calendar', 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.gojinko.com/v1/flight_calendar",
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([
'origins' => [
'NYC'
],
'destinations' => [
'PAR'
],
'trip_type' => 'roundtrip',
'departure_date_ranges' => [
[
'start' => '2026-09-01',
'end' => '2026-09-30'
]
],
'stay_days' => 7,
'cabin_class' => 'economy',
'limit' => 100,
'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.gojinko.com/v1/flight_calendar"
payload := strings.NewReader("{\n \"origins\": [\n \"NYC\"\n ],\n \"destinations\": [\n \"PAR\"\n ],\n \"trip_type\": \"roundtrip\",\n \"departure_date_ranges\": [\n {\n \"start\": \"2026-09-01\",\n \"end\": \"2026-09-30\"\n }\n ],\n \"stay_days\": 7,\n \"cabin_class\": \"economy\",\n \"limit\": 100,\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.gojinko.com/v1/flight_calendar")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"origins\": [\n \"NYC\"\n ],\n \"destinations\": [\n \"PAR\"\n ],\n \"trip_type\": \"roundtrip\",\n \"departure_date_ranges\": [\n {\n \"start\": \"2026-09-01\",\n \"end\": \"2026-09-30\"\n }\n ],\n \"stay_days\": 7,\n \"cabin_class\": \"economy\",\n \"limit\": 100,\n \"currency\": \"USD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gojinko.com/v1/flight_calendar")
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 \"origins\": [\n \"NYC\"\n ],\n \"destinations\": [\n \"PAR\"\n ],\n \"trip_type\": \"roundtrip\",\n \"departure_date_ranges\": [\n {\n \"start\": \"2026-09-01\",\n \"end\": \"2026-09-30\"\n }\n ],\n \"stay_days\": 7,\n \"cabin_class\": \"economy\",\n \"limit\": 100,\n \"currency\": \"USD\"\n}"
response = http.request(request)
puts response.read_body{
"priced_for": "one_adult",
"itineraries": [
{
"offer_token": "es-VVN8QUZ8MjAyNzA2MTU6QUY6Nzo6WXwyMDI3MDYyMjpBRjo2OjpZ",
"id": "es-VVN8QUZ8MjAyNzA2MTU6QUY6Nzo6WXwyMDI3MDYyMjpBRjo2OjpZ",
"origin": {
"code": "JFK",
"name": "New York John F. Kennedy"
},
"destination": {
"code": "CDG",
"name": "Paris Charles de Gaulle"
},
"total": {
"value": 41250,
"currency": "USD",
"decimal_places": 2,
"display": "USD 412.50"
},
"cabin_class": "economy",
"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,
"stop_infos": [
{
"airport_code": "DFW",
"duration_minutes": 95
}
],
"segments": [
{
"airline": "AA",
"airline_name": "American Airlines",
"flight_number": "460",
"departure_airport": "JFK",
"departure_city": "New York",
"departure_time": "2026-09-23T11:55:00-04:00",
"arrival_airport": "DFW",
"arrival_city": "Dallas",
"arrival_time": "2026-09-23T15:10:00-05:00",
"duration_minutes": 255,
"layover_minutes": 95,
"operating_carrier": "MQ"
}
]
},
"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,
"stop_infos": [
{
"airport_code": "DFW",
"duration_minutes": 95
}
],
"segments": [
{
"airline": "AA",
"airline_name": "American Airlines",
"flight_number": "460",
"departure_airport": "JFK",
"departure_city": "New York",
"departure_time": "2026-09-23T11:55:00-04:00",
"arrival_airport": "DFW",
"arrival_city": "Dallas",
"arrival_time": "2026-09-23T15:10:00-05:00",
"duration_minutes": 255,
"layover_minutes": 95,
"operating_carrier": "MQ"
}
]
},
"priced_at": "2026-09-19T03:57:25Z"
}
],
"next_page_token": "eyJzIjoiYyIsImYiOiI5YzFlNDIifQ"
}{
"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/authentication/api-keys"
}
}{
"error": {
"code": "PAYMENT_REQUIRED",
"message": "Insufficient balance β this call costs $0.0150 and your organization has $0.0000 available. Top up at https://dashboard.gojinko.com/developers/billing/topup",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "CONFLICT",
"message": "The operation conflicts with the current state of the resource.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "GONE",
"message": "The resource no longer exists.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "A required field is missing or invalid.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Retry after the Retry-After delay.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_REJECTED",
"message": "The request was declined for this offer. Try another offer.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The service is temporarily unavailable. Retry after the Retry-After delay.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_TIMEOUT",
"message": "The request timed out before a result was available. Retry the request.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}flight-calendar
Search flights between a known origin and destination for flexible dates
curl --request POST \
--url https://api.gojinko.com/v1/flight_calendar \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"origins": [
"NYC"
],
"destinations": [
"PAR"
],
"trip_type": "roundtrip",
"departure_date_ranges": [
{
"start": "2026-09-01",
"end": "2026-09-30"
}
],
"stay_days": 7,
"cabin_class": "economy",
"limit": 100,
"currency": "USD"
}
'import requests
url = "https://api.gojinko.com/v1/flight_calendar"
payload = {
"origins": ["NYC"],
"destinations": ["PAR"],
"trip_type": "roundtrip",
"departure_date_ranges": [
{
"start": "2026-09-01",
"end": "2026-09-30"
}
],
"stay_days": 7,
"cabin_class": "economy",
"limit": 100,
"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({
origins: ['NYC'],
destinations: ['PAR'],
trip_type: 'roundtrip',
departure_date_ranges: [{start: '2026-09-01', end: '2026-09-30'}],
stay_days: 7,
cabin_class: 'economy',
limit: 100,
currency: 'USD'
})
};
fetch('https://api.gojinko.com/v1/flight_calendar', 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.gojinko.com/v1/flight_calendar",
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([
'origins' => [
'NYC'
],
'destinations' => [
'PAR'
],
'trip_type' => 'roundtrip',
'departure_date_ranges' => [
[
'start' => '2026-09-01',
'end' => '2026-09-30'
]
],
'stay_days' => 7,
'cabin_class' => 'economy',
'limit' => 100,
'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.gojinko.com/v1/flight_calendar"
payload := strings.NewReader("{\n \"origins\": [\n \"NYC\"\n ],\n \"destinations\": [\n \"PAR\"\n ],\n \"trip_type\": \"roundtrip\",\n \"departure_date_ranges\": [\n {\n \"start\": \"2026-09-01\",\n \"end\": \"2026-09-30\"\n }\n ],\n \"stay_days\": 7,\n \"cabin_class\": \"economy\",\n \"limit\": 100,\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.gojinko.com/v1/flight_calendar")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"origins\": [\n \"NYC\"\n ],\n \"destinations\": [\n \"PAR\"\n ],\n \"trip_type\": \"roundtrip\",\n \"departure_date_ranges\": [\n {\n \"start\": \"2026-09-01\",\n \"end\": \"2026-09-30\"\n }\n ],\n \"stay_days\": 7,\n \"cabin_class\": \"economy\",\n \"limit\": 100,\n \"currency\": \"USD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gojinko.com/v1/flight_calendar")
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 \"origins\": [\n \"NYC\"\n ],\n \"destinations\": [\n \"PAR\"\n ],\n \"trip_type\": \"roundtrip\",\n \"departure_date_ranges\": [\n {\n \"start\": \"2026-09-01\",\n \"end\": \"2026-09-30\"\n }\n ],\n \"stay_days\": 7,\n \"cabin_class\": \"economy\",\n \"limit\": 100,\n \"currency\": \"USD\"\n}"
response = http.request(request)
puts response.read_body{
"priced_for": "one_adult",
"itineraries": [
{
"offer_token": "es-VVN8QUZ8MjAyNzA2MTU6QUY6Nzo6WXwyMDI3MDYyMjpBRjo2OjpZ",
"id": "es-VVN8QUZ8MjAyNzA2MTU6QUY6Nzo6WXwyMDI3MDYyMjpBRjo2OjpZ",
"origin": {
"code": "JFK",
"name": "New York John F. Kennedy"
},
"destination": {
"code": "CDG",
"name": "Paris Charles de Gaulle"
},
"total": {
"value": 41250,
"currency": "USD",
"decimal_places": 2,
"display": "USD 412.50"
},
"cabin_class": "economy",
"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,
"stop_infos": [
{
"airport_code": "DFW",
"duration_minutes": 95
}
],
"segments": [
{
"airline": "AA",
"airline_name": "American Airlines",
"flight_number": "460",
"departure_airport": "JFK",
"departure_city": "New York",
"departure_time": "2026-09-23T11:55:00-04:00",
"arrival_airport": "DFW",
"arrival_city": "Dallas",
"arrival_time": "2026-09-23T15:10:00-05:00",
"duration_minutes": 255,
"layover_minutes": 95,
"operating_carrier": "MQ"
}
]
},
"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,
"stop_infos": [
{
"airport_code": "DFW",
"duration_minutes": 95
}
],
"segments": [
{
"airline": "AA",
"airline_name": "American Airlines",
"flight_number": "460",
"departure_airport": "JFK",
"departure_city": "New York",
"departure_time": "2026-09-23T11:55:00-04:00",
"arrival_airport": "DFW",
"arrival_city": "Dallas",
"arrival_time": "2026-09-23T15:10:00-05:00",
"duration_minutes": 255,
"layover_minutes": 95,
"operating_carrier": "MQ"
}
]
},
"priced_at": "2026-09-19T03:57:25Z"
}
],
"next_page_token": "eyJzIjoiYyIsImYiOiI5YzFlNDIifQ"
}{
"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/authentication/api-keys"
}
}{
"error": {
"code": "PAYMENT_REQUIRED",
"message": "Insufficient balance β this call costs $0.0150 and your organization has $0.0000 available. Top up at https://dashboard.gojinko.com/developers/billing/topup",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "CONFLICT",
"message": "The operation conflicts with the current state of the resource.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "GONE",
"message": "The resource no longer exists.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "A required field is missing or invalid.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Retry after the Retry-After delay.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_REJECTED",
"message": "The request was declined for this offer. Try another offer.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The service is temporarily unavailable. Retry after the Retry-After delay.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_TIMEOUT",
"message": "The request timed out before a result was available. Retry the request.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}offer_token (also returned as id, a deprecated alias with the same value): pass it unchanged as offer_token to flight_search for live pricing. Add the selected live fareβs trip_item_token to a trip.
Filters. Besides cabin_class and max_total (one adultβs fare), the request takes the filters a traveler usually states:
max_stops:0non-stop,1or2connections, per leg.departure_time_rangeandarrival_time_rangefor the outbound leg, andreturn_departure_time_rangeandreturn_arrival_time_rangefor the return leg of a round trip. Each is a localHH:MMwindow at that airport and applies to every date searched.include_carriersandexclude_carriers: on cached itineraries they match the ticketing airline.origin_radius_kmanddestination_radius_km(at most 500): also search every airport within that distance of each code.connection_time_min_minutesandconnection_time_max_minutes: the shortest and longest layover, in minutes, at every connection of every leg; a non-stop leg passes. With either bound set, a page can hold fewer thanlimititineraries even when more match, so keep reading withnext_page_token; a non-zerooffsetis refused with422.
max_stops 1 or 2, the time windows and destination_radius_km need at least one code in destinations. A search across every destination that sends one of them is refused with 422; max_stops: 0 is accepted there.
A round trip from JFK or an airport within 100 km to Miami, at most one stop, leaving between 07:00 and 14:00, back home by 22:00, not on Spirit, at most 600 per adult:
{
"origins": ["JFK"],
"destinations": ["MIA"],
"origin_type": "airport",
"destination_type": "airport",
"trip_type": "roundtrip",
"departure_date_ranges": [{ "start": "2026-12-18", "end": "2026-12-22" }],
"stay_days_range": { "min": 5, "max": 9 },
"cabin_class": "economy",
"max_stops": 1,
"origin_radius_km": 100,
"departure_time_range": { "earliest": "07:00", "latest": "14:00" },
"return_arrival_time_range": { "latest": "22:00" },
"exclude_carriers": ["NK"],
"max_total": 600,
"limit": 100
}
limit itineraries (at most 100). When more match, it carries next_page_token: send the same request again with that value as page_token to read the next page, and stop when a response has no next_page_token. Each page starts right after the last itinerary of the previous one, so an itinerary that expires between two pages does not make you miss another. An itinerary whose price changes between two pages can appear on both or on neither, so deduplicate by offer_token. offset is deprecated on this route: when cached fares expire between two requests, a read paged with offset can skip itineraries.
value is an integer β divide by
10 ** decimal_places to display it. { "value": 15977, "decimal_places": 2 }
is $159.77, not $15,977. See Money & prices.Body
How to read the code: city searches every airport of the city, airport only that one airport. Omit it and the platform applies one rule: a code that names a multi-airport city is searched as the city; every other code is searched as the airport. Untyped NYC, LON or PAR is the city; untyped JFK, LHR or CDG is the airport; and untyped LAX, MIA or LAS β codes a city shares with its main airport β is the CITY, so results can land at any airport of that city. If the user named the airport, send airport; if they named the city, omit the field.
city, airport "city"
How to read the code: city searches every airport of the city, airport only that one airport. Omit it and the platform applies one rule: a code that names a multi-airport city is searched as the city; every other code is searched as the airport. Untyped NYC, LON or PAR is the city; untyped JFK, LHR or CDG is the airport; and untyped LAX, MIA or LAS β codes a city shares with its main airport β is the CITY, so results can land at any airport of that city. If the user named the airport, send airport; if they named the city, omit the field.
city, airport "city"
Keep only itineraries ticketed by these IATA carriers (the validating carrier, which issues the ticket). A codeshare segment marketed or operated by another airline does not change the match. Unlike POST /v1/flight_search, which matches the marketing carrier of every segment.
^[A-Za-z0-9]{2}$["AF", "DL"]
What limit counts depends on the route; 1 to 100, default 20. On flight_calendar, the maximum number of itineraries returned across the entire matching date range after sort_by is applied. This is a global result cap, not one itinerary per date pair: with the default sort_by: lowest, limit: N returns the cheapest N itineraries overall, so some matching date pairs may be absent. On find_dates, the maximum number of date pairs, each answered with its cheapest itinerary and spread across the requested departure window.
1 <= x <= 100Deprecated: page with page_token instead. Skips this many itineraries. When cached fares expire between two requests, every later itinerary moves up and the one at the page boundary is skipped, so a read paged with offset can miss itineraries. A non-zero offset cannot be combined with page_token, connection_time_min_minutes or connection_time_max_minutes.
x >= 0Also search every airport within this many kilometres (straight-line distance) of each origin code: an airport code is measured from that airport, a city code from the city. Widening only: the origins are always searched as well. Greater than 0, at most 500.
0 < x <= 500100
Shortest acceptable layover, in minutes, applied to every connection of every leg; a non-stop leg passes. Must not exceed connection_time_max_minutes. An itinerary whose connection times cannot be read is dropped. With either bound set, a response can hold fewer than limit itineraries even when more match.
x >= 060
Reads the next page: the next_page_token of the previous response, sent with the same request (limit may change). The page starts right after the last itinerary of the previous page, so no itinerary is skipped when cached fares expire between pages. An itinerary whose price changes between two pages can appear on both or on neither, so deduplicate by offer_token. Keep reading until a response has no next_page_token.
1"eyJzIjoiYyIsImYiOiI5YzFlNDIifQ"
Response
Matching itineraries
