> ## 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.

# /skyscanner/flights/search

> Search Skyscanner flights between two places by entity id for a given date, cabin class and passenger count. Returns ranked itineraries with total price, per-agent booking prices and deeplinks, full leg and segment details (airports, departure/arrival times, duration, stop count), operating and marketing airlines, fare change/refund policy and an eco (CO2) contender delta. For round trips also pass a return date. Origin and destination are Skyscanner place entity ids (resolve them via the places autosuggest).

**Price:** 10 credits per 5 results

**⚠️ Common errors:** 412: No flights found for the given route, date and passenger combination



## OpenAPI

````yaml /openapi/travel-hospitality.json post /api/skyscanner/flights/search
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/skyscanner/flights/search:
    post:
      tags:
        - /skyscanner
      summary: /skyscanner/flights/search
      description: >-
        Search Skyscanner flights between two places by entity id for a given
        date, cabin class and passenger count. Returns ranked itineraries with
        total price, per-agent booking prices and deeplinks, full leg and
        segment details (airports, departure/arrival times, duration, stop
        count), operating and marketing airlines, fare change/refund policy and
        an eco (CO2) contender delta. For round trips also pass a return date.
        Origin and destination are Skyscanner place entity ids (resolve them via
        the places autosuggest).


        **Price:** 10 credits per 5 results


        **⚠️ Common errors:** 412: No flights found for the given route, date
        and passenger combination
      operationId: __api_skyscanner_flights_search_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SkyscannerFlightsSearchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SkyscannerItinerary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SkyscannerFlightsSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        origin:
          type: string
          pattern: ^\d+$
        destination:
          type: string
          pattern: ^\d+$
        depart_date:
          type: string
          format: date
        return_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
        cabin_class:
          $ref: '#/components/schemas/SkyscannerCabinClass'
          default: ECONOMY
        adults:
          type: integer
          maximum: 8
          minimum: 1
          default: 1
        child_ages:
          items:
            type: integer
          type: array
          default: []
        count:
          type: integer
          minimum: 1
      type: object
      required:
        - origin
        - destination
        - depart_date
        - count
    SkyscannerItinerary:
      properties:
        '@type':
          type: string
          default: SkyscannerItinerary
        id:
          type: string
        price:
          anyOf:
            - $ref: '#/components/schemas/SkyscannerPrice'
            - type: 'null'
        score:
          anyOf:
            - type: number
            - type: 'null'
        eco_contender_delta:
          anyOf:
            - type: number
            - type: 'null'
        is_self_transfer:
          anyOf:
            - type: boolean
            - type: 'null'
        is_protected_self_transfer:
          anyOf:
            - type: boolean
            - type: 'null'
        is_mashup:
          anyOf:
            - type: boolean
            - type: 'null'
        has_flexible_options:
          anyOf:
            - type: boolean
            - type: 'null'
        fare_policy:
          anyOf:
            - $ref: '#/components/schemas/SkyscannerFarePolicy'
            - type: 'null'
        legs:
          items:
            $ref: '#/components/schemas/SkyscannerLeg'
          type: array
          default: []
        pricing_options:
          items:
            $ref: '#/components/schemas/SkyscannerPricingOption'
          type: array
          default: []
      type: object
      required:
        - id
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    SkyscannerCabinClass:
      type: string
      enum:
        - ECONOMY
        - PREMIUM_ECONOMY
        - BUSINESS
        - FIRST
    SkyscannerPrice:
      properties:
        '@type':
          type: string
          default: SkyscannerPrice
        raw:
          anyOf:
            - type: number
            - type: 'null'
        formatted:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    SkyscannerFarePolicy:
      properties:
        '@type':
          type: string
          default: SkyscannerFarePolicy
        is_change_allowed:
          anyOf:
            - type: boolean
            - type: 'null'
        is_partially_changeable:
          anyOf:
            - type: boolean
            - type: 'null'
        is_cancellation_allowed:
          anyOf:
            - type: boolean
            - type: 'null'
        is_partially_refundable:
          anyOf:
            - type: boolean
            - type: 'null'
      type: object
    SkyscannerLeg:
      properties:
        '@type':
          type: string
          default: SkyscannerLeg
        id:
          anyOf:
            - type: string
            - type: 'null'
        origin:
          anyOf:
            - $ref: '#/components/schemas/SkyscannerPlace'
            - type: 'null'
        destination:
          anyOf:
            - $ref: '#/components/schemas/SkyscannerPlace'
            - type: 'null'
        departure:
          anyOf:
            - type: string
            - type: 'null'
        arrival:
          anyOf:
            - type: string
            - type: 'null'
        duration_minutes:
          anyOf:
            - type: integer
            - type: 'null'
        stop_count:
          anyOf:
            - type: integer
            - type: 'null'
        day_change:
          anyOf:
            - type: integer
            - type: 'null'
        marketing_carriers:
          items:
            $ref: '#/components/schemas/SkyscannerCarrier'
          type: array
          default: []
        operating_carriers:
          items:
            $ref: '#/components/schemas/SkyscannerCarrier'
          type: array
          default: []
        segments:
          items:
            $ref: '#/components/schemas/SkyscannerSegment'
          type: array
          default: []
      type: object
    SkyscannerPricingOption:
      properties:
        '@type':
          type: string
          default: SkyscannerPricingOption
        agent_id:
          anyOf:
            - type: string
            - type: 'null'
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
        agent_rating:
          anyOf:
            - type: number
            - type: 'null'
        price:
          anyOf:
            - type: number
            - type: 'null'
        booking_proposition:
          anyOf:
            - type: string
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    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
    SkyscannerPlace:
      properties:
        '@type':
          type: string
          default: SkyscannerPlace
        code:
          anyOf:
            - type: string
            - type: 'null'
        entity_id:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        city:
          anyOf:
            - type: string
            - type: 'null'
        country:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    SkyscannerCarrier:
      properties:
        '@type':
          type: string
          default: SkyscannerCarrier
        id:
          anyOf:
            - type: integer
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        code:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    SkyscannerSegment:
      properties:
        '@type':
          type: string
          default: SkyscannerSegment
        origin:
          anyOf:
            - $ref: '#/components/schemas/SkyscannerPlace'
            - type: 'null'
        destination:
          anyOf:
            - $ref: '#/components/schemas/SkyscannerPlace'
            - type: 'null'
        departure:
          anyOf:
            - type: string
            - type: 'null'
        arrival:
          anyOf:
            - type: string
            - type: 'null'
        duration_minutes:
          anyOf:
            - type: integer
            - type: 'null'
        flight_number:
          anyOf:
            - type: string
            - type: 'null'
        marketing_carrier:
          anyOf:
            - $ref: '#/components/schemas/SkyscannerCarrier'
            - type: 'null'
        operating_carrier:
          anyOf:
            - $ref: '#/components/schemas/SkyscannerCarrier'
            - type: 'null'
      type: object
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````