> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dev.gojinko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# trend

> The most flexible tool. Supply explicit origin and destination (each can be a list) to see how demand evolved for a specific route or question

Returns one search volume series for each origin and destination pair. At most one of origins or destinations may contain multiple entries, so you can list several origins to a single destination, or several destinations from a single origin.


## OpenAPI

````yaml api-reference/public-api.yaml GET /v1/trend
openapi: 3.0.0
info:
  title: Jinko Public API
  version: 0.1.0
  description: >-
    Curated public REST surface for Jinko. Authenticated with jnk_ API keys. See
    https://docs.gojinko.com for guides.
servers: []
security: []
paths:
  /v1/trend:
    get:
      tags:
        - Demand
      summary: Demand time series for explicit origin/destination pairs
      description: >-
        Returns one search volume series for each origin and destination pair.
        At most one of origins or destinations may contain multiple entries, so
        you can list several origins to a single destination, or several
        destinations from a single origin.
      parameters:
        - schema:
            type: string
            minLength: 1
            description: >-
              One or more origins travelers depart from, given as
              `<Level>:<Code>` and separated by commas. Accepts cities or
              countries (for example `City:NYC,Country:US`). At most one of
              origins or destinations may contain multiple entries.
            example: Country:US
          required: true
          name: origins
          in: query
        - schema:
            type: string
            minLength: 1
            description: >-
              One or more destinations travelers want to reach, given as
              `<Level>:<Code>` and separated by commas. Accepts cities or
              countries (for example `City:PAR,Country:FR`).
            example: Country:FR,Country:DE,Country:GB
          required: true
          name: destinations
          in: query
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: >-
              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.
            example: '2026-07-01'
          required: false
          name: departure_date_from
          in: query
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: >-
              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.
            example: '2026-07-31'
          required: false
          name: departure_date_to
          in: query
        - schema:
            type: string
            enum:
              - Solo
              - Couple
              - Group
              - Family
            example: Couple
          required: false
          name: traveler_type
          in: query
        - schema:
            type: string
            enum:
              - One-Way
              - Round-Trip
            example: Round-Trip
          required: false
          name: trip_type
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            example: 5
          required: false
          name: trip_duration_min
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            example: 9
          required: false
          name: trip_duration_max
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            description: >-
              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.
            example: 7
          required: false
          name: search_window_min
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            description: >-
              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.
            example: 30
          required: false
          name: search_window_max
          in: query
        - schema:
            type: integer
            minimum: 2
            description: >-
              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).
            example: 12
          required: false
          name: trend_window
          in: query
        - schema:
            type: string
            enum:
              - day
              - week
              - month
            description: >-
              Size of each bucket in the returned series: week (the default),
              day, or month.
            example: week
          required: false
          name: granularity
          in: query
      responses:
        '200':
          description: Per pair demand time series
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrendResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: Malformed JSON in request body.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: AUTH_REQUIRED
                  message: Invalid or expired API key.
                  doc_url: https://docs.gojinko.com/api-reference/authentication
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: >-
                    origins: origins is required; trip_type: trip_type is
                    required
                  doc_url: https://docs.gojinko.com/concepts/errors
        '429':
          description: Rate limit or quota exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RATE_LIMITED
                  message: Rate limit or quota exceeded.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '502':
          description: Upstream service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_ERROR
                  message: Upstream travel provider returned an error. Please retry.
                  doc_url: https://docs.gojinko.com/concepts/errors
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    TrendResponse:
      type: object
      properties:
        granularity:
          type: string
          example: week
        from:
          type: string
          example: '2026-06-19'
        to:
          type: string
          example: '2026-06-25'
        series:
          type: array
          items:
            $ref: '#/components/schemas/TrendSeries'
      required:
        - granularity
        - from
        - to
        - series
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            doc_url:
              type: string
          required:
            - code
            - message
      required:
        - error
    TrendSeries:
      type: object
      properties:
        label:
          type: string
          description: Dimension value for ranked endpoints.
          example: FR
        origin:
          type: string
          example: Country:US
        destination:
          type: string
          example: Country:FR
        series:
          type: array
          items:
            type: object
            properties:
              date:
                type: string
                example: '2026-06-20'
              value:
                type: number
                example: 1234
            required:
              - date
              - value
        summary:
          type: object
          properties:
            total:
              type: number
              example: 34567
            avg_per_day:
              type: number
              example: 1191
            growth_pct:
              type: number
              nullable: true
              example: 12.3
            peak_date:
              type: string
              example: '2026-06-14'
            peak_value:
              type: number
              example: 1890
      required:
        - series
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````