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

# Search Flights



## OpenAPI

````yaml /openapi.json post /v1/search/flights
openapi: 3.1.0
info:
  title: Stardrift API
  description: >-
    Read and edit the authenticated user's trips, itineraries, recorded
    bookings, and saved lists. Private records are owner-scoped. MCP tool names
    are documented separately from these HTTP operations.
  version: v1
servers:
  - url: https://stardrift.ai/api
security: []
paths:
  /v1/search/flights:
    post:
      tags:
        - mcp-server
      summary: Search Flights
      operationId: search_flights_v1_search_flights_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlightSearchInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Search Flights V1 Search Flights Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FlightSearchInput:
      properties:
        adults:
          type: integer
          maximum: 9
          minimum: 1
          title: Adults
          default: 1
        currency:
          type: string
          enum:
            - ALL
            - DZD
            - ARS
            - AMD
            - AWG
            - AUD
            - AZN
            - BSD
            - BHD
            - BYN
            - BMD
            - BAM
            - BRL
            - GBP
            - BGN
            - XPF
            - CAD
            - CLP
            - CNY
            - COP
            - CRC
            - CUP
            - CZK
            - DKK
            - DOP
            - EGP
            - EUR
            - GEL
            - HKD
            - HUF
            - ISK
            - INR
            - IDR
            - IRR
            - ILS
            - JMD
            - JPY
            - JOD
            - KZT
            - KWD
            - LBP
            - MKD
            - MYR
            - MXN
            - MDL
            - MAD
            - TWD
            - NZD
            - NOK
            - OMR
            - PKR
            - PAB
            - PEN
            - PHP
            - PLN
            - QAR
            - RON
            - RUB
            - SAR
            - RSD
            - SGD
            - ZAR
            - KRW
            - SEK
            - CHF
            - THB
            - TRY
            - USD
            - UAH
            - AED
            - VND
          title: Currency
          default: USD
        legs:
          items:
            $ref: '#/components/schemas/FlightLeg'
          type: array
          maxItems: 4
          minItems: 1
          title: Legs
        trip_type:
          type: string
          enum:
            - one_way
            - roundtrip
            - multi_city
          title: Trip Type
          default: one_way
        children:
          type: integer
          maximum: 8
          minimum: 0
          title: Children
          default: 0
        travel_class:
          type: string
          enum:
            - economy
            - premium_economy
            - business
            - first
          title: Travel Class
          default: economy
        max_price:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Max Price
        max_stops:
          anyOf:
            - type: integer
              maximum: 2
              minimum: 0
            - type: 'null'
          title: Max Stops
      additionalProperties: false
      type: object
      required:
        - legs
      title: FlightSearchInput
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FlightLeg:
      properties:
        departure_id:
          type: string
          pattern: ^[A-Z]{3}$
          title: Departure Id
        arrival_id:
          type: string
          pattern: ^[A-Z]{3}$
          title: Arrival Id
        date:
          type: string
          format: date
          title: Date
      additionalProperties: false
      type: object
      required:
        - departure_id
        - arrival_id
        - date
      title: FlightLeg
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````