Skip to main content
GET
/
v1
/
destination
/
trend
Demand time series for the top destinations
curl --request GET \
  --url https://api.example.com/v1/destination/trend \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.example.com/v1/destination/trend"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.example.com/v1/destination/trend', 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/destination/trend",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/v1/destination/trend"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<api-key>")

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

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

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.example.com/v1/destination/trend")
  .header("X-API-Key", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "granularity": "week",
  "from": "2026-06-19",
  "to": "2026-06-25",
  "series": [
    {
      "series": [
        {
          "date": "2026-06-20",
          "value": 1234
        }
      ],
      "label": "FR",
      "origin": "Country:US",
      "destination": "Country:FR",
      "summary": {
        "total": 34567,
        "avg_per_day": 1191,
        "growth_pct": 12.3,
        "peak_date": "2026-06-14",
        "peak_value": 1890
      }
    }
  ]
}
{
  "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"
  }
}
Ranks the destinations reachable from an origin by their growth over the window, then returns a series for each of the top destinations. The optional destination_country selector (Country:<code>, allowed only when level=city) narrows the ranking to the cities of that country.

Authorizations

X-API-Key
string
header
required

Query Parameters

origin
string

Where travelers depart from. Accepts a city or a country as <Level>:<Code> (for example City:NYC or Country:US), or global for all origins.

Example:

"Country:US"

departure_date_from
string

Start of the departure window, written as YYYY-MM-DD. Provide it together with departure_date_to, or omit both (recommended) so every bucket counts searches for all departure dates. Anchoring a window at the query date makes older buckets count only searches made far ahead of travel and recent buckets count only searches made close to travel, which ramps the curve artificially.

Pattern: ^\d{4}-\d{2}-\d{2}$
Example:

"2026-07-01"

departure_date_to
string

End of the departure window, written as YYYY-MM-DD. Provide it together with departure_date_from, or omit both to include all departure dates.

Pattern: ^\d{4}-\d{2}-\d{2}$
Example:

"2026-07-31"

traveler_type
enum<string>
Available options:
Solo,
Couple,
Group,
Family
Example:

"Couple"

trip_type
enum<string>
Available options:
One-Way,
Round-Trip
Example:

"Round-Trip"

trip_duration_min
integer | null
Required range: x >= 0
Example:

5

trip_duration_max
integer | null
Required range: x >= 0
Example:

9

search_window_min
integer | null

The search window is how many days before the departure date a search was made. Sets the lower bound: keeps only demand from searches made at least this many days before departure.

Required range: x >= 0
Example:

7

search_window_max
integer | null

The search window is how many days before the departure date a search was made. Sets the upper bound: keeps only demand from searches made at most this many days before departure. Must be greater than or equal to search_window_min.

Required range: x >= 0
Example:

30

trend_window
integer

Number of buckets to return, in the chosen granularity unit (minimum 2, default 12). The maximum depends on granularity: up to 60 for day, 52 for week, and 12 for month. The series covers the last complete buckets and skips the one still in progress (day: the last N days ending yesterday; week: the last N full weeks running Monday to Sunday; month: the last N full calendar months).

Required range: x >= 2
Example:

12

granularity
enum<string>

Size of each bucket in the returned series: week (the default), day, or month.

Available options:
day,
week,
month
Example:

"week"

level
enum<string>

Granularity of the ranked results: country (the default) or city. Applies to destination and market results, not audience.

Available options:
country,
city
Example:

"city"

limit
integer
default:10

Maximum number of series to return. Default 10, maximum 50.

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

10

destination_country
string

Restricts the ranked destinations to the cities of a single country, given as Country:<code> (for example Country:FR). Optional, and allowed only when level=city. Must be a country; a city selector is rejected.

Example:

"Country:FR"

Response

Top destination time series

granularity
string
required
Example:

"week"

from
string
required
Example:

"2026-06-19"

to
string
required
Example:

"2026-06-25"

series
object[]
required