---
title: "Demand time series for the top-N source markets"
method: GET
path: "/v1/market/trend"
tags: ["Demand"]
---

# Demand time series for the top-N source markets

`GET /v1/market/trend`

## Request

- Base URL: `https://api.gojinko.com`
- URL: `https://api.gojinko.com/v1/market/trend`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Ranks source markets feeding the destination by within-window growth, then returns each top-N market’s series. Requires `destination`. Optional `origin_country` (a `Country:<code>` selector, allowed only with `level=city`) narrows the ranking to that country’s origin cities.

## Query parameters

- `destination` string, required: Destination selector `<Level>:<Code>`. Required for this endpoint.
- `departure_date_from` string: Start of the departure window (YYYY-MM-DD). Supply together with departure_date_to; omit both (recommended) for no departure-date filter — each bucket then counts searches for all departure dates. A window anchored at the query date counts only long-advance-purchase searches in old buckets and near-departure searches in recent ones, ramping the curve artificially.
- `departure_date_to` string: End of the departure window (YYYY-MM-DD). Supply together with departure_date_from; omit both for no departure-date filter.
- `traveler_type` 'Solo' | 'Couple' | 'Group' | 'Family'
- `trip_type` 'oneway' | 'roundtrip'
- `trip_duration_min` integer, nullable
- `trip_duration_max` integer, nullable
- `search_window_min` integer, nullable
- `search_window_max` integer, nullable
- `trend_window` integer: Number of buckets N, in the chosen granularity unit (min 2; max depends on granularity: day <= 60, week <= 52, month <= 12; default 12). The series spans the last N complete buckets, excluding the in-progress one (day: last N days ending yesterday; week: last N full Monday-Sunday weeks; month: last N full calendar months).
- `granularity` 'day' | 'week' | 'month': Bucket size for the returned series: week (default), day, or month.
- `level` 'country' | 'city': Ranked output granularity: country (default) or city. Applies to destination/market (not audience).
- `limit` integer: Maximum number of series (top-N keys). Default 10, max 50.
- `origin_country` string: Origin country selector `Country:<code>` (e.g. `Country:US`). Optional and allowed ONLY together with level=city: it scopes the ranked origin markets to a single country so that country’s cities are ranked. Must be a country — a City selector is rejected.

## Response `200`

Top-N market time series

- TrendResponse
  - `granularity` string, required
  - `from` string, required
  - `to` string, required
  - `series` TrendSeries[], required
    - `label` string: Dimension value for ranked endpoints.
    - `origin` string
    - `destination` string
    - `series` object[], required
      - `date` string, required
      - `value` number, required
    - `summary` object
      - `total` number
      - `avg_per_day` number
      - `growth_pct` number, nullable
      - `peak_date` string
      - `peak_value` number

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `402`: Payment required — organization balance exhausted
- `404`: Resource not found
- `409`: The operation conflicts with the current state of the resource
- `410`: The resource this request names no longer exists
- `422`: Validation error
- `429`: Rate limit or quota exceeded
- `502`: The travel provider rejected the request, or an upstream call failed
- `503`: No travel provider can serve the request right now
- `504`: The travel provider did not answer in time

---

[API](https://skmtc.dev/gojinko/apis/jinko-public-api.md) - [All operations](https://skmtc.dev/gojinko/apis/jinko-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gojinko/apis/jinko-public-api/revisions/ac5046767e4c?raw)
