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

# YouTube Search API

> YouTube Search



## OpenAPI

````yaml openapi/youte-search.json GET /youtube/search
openapi: 3.0.3
info:
  title: YouTube Search API
  description: SearchApi.io YouTube Search endpoint
  version: 1.0.0
servers:
  - url: https://api.aisa.one/apis/v1
    description: YouTube Search API Server
security:
  - bearerAuth: []
paths:
  /youtube/search:
    get:
      tags:
        - YouTube Search
      summary: YouTube Search
      description: >-
        Perform a YouTube search via SearchApi. This AIsa wrapper uses the AIsa
        mapped path `/apis/v1/youtube/search`; the upstream SearchApi canonical
        path is not mounted directly. Use `engine=youtube` with a required `q`
        query.
      parameters:
        - name: engine
          in: query
          required: true
          schema:
            type: string
            enum:
              - youtube
          description: >-
            SearchApi engine identifier. Use `youtube` for this YouTube
            endpoint.
        - name: q
          in: query
          required: true
          schema:
            type: string
          description: Search query. Required by runtime and upstream SearchApi.
        - name: sp
          in: query
          required: false
          schema:
            type: string
          description: YouTube filter token (pagination or advanced filters)
        - name: gl
          in: query
          required: false
          schema:
            type: string
          description: Country code (e.g. us, jp)
        - name: hl
          in: query
          required: false
          schema:
            type: string
          description: Interface language
      responses:
        '200':
          description: Successful YouTube search response
          content:
            application/json:
              schema:
                type: object
                description: >-
                  YouTube search result payload returned by SearchApi through
                  the AIsa wrapper.
                additionalProperties: true
                properties:
                  search_metadata:
                    type: object
                    additionalProperties: true
                    properties:
                      id:
                        type: string
                      status:
                        type: string
                      created_at:
                        type: string
                      request_time_taken:
                        type: number
                      parsing_time_taken:
                        type: number
                      total_time_taken:
                        type: number
                      request_url:
                        type: string
                      html_url:
                        type: string
                      json_url:
                        type: string
                  search_parameters:
                    type: object
                    additionalProperties: true
                  search_information:
                    type: object
                    additionalProperties: true
                    properties:
                      total_results:
                        type: integer
                  videos:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      properties:
                        position:
                          type: integer
                        id:
                          type: string
                        title:
                          type: string
                        link:
                          type: string
                        description:
                          type: string
                        thumbnail:
                          type: string
                        published_time:
                          type: string
                        length:
                          type: string
                        views:
                          oneOf:
                            - type: integer
                            - type: string
                        channel:
                          type: object
                          additionalProperties: true
                        is_live:
                          type: boolean
                        badges:
                          type: array
                          items:
                            type: string
                  channels:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      properties:
                        position:
                          type: integer
                        id:
                          type: string
                        title:
                          type: string
                        link:
                          type: string
                        description:
                          type: string
                        thumbnail:
                          type: string
                        subscribers:
                          type: string
                  shorts:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      properties:
                        position:
                          type: integer
                        section_title:
                          type: string
                        items:
                          type: array
                          items:
                            type: object
                            additionalProperties: true
                  sections:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      properties:
                        position:
                          type: integer
                        section_title:
                          type: string
                        items:
                          type: array
                          items:
                            type: object
                            additionalProperties: true
                  playlists:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  ads:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  pagination:
                    type: object
                    additionalProperties: true
                    properties:
                      next_page_token:
                        type: string
        '400':
          description: Invalid request parameters
        '401':
          description: Unauthorized / Invalid API key
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````