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

# /flightaware/flights

> Get the current or most recent flight for an airline flight number, tail number, or flight id

**Price:** 1 credit

**⚠️ Common errors:** 412: No flight found for the given identifier



## OpenAPI

````yaml /openapi/developer-data.json post /api/flightaware/flights
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/flightaware/flights:
    post:
      tags:
        - /flightaware
      summary: /flightaware/flights
      description: >-
        Get the current or most recent flight for an airline flight number, tail
        number, or flight id


        **Price:** 1 credit


        **⚠️ Common errors:** 412: No flight found for the given identifier
      operationId: __api_flightaware_flights_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlightawareFlightsPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FlightawareFlight'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FlightawareFlightsPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        ident:
          type: string
          minLength: 2
      type: object
      required:
        - ident
    FlightawareFlight:
      properties:
        '@type':
          type: string
          default: FlightawareFlight
        ident:
          type: string
        iata_ident:
          anyOf:
            - type: string
            - type: 'null'
        friendly_ident:
          anyOf:
            - type: string
            - type: 'null'
        flight_id:
          anyOf:
            - type: string
            - type: 'null'
        status:
          anyOf:
            - type: string
            - type: 'null'
        is_cancelled:
          anyOf:
            - type: boolean
            - type: 'null'
        is_diverted:
          anyOf:
            - type: boolean
            - type: 'null'
        aircraft:
          anyOf:
            - $ref: '#/components/schemas/FlightawareAircraftInfo'
            - type: 'null'
        airline:
          anyOf:
            - $ref: '#/components/schemas/FlightawareAirline'
            - type: 'null'
        origin:
          anyOf:
            - $ref: '#/components/schemas/FlightawareAirportRef'
            - type: 'null'
        destination:
          anyOf:
            - $ref: '#/components/schemas/FlightawareAirportRef'
            - type: 'null'
        gate_departure:
          anyOf:
            - $ref: '#/components/schemas/FlightawareTimes'
            - type: 'null'
        gate_arrival:
          anyOf:
            - $ref: '#/components/schemas/FlightawareTimes'
            - type: 'null'
        takeoff:
          anyOf:
            - $ref: '#/components/schemas/FlightawareTimes'
            - type: 'null'
        landing:
          anyOf:
            - $ref: '#/components/schemas/FlightawareTimes'
            - type: 'null'
        filed_route:
          anyOf:
            - type: string
            - type: 'null'
        filed_altitude:
          anyOf:
            - type: integer
            - type: 'null'
        filed_speed:
          anyOf:
            - type: integer
            - type: 'null'
        planned_distance:
          anyOf:
            - type: integer
            - type: 'null'
        distance_flown:
          anyOf:
            - type: integer
            - type: 'null'
        distance_remaining:
          anyOf:
            - type: integer
            - type: 'null'
        ete:
          anyOf:
            - type: integer
            - type: 'null'
        groundspeed:
          anyOf:
            - type: integer
            - type: 'null'
        altitude:
          anyOf:
            - type: integer
            - type: 'null'
        heading:
          anyOf:
            - type: integer
            - type: 'null'
        average_departure_delay:
          anyOf:
            - type: integer
            - type: 'null'
        average_arrival_delay:
          anyOf:
            - type: integer
            - type: 'null'
      type: object
      required:
        - ident
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    FlightawareAircraftInfo:
      properties:
        '@type':
          type: string
          default: FlightawareAircraftInfo
        type_code:
          anyOf:
            - type: string
            - type: 'null'
        manufacturer:
          anyOf:
            - type: string
            - type: 'null'
        model:
          anyOf:
            - type: string
            - type: 'null'
        engine_count:
          anyOf:
            - type: integer
            - type: 'null'
        engine_type:
          anyOf:
            - type: string
            - type: 'null'
        is_heavy:
          anyOf:
            - type: boolean
            - type: 'null'
      type: object
    FlightawareAirline:
      properties:
        '@type':
          type: string
          default: FlightawareAirline
        name:
          anyOf:
            - type: string
            - type: 'null'
        short_name:
          anyOf:
            - type: string
            - type: 'null'
        icao:
          anyOf:
            - type: string
            - type: 'null'
        iata:
          anyOf:
            - type: string
            - type: 'null'
        callsign:
          anyOf:
            - type: string
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    FlightawareAirportRef:
      properties:
        '@type':
          type: string
          default: FlightawareAirportRef
        icao:
          anyOf:
            - type: string
            - type: 'null'
        iata:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        location:
          anyOf:
            - type: string
            - type: 'null'
        latitude:
          anyOf:
            - type: number
            - type: 'null'
        longitude:
          anyOf:
            - type: number
            - type: 'null'
        gate:
          anyOf:
            - type: string
            - type: 'null'
        terminal:
          anyOf:
            - type: string
            - type: 'null'
        timezone:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    FlightawareTimes:
      properties:
        '@type':
          type: string
          default: FlightawareTimes
        scheduled_at:
          anyOf:
            - type: integer
            - type: 'null'
        estimated_at:
          anyOf:
            - type: integer
            - type: 'null'
        actual_at:
          anyOf:
            - type: integer
            - 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
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````