Search live rail, coach and ferry inventory
curl --request POST \
--url https://api.example.com/v1/ground_search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"departure_date": "2026-08-28",
"departure_stations": [
"GBLONLPB"
],
"departure_city": "GBLON",
"arrival_stations": [
"GBLONLHB"
],
"arrival_city": "GBLON",
"return_date": "<string>",
"passengers": [
{
"pax": 1,
"max_age": 1
}
],
"carrier_codes": [
"HEXR"
],
"currency": "GBP",
"locale": "en",
"intent": {
"user_intent": "find a cheap flight to Tokyo"
}
}
'import requests
url = "https://api.example.com/v1/ground_search"
payload = {
"departure_date": "2026-08-28",
"departure_stations": ["GBLONLPB"],
"departure_city": "GBLON",
"arrival_stations": ["GBLONLHB"],
"arrival_city": "GBLON",
"return_date": "<string>",
"passengers": [
{
"pax": 1,
"max_age": 1
}
],
"carrier_codes": ["HEXR"],
"currency": "GBP",
"locale": "en",
"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({
departure_date: '2026-08-28',
departure_stations: ['GBLONLPB'],
departure_city: 'GBLON',
arrival_stations: ['GBLONLHB'],
arrival_city: 'GBLON',
return_date: '<string>',
passengers: [{pax: 1, max_age: 1}],
carrier_codes: ['HEXR'],
currency: 'GBP',
locale: 'en',
intent: {user_intent: 'find a cheap flight to Tokyo'}
})
};
fetch('https://api.example.com/v1/ground_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/ground_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([
'departure_date' => '2026-08-28',
'departure_stations' => [
'GBLONLPB'
],
'departure_city' => 'GBLON',
'arrival_stations' => [
'GBLONLHB'
],
'arrival_city' => 'GBLON',
'return_date' => '<string>',
'passengers' => [
[
'pax' => 1,
'max_age' => 1
]
],
'carrier_codes' => [
'HEXR'
],
'currency' => 'GBP',
'locale' => 'en',
'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.example.com/v1/ground_search"
payload := strings.NewReader("{\n \"departure_date\": \"2026-08-28\",\n \"departure_stations\": [\n \"GBLONLPB\"\n ],\n \"departure_city\": \"GBLON\",\n \"arrival_stations\": [\n \"GBLONLHB\"\n ],\n \"arrival_city\": \"GBLON\",\n \"return_date\": \"<string>\",\n \"passengers\": [\n {\n \"pax\": 1,\n \"max_age\": 1\n }\n ],\n \"carrier_codes\": [\n \"HEXR\"\n ],\n \"currency\": \"GBP\",\n \"locale\": \"en\",\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.example.com/v1/ground_search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"departure_date\": \"2026-08-28\",\n \"departure_stations\": [\n \"GBLONLPB\"\n ],\n \"departure_city\": \"GBLON\",\n \"arrival_stations\": [\n \"GBLONLHB\"\n ],\n \"arrival_city\": \"GBLON\",\n \"return_date\": \"<string>\",\n \"passengers\": [\n {\n \"pax\": 1,\n \"max_age\": 1\n }\n ],\n \"carrier_codes\": [\n \"HEXR\"\n ],\n \"currency\": \"GBP\",\n \"locale\": \"en\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/ground_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 \"departure_date\": \"2026-08-28\",\n \"departure_stations\": [\n \"GBLONLPB\"\n ],\n \"departure_city\": \"GBLON\",\n \"arrival_stations\": [\n \"GBLONLHB\"\n ],\n \"arrival_city\": \"GBLON\",\n \"return_date\": \"<string>\",\n \"passengers\": [\n {\n \"pax\": 1,\n \"max_age\": 1\n }\n ],\n \"carrier_codes\": [\n \"HEXR\"\n ],\n \"currency\": \"GBP\",\n \"locale\": \"en\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\n}"
response = http.request(request)
puts response.read_body{
"connections": [
{
"id": "HEXR-GBLONLPB-GBLONLHB-2026-08-28T04:34-2026-08-28T04:59",
"departure_station": {
"code": "<string>",
"name": "<string>",
"city_name": "<string>",
"country_code": "<string>"
},
"arrival_station": {
"code": "<string>",
"name": "<string>",
"city_name": "<string>",
"country_code": "<string>"
},
"departure_time": "<string>",
"arrival_time": "<string>",
"duration_minutes": 123,
"transport_mode": "<string>",
"marketing_carrier": {
"code": "HEXR",
"trade_name": "Heathrow Express",
"legal_name": "<string>",
"logo_url": "<string>",
"transport_mode": "<string>",
"website": "<string>"
},
"operating_carrier": {
"code": "HEXR",
"trade_name": "Heathrow Express",
"legal_name": "<string>",
"logo_url": "<string>",
"transport_mode": "<string>",
"website": "<string>"
},
"fares": [
{
"fare_class": "<string>",
"fare_name": "<string>",
"total_price": {
"value": 123,
"currency": "<string>",
"decimal_places": 123
},
"refundable": true,
"exchangeable": true,
"conditions": [
"<string>"
]
}
],
"from_amount": {
"value": 123,
"currency": "<string>",
"decimal_places": 123
}
}
]
}{
"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": "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": "CONFLICT",
"message": "an exchange is already in progress for this booking",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"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_REJECTED",
"message": "sabre-rest BargainFinderMaxRQ failed with status 400: 27131 - Number of connection locations exceeds maximum allowed",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "All flight providers are temporarily unable to serve this search. Please retry later. Provider reasons: sabre-rest: provider temporarily closed; travelfusion: quota exhausted",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_TIMEOUT",
"message": "sabre-rest BargainFinderMaxRQ timed out after 30s",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}Other endpoints
ground-search
Search live rail, coach and ferry inventory
POST
/
v1
/
ground_search
Search live rail, coach and ferry inventory
curl --request POST \
--url https://api.example.com/v1/ground_search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"departure_date": "2026-08-28",
"departure_stations": [
"GBLONLPB"
],
"departure_city": "GBLON",
"arrival_stations": [
"GBLONLHB"
],
"arrival_city": "GBLON",
"return_date": "<string>",
"passengers": [
{
"pax": 1,
"max_age": 1
}
],
"carrier_codes": [
"HEXR"
],
"currency": "GBP",
"locale": "en",
"intent": {
"user_intent": "find a cheap flight to Tokyo"
}
}
'import requests
url = "https://api.example.com/v1/ground_search"
payload = {
"departure_date": "2026-08-28",
"departure_stations": ["GBLONLPB"],
"departure_city": "GBLON",
"arrival_stations": ["GBLONLHB"],
"arrival_city": "GBLON",
"return_date": "<string>",
"passengers": [
{
"pax": 1,
"max_age": 1
}
],
"carrier_codes": ["HEXR"],
"currency": "GBP",
"locale": "en",
"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({
departure_date: '2026-08-28',
departure_stations: ['GBLONLPB'],
departure_city: 'GBLON',
arrival_stations: ['GBLONLHB'],
arrival_city: 'GBLON',
return_date: '<string>',
passengers: [{pax: 1, max_age: 1}],
carrier_codes: ['HEXR'],
currency: 'GBP',
locale: 'en',
intent: {user_intent: 'find a cheap flight to Tokyo'}
})
};
fetch('https://api.example.com/v1/ground_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/ground_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([
'departure_date' => '2026-08-28',
'departure_stations' => [
'GBLONLPB'
],
'departure_city' => 'GBLON',
'arrival_stations' => [
'GBLONLHB'
],
'arrival_city' => 'GBLON',
'return_date' => '<string>',
'passengers' => [
[
'pax' => 1,
'max_age' => 1
]
],
'carrier_codes' => [
'HEXR'
],
'currency' => 'GBP',
'locale' => 'en',
'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.example.com/v1/ground_search"
payload := strings.NewReader("{\n \"departure_date\": \"2026-08-28\",\n \"departure_stations\": [\n \"GBLONLPB\"\n ],\n \"departure_city\": \"GBLON\",\n \"arrival_stations\": [\n \"GBLONLHB\"\n ],\n \"arrival_city\": \"GBLON\",\n \"return_date\": \"<string>\",\n \"passengers\": [\n {\n \"pax\": 1,\n \"max_age\": 1\n }\n ],\n \"carrier_codes\": [\n \"HEXR\"\n ],\n \"currency\": \"GBP\",\n \"locale\": \"en\",\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.example.com/v1/ground_search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"departure_date\": \"2026-08-28\",\n \"departure_stations\": [\n \"GBLONLPB\"\n ],\n \"departure_city\": \"GBLON\",\n \"arrival_stations\": [\n \"GBLONLHB\"\n ],\n \"arrival_city\": \"GBLON\",\n \"return_date\": \"<string>\",\n \"passengers\": [\n {\n \"pax\": 1,\n \"max_age\": 1\n }\n ],\n \"carrier_codes\": [\n \"HEXR\"\n ],\n \"currency\": \"GBP\",\n \"locale\": \"en\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/ground_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 \"departure_date\": \"2026-08-28\",\n \"departure_stations\": [\n \"GBLONLPB\"\n ],\n \"departure_city\": \"GBLON\",\n \"arrival_stations\": [\n \"GBLONLHB\"\n ],\n \"arrival_city\": \"GBLON\",\n \"return_date\": \"<string>\",\n \"passengers\": [\n {\n \"pax\": 1,\n \"max_age\": 1\n }\n ],\n \"carrier_codes\": [\n \"HEXR\"\n ],\n \"currency\": \"GBP\",\n \"locale\": \"en\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\n}"
response = http.request(request)
puts response.read_body{
"connections": [
{
"id": "HEXR-GBLONLPB-GBLONLHB-2026-08-28T04:34-2026-08-28T04:59",
"departure_station": {
"code": "<string>",
"name": "<string>",
"city_name": "<string>",
"country_code": "<string>"
},
"arrival_station": {
"code": "<string>",
"name": "<string>",
"city_name": "<string>",
"country_code": "<string>"
},
"departure_time": "<string>",
"arrival_time": "<string>",
"duration_minutes": 123,
"transport_mode": "<string>",
"marketing_carrier": {
"code": "HEXR",
"trade_name": "Heathrow Express",
"legal_name": "<string>",
"logo_url": "<string>",
"transport_mode": "<string>",
"website": "<string>"
},
"operating_carrier": {
"code": "HEXR",
"trade_name": "Heathrow Express",
"legal_name": "<string>",
"logo_url": "<string>",
"transport_mode": "<string>",
"website": "<string>"
},
"fares": [
{
"fare_class": "<string>",
"fare_name": "<string>",
"total_price": {
"value": 123,
"currency": "<string>",
"decimal_places": 123
},
"refundable": true,
"exchangeable": true,
"conditions": [
"<string>"
]
}
],
"from_amount": {
"value": 123,
"currency": "<string>",
"decimal_places": 123
}
}
]
}{
"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": "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": "CONFLICT",
"message": "an exchange is already in progress for this booking",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"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_REJECTED",
"message": "sabre-rest BargainFinderMaxRQ failed with status 400: 27131 - Number of connection locations exceeds maximum allowed",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "All flight providers are temporarily unable to serve this search. Please retry later. Provider reasons: sabre-rest: provider temporarily closed; travelfusion: quota exhausted",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_TIMEOUT",
"message": "sabre-rest BargainFinderMaxRQ timed out after 30s",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}Search ground-transport connections (rail / coach / ferry). Station and city codes are ISO-country + city,
GBLON for London, not the IATA LON. Each connections[].id is a trip item token: pass it verbatim to POST /v1/trip as trip_item_token to add the journey to a cart, then check out as normal.Authorizations
ApiKeyAuthBearerAuth
Body
application/json
Supply a departure selector (departure_stations OR departure_city) AND an arrival selector (arrival_stations OR arrival_city). These either/or rules are enforced at runtime but cannot be expressed in JSON Schema, so they do not appear in required.
Pattern:
^\d{4}-\d{2}-\d{2}$Example:
"2026-08-28"
Distribusion station codes.
Example:
["GBLONLPB"]
ISO-country + city code (GBLON = London), NOT IATA.
Example:
"GBLON"
Example:
["GBLONLHB"]
Example:
"GBLON"
Round trip. Each leg is priced separately.
Pattern:
^\d{4}-\d{2}-\d{2}$Defaults to one adult when omitted.
Show child attributes
Show child attributes
Restrict to specific carriers.
Example:
["HEXR"]
Required string length:
3Example:
"GBP"
Example:
"en"
Show child attributes
Show child attributes
Response
Matching ground connections
Show child attributes
Show child attributes
