Accept a flight with its current price for price advice
curl --request POST \
--url https://api.gojinko.com/v1/flight_price_advice \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"origin": "NYC",
"destination": "LAX",
"departure_date": "2026-10-20",
"current_price": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
},
"return_date": "2026-10-27",
"intent": {
"user_intent": "find a cheap flight to Tokyo"
}
}
'import requests
url = "https://api.gojinko.com/v1/flight_price_advice"
payload = {
"origin": "NYC",
"destination": "LAX",
"departure_date": "2026-10-20",
"current_price": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
},
"return_date": "2026-10-27",
"intent": { "user_intent": "find a cheap flight to Tokyo" }
}
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: 'NYC',
destination: 'LAX',
departure_date: '2026-10-20',
current_price: {value: 32000, currency: 'USD', decimal_places: 2},
return_date: '2026-10-27',
intent: {user_intent: 'find a cheap flight to Tokyo'}
})
};
fetch('https://api.gojinko.com/v1/flight_price_advice', 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_price_advice",
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' => 'NYC',
'destination' => 'LAX',
'departure_date' => '2026-10-20',
'current_price' => [
'value' => 32000,
'currency' => 'USD',
'decimal_places' => 2
],
'return_date' => '2026-10-27',
'intent' => [
'user_intent' => 'find a cheap flight to Tokyo'
]
]),
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_price_advice"
payload := strings.NewReader("{\n \"origin\": \"NYC\",\n \"destination\": \"LAX\",\n \"departure_date\": \"2026-10-20\",\n \"current_price\": {\n \"value\": 32000,\n \"currency\": \"USD\",\n \"decimal_places\": 2\n },\n \"return_date\": \"2026-10-27\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\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_price_advice")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"NYC\",\n \"destination\": \"LAX\",\n \"departure_date\": \"2026-10-20\",\n \"current_price\": {\n \"value\": 32000,\n \"currency\": \"USD\",\n \"decimal_places\": 2\n },\n \"return_date\": \"2026-10-27\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gojinko.com/v1/flight_price_advice")
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\": \"NYC\",\n \"destination\": \"LAX\",\n \"departure_date\": \"2026-10-20\",\n \"current_price\": {\n \"value\": 32000,\n \"currency\": \"USD\",\n \"decimal_places\": 2\n },\n \"return_date\": \"2026-10-27\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\n}"
response = http.request(request)
puts response.read_body{
"schema_version": "3.2",
"status": "available",
"reason": "statistics_not_ready",
"summary": "<string>",
"context": {
"origin": "NYC",
"destination": "LAX",
"departure_date": "2026-10-20",
"trip_type": "oneway",
"stops": 0,
"cabin_class": "economy",
"current_price": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
},
"price_basis": "per_adult_total_including_tax",
"evaluated_at": "2023-11-07T05:31:56Z",
"apex_days": 1,
"return_date": "2026-10-27"
},
"price_assessment": {
"status": "available",
"reason_code": 123,
"label": "low",
"typical_price": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
},
"typical_range": {
"low": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
},
"high": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
}
},
"percentile": 50,
"difference_pct": 123,
"comparison_basis": "historical_comparable_low_fares",
"evidence": {
"artifact_id": "<string>",
"fit_window": {
"start": "2023-11-07T05:31:56Z",
"end_exclusive": "2023-11-07T05:31:56Z"
},
"source_price_unit": "amd_totalpricenuc_millicents",
"currency_mapping": "gateway_platform_usd_millicents_to_usd_minor_units_divide_by_10",
"apex_band": "0-2",
"support": {
"daily_units": 1,
"observation_days": 1,
"departure_dates": 1,
"flight_identities": 1
},
"stay_band": "<string>"
}
},
"wait_assessment": {
"status": "available",
"reason_code": 123,
"horizons": [
{
"horizon_days": 1,
"status": "available",
"reason_code": 123,
"direction": "increase",
"forecasted_price": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
},
"probabilities": {
"increase": 0.5,
"decrease": 0.5,
"unchanged": 0.5
}
}
]
},
"recommendation": {
"action": "buy_now",
"basis": {
"policy": "expected_fare",
"price_label": "low",
"selected_horizon_days": 1,
"wait_direction": "increase"
},
"summary": "<string>"
},
"live_quotes_used": false
}{
"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": "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"
}
}Discovery
flight-price-advice
Accept a flight with its current price for price advice
POST
/
v1
/
flight_price_advice
Accept a flight with its current price for price advice
curl --request POST \
--url https://api.gojinko.com/v1/flight_price_advice \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"origin": "NYC",
"destination": "LAX",
"departure_date": "2026-10-20",
"current_price": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
},
"return_date": "2026-10-27",
"intent": {
"user_intent": "find a cheap flight to Tokyo"
}
}
'import requests
url = "https://api.gojinko.com/v1/flight_price_advice"
payload = {
"origin": "NYC",
"destination": "LAX",
"departure_date": "2026-10-20",
"current_price": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
},
"return_date": "2026-10-27",
"intent": { "user_intent": "find a cheap flight to Tokyo" }
}
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: 'NYC',
destination: 'LAX',
departure_date: '2026-10-20',
current_price: {value: 32000, currency: 'USD', decimal_places: 2},
return_date: '2026-10-27',
intent: {user_intent: 'find a cheap flight to Tokyo'}
})
};
fetch('https://api.gojinko.com/v1/flight_price_advice', 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_price_advice",
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' => 'NYC',
'destination' => 'LAX',
'departure_date' => '2026-10-20',
'current_price' => [
'value' => 32000,
'currency' => 'USD',
'decimal_places' => 2
],
'return_date' => '2026-10-27',
'intent' => [
'user_intent' => 'find a cheap flight to Tokyo'
]
]),
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_price_advice"
payload := strings.NewReader("{\n \"origin\": \"NYC\",\n \"destination\": \"LAX\",\n \"departure_date\": \"2026-10-20\",\n \"current_price\": {\n \"value\": 32000,\n \"currency\": \"USD\",\n \"decimal_places\": 2\n },\n \"return_date\": \"2026-10-27\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\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_price_advice")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"NYC\",\n \"destination\": \"LAX\",\n \"departure_date\": \"2026-10-20\",\n \"current_price\": {\n \"value\": 32000,\n \"currency\": \"USD\",\n \"decimal_places\": 2\n },\n \"return_date\": \"2026-10-27\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gojinko.com/v1/flight_price_advice")
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\": \"NYC\",\n \"destination\": \"LAX\",\n \"departure_date\": \"2026-10-20\",\n \"current_price\": {\n \"value\": 32000,\n \"currency\": \"USD\",\n \"decimal_places\": 2\n },\n \"return_date\": \"2026-10-27\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\n}"
response = http.request(request)
puts response.read_body{
"schema_version": "3.2",
"status": "available",
"reason": "statistics_not_ready",
"summary": "<string>",
"context": {
"origin": "NYC",
"destination": "LAX",
"departure_date": "2026-10-20",
"trip_type": "oneway",
"stops": 0,
"cabin_class": "economy",
"current_price": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
},
"price_basis": "per_adult_total_including_tax",
"evaluated_at": "2023-11-07T05:31:56Z",
"apex_days": 1,
"return_date": "2026-10-27"
},
"price_assessment": {
"status": "available",
"reason_code": 123,
"label": "low",
"typical_price": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
},
"typical_range": {
"low": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
},
"high": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
}
},
"percentile": 50,
"difference_pct": 123,
"comparison_basis": "historical_comparable_low_fares",
"evidence": {
"artifact_id": "<string>",
"fit_window": {
"start": "2023-11-07T05:31:56Z",
"end_exclusive": "2023-11-07T05:31:56Z"
},
"source_price_unit": "amd_totalpricenuc_millicents",
"currency_mapping": "gateway_platform_usd_millicents_to_usd_minor_units_divide_by_10",
"apex_band": "0-2",
"support": {
"daily_units": 1,
"observation_days": 1,
"departure_dates": 1,
"flight_identities": 1
},
"stay_band": "<string>"
}
},
"wait_assessment": {
"status": "available",
"reason_code": 123,
"horizons": [
{
"horizon_days": 1,
"status": "available",
"reason_code": 123,
"direction": "increase",
"forecasted_price": {
"value": 32000,
"currency": "USD",
"decimal_places": 2
},
"probabilities": {
"increase": 0.5,
"decrease": 0.5,
"unchanged": 0.5
}
}
]
},
"recommendation": {
"action": "buy_now",
"basis": {
"policy": "expected_fare",
"price_label": "low",
"selected_horizon_days": 1,
"wait_direction": "increase"
},
"summary": "<string>"
},
"live_quotes_used": false
}{
"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": "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"
}
}Accepts a flight with its current price and returns price advice. Available results compare the fare with typical fares for comparable flights and provide fixed 1-day and 3-day price forecasts, each with a forecasted price and estimated probabilities of an increase, decrease, or no change. Initial numeric coverage is one-adult, nonstop, USD; one-way, and round-trip with return_date; other structurally valid inputs return a reasoned unavailable result. The deterministic summary can be displayed without an LLM. The endpoint requires a verified jnk_ API key and does not search, monitor, quote, or book flights. When the platform refuses the inputs, the answer is 400 or 422
BAD_REQUEST with the platform’s sentence; a 502 is a technical failure (UPSTREAM_ERROR).Body
application/json
A flight and its current price. Trip type, the optional actual connection count, and cabin are validated as values; a valid request does not imply that statistics cover it. A round trip names its return_date.
Response
Computed flight price advice or a reasoned unavailable/not-ready result
Price advice. Results may be available, partial, unavailable, or not ready; fixed 1-day and 3-day horizons are always present.
Available options:
statistics_not_ready, future_statistics, stale_statistics, unsupported_currency, unsupported_trip_type, stops_unknown, unsupported_stops, route_not_covered, insufficient_data, horizon_not_supported, unsafe_projected_amount, request_cancelled, partial_statistics, statistics_unavailable 