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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Search Videos

> Search YouTube and get back matching videos, channels, and playlists.

Search YouTube and get back matching videos, channels, and playlists. Set `engine=youtube` and pass the query in `q`; both are required. Optionally narrow by country (`gl`) and interface language (`hl`), or pass a YouTube filter token in `sp` for pagination and advanced filters such as upload date, duration, or result type. Use this to find video content on a topic, track a channel's recent uploads, or gauge how much video coverage a subject has.

Note: this is served through the AIsa mapped path `/apis/v1/youtube/search`; the upstream provider's canonical path is not mounted directly.

> [!NOTE]
>
> **First time?** Point any MCP client at `https://mcp.aisa.one/mcp` — Claude
> Code, Codex, Cursor, VS Code and the rest. Authorization is OAuth: the client
> opens a browser, you click Allow once, and there is no key to paste. Your
> agent then reaches every endpoint through a few meta tools: `search`,
> `list_categories`, `get_details` and `batch_quote` are free, `batch_use` is
> billed per call. Setup per client is in
> [Connect via MCP](https://aisa.one/docs/agent-quickstart.md); the live tool list and what each call
> costs are on [aisa.one/mcp](https://aisa.one/mcp#connect).

[Set this endpoint up in your agent →](https://aisa.one/mcp?from=/api-reference/search/get_youtube-search)

## Request contract

* **Method and path:** GET /apis/v1/youtube/search
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/youtube/search`
* **engine:** query; required
* **gl:** query; optional
* **hl:** query; optional
* **q:** query; required
* **sp:** query; optional

[Complete OpenAPI definition](https://aisa.one/docs/openapi-public/youtube.json)

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "get_youtube_search",
  "method": "GET",
  "path": "/apis/v1/youtube/search",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "description": "SearchApi engine identifier. Use `youtube` for this YouTube endpoint.",
      "in": "query",
      "name": "engine",
      "required": true,
      "schema": {
        "enum": [
          "youtube"
        ],
        "type": "string"
      }
    },
    {
      "description": "Country code (e.g. us, jp)",
      "in": "query",
      "name": "gl",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Interface language",
      "in": "query",
      "name": "hl",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Search query. Required by runtime and upstream SearchApi.",
      "in": "query",
      "name": "q",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "YouTube filter token (pagination or advanced filters)",
      "in": "query",
      "name": "sp",
      "required": false,
      "schema": {
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

Request pricing. Default request estimate: \$0.0029 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.


## OpenAPI

````yaml openapi-public/youtube.json GET /apis/v1/youtube/search
openapi: 3.1.0
info:
  description: ''
  title: Youtube
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    youtube:
      description: ''
      title: Youtube
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: df38108c5e38fb1e141efbcf9c4ae031508a206b64d543a25442fd82a1088b1c
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/airbnb/search
    - /apis/v1/ebay/search
    - /apis/v1/youtube/channel
    - /apis/v1/youtube/channels/shorts
    - /apis/v1/youtube/channels/videos
    - /apis/v1/youtube/community-posts
    - /apis/v1/youtube/playlists
    - /apis/v1/youtube/search
    - /apis/v1/youtube/search/hashtags
    - /apis/v1/youtube/shorts/trending
    - /apis/v1/youtube/videos
    - /apis/v1/youtube/videos/comments
    - /apis/v1/youtube/videos/comments/analysis
    - /apis/v1/youtube/videos/comments/replies
    - /apis/v1/youtube/videos/transcript
  x-aisa-document:
    composer_version: '31'
    facts_hash: df38108c5e38fb1e141efbcf9c4ae031508a206b64d543a25442fd82a1088b1c
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
    public_projection:
      version: '4'
      source_document_hash: sha256:9089b0c9a735f52274805537455639a576691d7eeb8b83bba0d5e792585a180b
    document_hash: sha256:01d600303ca6867060327e39120462ddf84ea24d3539a8b3c6e207e86d5ed877
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: youtube
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/youtube/search:
    get:
      tags:
        - group1000
      summary: Search Videos
      description: >-
        Search YouTube and get back matching videos, channels, and playlists.
        Set `engine=youtube` and pass the query in `q`; both are required.
        Optionally narrow by country (`gl`) and interface language (`hl`), or
        pass a YouTube filter token in `sp` for pagination and advanced filters
        such as upload date, duration, or result type. Use this to find video
        content on a topic, track a channel's recent uploads, or gauge how much
        video coverage a subject has. Note: this is served through the AIsa
        mapped path `/apis/v1/youtube/search`; the upstream provider's canonical
        path is not mounted directly.


        > **Request example pending verification.** The request example for this
        endpoint has not yet been verified in production. Static examples
        describe the request format; replace sample values with your own. Check
        the estimated price with a free quote request (`X-AISA-Cost-Mode:
        quote`) before running it.
      operationId: get_youtube_search
      parameters:
        - description: >-
            SearchApi engine identifier. Use `youtube` for this YouTube
            endpoint.
          in: query
          name: engine
          required: true
          schema:
            enum:
              - youtube
            type: string
        - description: Country code (e.g. us, jp)
          in: query
          name: gl
          required: false
          schema:
            type: string
        - description: Interface language
          in: query
          name: hl
          required: false
          schema:
            type: string
        - description: Search query. Required by runtime and upstream SearchApi.
          in: query
          name: q
          required: true
          schema:
            type: string
        - description: YouTube filter token (pagination or advanced filters)
          in: query
          name: sp
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseFc5Af1Fcba22_SearchResponse'
          description: Successful response
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  schemas:
    ResponseFc5Af1Fcba22_SearchResponse:
      properties:
        ads:
          description: Advertisement results
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Ad'
          type: array
        channels:
          description: YouTube channel results
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Channel'
          type: array
        error:
          description: Error message if the search failed
          type: string
        featured_channel:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_FeaturedChannel'
        movies:
          description: Movie results
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Movie'
          type: array
        pagination:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Pagination'
        people_also_search_for:
          description: Related search suggestions
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_PeopleAlsoSearchFor'
          type: array
        playlists:
          description: Playlist results
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Playlist'
          type: array
        posts:
          description: Community post results
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Posts'
          type: array
        search_information:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_SearchInformation'
        search_metadata:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_SearchMetadata'
        search_parameters:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_SearchParameters'
        sections:
          description: Section results
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Section'
          type: array
        shorts:
          description: YouTube Shorts results
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Shorts'
          type: array
        suggestions:
          description: Search query suggestions
          items:
            type: string
          type: array
        videos:
          description: Video search results
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Video'
          type: array
      type: object
    ResponseFc5Af1Fcba22_Ad:
      properties:
        channel:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_AdChannel'
        description:
          description: Ad description
          type: string
        id:
          description: Video ID for video ads
          type: string
        length:
          description: Video duration for video ads
          type: string
        link:
          description: Ad link
          type: string
        position:
          description: Position in search results
          type: integer
        thumbnail:
          description: Ad thumbnail URL
          type: string
        title:
          description: Ad title
          type: string
        website:
          description: Advertiser website URL
          type: string
      type: object
    ResponseFc5Af1Fcba22_Channel:
      properties:
        description:
          description: Channel description
          type: string
        id:
          description: YouTube channel ID
          type: string
        is_verified:
          description: Whether the channel is verified
          type: boolean
        link:
          description: Link to the channel
          type: string
        position:
          description: Position in search results
          type: integer
        subscribers:
          description: Number of subscribers
          type: integer
        thumbnail:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Thumbnail'
        title:
          description: Channel name
          type: string
        video_count:
          description: Number of videos
          type: integer
      type: object
    ResponseFc5Af1Fcba22_FeaturedChannel:
      properties:
        highlighted_video:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_HighlightedVideo'
        id:
          description: Featured channel ID
          type: string
        link:
          description: Link to the featured channel
          type: string
        subtitle:
          description: Featured channel subtitle
          type: string
        title:
          description: Featured channel title
          type: string
        videos:
          description: Featured channel videos
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_FeaturedVideo'
          type: array
      type: object
    ResponseFc5Af1Fcba22_Movie:
      properties:
        badges:
          description: Movie badges
          items:
            type: string
          type: array
        buttons:
          description: Action buttons
          items:
            type: string
          type: array
        channel:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_MovieChannel'
        description:
          description: Movie description
          type: string
        id:
          description: Movie video ID
          type: string
        length:
          description: Movie duration
          type: string
        link:
          description: Link to the movie
          type: string
        metadata_items:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_MetadataItems'
        position:
          description: Position in search results
          type: integer
        thumbnail:
          description: Movie thumbnail URL
          type: string
        title:
          description: Movie title
          type: string
      type: object
    ResponseFc5Af1Fcba22_Pagination:
      properties:
        next_page_token:
          description: Token to fetch the next page of results
          type: string
      type: object
    ResponseFc5Af1Fcba22_PeopleAlsoSearchFor:
      properties:
        link:
          description: Link to perform the search
          type: string
        query:
          description: Suggested search query
          type: string
        thumbnail:
          description: Thumbnail for the suggestion
          type: string
      type: object
    ResponseFc5Af1Fcba22_Playlist:
      properties:
        channel:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_PlaylistChannel'
        id:
          description: Playlist ID
          type: string
        link:
          description: Link to the playlist
          type: string
        position:
          description: Position in search results
          type: integer
        published_time:
          description: Time since publication
          type: string
        thumbnail:
          description: Playlist thumbnail URL
          type: string
        title:
          description: Playlist title
          type: string
        video_count:
          description: Number of videos in playlist
          type: integer
        videos:
          description: Videos in the playlist
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_PlaylistVideo'
          type: array
      type: object
    ResponseFc5Af1Fcba22_Posts:
      properties:
        items:
          description: Community posts
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Post'
          type: array
        position:
          description: Position in search results
          type: integer
        section_title:
          description: Section title for posts
          type: string
      type: object
    ResponseFc5Af1Fcba22_SearchInformation:
      properties:
        corrected_query:
          description: Corrected query if spelling fix was applied
          type: string
        original_query:
          description: Original query before correction
          type: string
        original_query_sp:
          description: SP parameter for original query
          type: string
        state:
          description: State of query correction if applicable
          type: string
        total_results:
          description: Total number of results found
          type: integer
      type: object
    ResponseFc5Af1Fcba22_SearchMetadata:
      properties:
        created_at:
          description: Timestamp when the search was created
          format: date-time
          type: string
        html_url:
          description: URL to view HTML results
          type: string
        id:
          description: Unique identifier for the search request
          type: string
        json_url:
          description: URL to view JSON results
          type: string
        parsing_time_taken:
          description: Time taken to parse the results in seconds
          type: number
        request_time_taken:
          description: Time taken to make the request in seconds
          type: number
        request_url:
          description: YouTube URL for this search
          type: string
        status:
          description: Status of the search request
          type: string
        total_time_taken:
          description: Total time taken for the search in seconds
          type: number
      required:
        - id
        - status
        - created_at
      type: object
    ResponseFc5Af1Fcba22_SearchParameters:
      properties:
        engine:
          description: Search engine used
          type: string
        gl:
          description: Country code that was used
          type: string
        hl:
          description: Interface language that was used
          type: string
        q:
          description: Search query that was used
          type: string
        sp:
          description: Filter/pagination parameter that was used
          type: string
      type: object
    ResponseFc5Af1Fcba22_Section:
      properties:
        items:
          description: Items in the section
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_SectionItem'
          type: array
        position:
          description: Position in search results
          type: integer
        section_title:
          description: Section title
          type: string
      type: object
    ResponseFc5Af1Fcba22_Shorts:
      properties:
        items:
          description: Short videos
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Short'
          type: array
        position:
          description: Position in search results
          type: integer
        section_title:
          description: Section title for shorts
          type: string
      type: object
    ResponseFc5Af1Fcba22_Video:
      properties:
        badges:
          description: Video badges
          items:
            type: string
          type: array
        channel:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_VideoChannel'
        description:
          description: Video description snippet
          type: string
        id:
          description: YouTube video ID
          type: string
        is_live:
          description: Whether the video is currently live
          type: boolean
        key_moments:
          description: Key moments in the video
          items:
            $ref: '#/components/schemas/ResponseFc5Af1Fcba22_KeyMoment'
          type: array
        length:
          description: Video duration
          type: string
        link:
          description: Link to the video
          type: string
        position:
          description: Position in search results
          type: integer
        published_time:
          description: Time since publication
          type: string
        thumbnail:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_Thumbnail'
        title:
          description: Video title
          type: string
        views:
          description: Number of views
          type: integer
      type: object
    ResponseFc5Af1Fcba22_AdChannel:
      properties:
        id:
          description: Channel ID
          type: string
        link:
          description: Link to the channel
          type: string
        title:
          description: Channel name
          type: string
      type: object
    ResponseFc5Af1Fcba22_Thumbnail:
      properties:
        rich:
          description: Rich/animated thumbnail URL
          type: string
        static:
          description: Static thumbnail URL
          type: string
      type: object
    ResponseFc5Af1Fcba22_HighlightedVideo:
      properties:
        id:
          description: Video ID
          type: string
        length:
          description: Video duration
          type: string
        link:
          description: Link to the video
          type: string
        subtitle:
          description: Video subtitle
          type: string
        title:
          description: Video title
          type: string
      type: object
    ResponseFc5Af1Fcba22_FeaturedVideo:
      properties:
        channel:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_FeaturedVideoChannel'
        id:
          description: Video ID
          type: string
        length:
          description: Video duration
          type: string
        link:
          description: Link to the video
          type: string
        subtitle:
          description: Video subtitle
          type: string
        thumbnail:
          description: Video thumbnail URL
          type: string
        title:
          description: Video title
          type: string
      type: object
    ResponseFc5Af1Fcba22_MovieChannel:
      properties:
        id:
          description: Channel ID
          type: string
        is_verified:
          description: Whether the channel is verified
          type: boolean
        link:
          description: Link to the channel
          type: string
        title:
          description: Channel name
          type: string
      type: object
    ResponseFc5Af1Fcba22_MetadataItems:
      properties:
        bottom:
          description: Bottom metadata items
          items:
            type: string
          type: array
        top:
          description: Top metadata items
          items:
            type: string
          type: array
      type: object
    ResponseFc5Af1Fcba22_PlaylistChannel:
      properties:
        id:
          description: Channel ID
          type: string
        is_verified:
          description: Whether the channel is verified
          type: boolean
        link:
          description: Link to the channel
          type: string
        title:
          description: Channel name
          type: string
      type: object
    ResponseFc5Af1Fcba22_PlaylistVideo:
      properties:
        id:
          description: Video ID
          type: string
        length:
          description: Video duration
          type: string
        link:
          description: Link to the video
          type: string
        title:
          description: Video title
          type: string
      type: object
    ResponseFc5Af1Fcba22_Post:
      properties:
        channel:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_PostChannel'
        comments:
          description: Number of comments text
          type: string
        extracted_comments:
          description: Number of comments as integer
          type: integer
        extracted_likes:
          description: Number of likes as integer
          type: integer
        id:
          description: Post ID
          type: string
        likes:
          description: Number of likes text
          type: string
        link:
          description: Link to the post
          type: string
        position:
          description: Position within posts section
          type: integer
        published_time:
          description: Time since publication
          type: string
        text:
          description: Post text content
          type: string
        thumbnail:
          description: Post thumbnail URL
          type: string
      type: object
    ResponseFc5Af1Fcba22_SectionItem:
      properties:
        channel:
          $ref: '#/components/schemas/ResponseFc5Af1Fcba22_SectionChannel'
        id:
          description: Item ID
          type: string
        length:
          description: Item duration
          type: string
        link:
          description: Link to the item
          type: string
        published_time:
          description: Time since publication
          type: string
        thumbnail:
          description: Item thumbnail URL
          type: string
        title:
          description: Item title
          type: string
        views:
          description: Number of views
          type: integer
      type: object
    ResponseFc5Af1Fcba22_Short:
      properties:
        duration:
          description: Short duration
          type: string
        id:
          description: Short video ID
          type: string
        link:
          description: Link to the short
          type: string
        position:
          description: Position within shorts section
          type: integer
        thumbnail:
          description: Short thumbnail URL
          type: string
        title:
          description: Short title
          type: string
        views:
          description: Number of views
          type: integer
      type: object
    ResponseFc5Af1Fcba22_VideoChannel:
      properties:
        id:
          description: Channel ID
          type: string
        is_verified:
          description: Whether the channel is verified
          type: boolean
        link:
          description: Link to the channel
          type: string
        thumbnail:
          description: Channel thumbnail URL
          type: string
        title:
          description: Channel name
          type: string
      type: object
    ResponseFc5Af1Fcba22_KeyMoment:
      properties:
        start_seconds:
          description: Start time of the moment in seconds
          type: integer
        thumbnail:
          description: Key moment thumbnail URL
          type: string
        title:
          description: Key moment title
          type: string
      type: object
    ResponseFc5Af1Fcba22_FeaturedVideoChannel:
      properties:
        id:
          description: Channel ID
          type: string
        link:
          description: Link to the channel
          type: string
        title:
          description: Channel name
          type: string
      type: object
    ResponseFc5Af1Fcba22_PostChannel:
      properties:
        id:
          description: Channel ID
          type: string
        is_verified:
          description: Whether the channel is verified
          type: boolean
        link:
          description: Link to the channel
          type: string
        thumbnail:
          description: Channel thumbnail URL
          type: string
        title:
          description: Channel name
          type: string
      type: object
    ResponseFc5Af1Fcba22_SectionChannel:
      properties:
        id:
          description: Channel ID
          type: string
        link:
          description: Link to the channel
          type: string
        title:
          description: Channel name
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.