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

# /hopper/flights/prices

> Get Hopper's flight price calendar between an origin and destination (IATA airport codes or city codes). Returns price buckets that colour-code departure dates by how cheap they are — each bucket has a price label (e.g. $250+), a category (lowest, lower, higher, highest) and the list of dates that fall in that price band, so you can see when it is cheapest to fly. Resolve codes via the locations search (kind=flight).

**Price:** 5 credits

**⚠️ Common errors:** 412: No price calendar available for this route



## OpenAPI

````yaml /openapi/travel-hospitality.json post /api/hopper/flights/prices
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/hopper/flights/prices:
    post:
      tags:
        - /hopper
      summary: /hopper/flights/prices
      description: >-
        Get Hopper's flight price calendar between an origin and destination
        (IATA airport codes or city codes). Returns price buckets that
        colour-code departure dates by how cheap they are — each bucket has a
        price label (e.g. $250+), a category (lowest, lower, higher, highest)
        and the list of dates that fall in that price band, so you can see when
        it is cheapest to fly. Resolve codes via the locations search
        (kind=flight).


        **Price:** 5 credits


        **⚠️ Common errors:** 412: No price calendar available for this route
      operationId: __api_hopper_flights_prices_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HopperFlightsPricesPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/HopperFlightPriceBucket'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HopperFlightsPricesPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        origin:
          type: string
          minLength: 1
        destination:
          type: string
          minLength: 1
        trip_type:
          $ref: '#/components/schemas/HopperTripType'
          default: round_trip
        origin_type:
          $ref: '#/components/schemas/HopperFlightLocationType'
          default: airport
        destination_type:
          $ref: '#/components/schemas/HopperFlightLocationType'
          default: airport
      type: object
      required:
        - origin
        - destination
    HopperFlightPriceBucket:
      properties:
        '@type':
          type: string
          default: HopperFlightPriceBucket
        price_label:
          anyOf:
            - type: string
            - type: 'null'
        category:
          anyOf:
            - type: string
            - type: 'null'
        dates:
          items:
            type: string
          type: array
          default: []
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    HopperTripType:
      type: string
      enum:
        - round_trip
        - one_way
    HopperFlightLocationType:
      type: string
      enum:
        - airport
        - city
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````