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

# Search YouTube for videos, channels, and playlists



## OpenAPI

````yaml /openapi.json get /v1/youtube/search
openapi: 3.1.0
info:
  title: urltodata.ai
  description: >-
    API for extracting transcripts, metadata, and structured data from YouTube,
    TikTok, Instagram, X (Twitter), Facebook, and the web.
  version: 0.1.0
servers:
  - url: https://api.urltodata.ai
    description: Production API
security:
  - bearerAuth: []
paths:
  /v1/youtube/search:
    get:
      summary: Search YouTube for videos, channels, and playlists
      operationId: searchYoutube
      parameters:
        - name: query
          in: query
          required: true
          description: Search query
          schema:
            type: string
        - name: type
          in: query
          description: Filter by type
          schema:
            type: string
            enum:
              - all
              - video
              - channel
              - playlist
        - name: uploadDate
          in: query
          description: Filter by upload date
          schema:
            type: string
            enum:
              - all
              - hour
              - today
              - week
              - month
              - year
        - name: duration
          in: query
          description: Filter by duration
          schema:
            type: string
            enum:
              - all
              - short
              - medium
              - long
        - name: sortBy
          in: query
          description: Sort results
          schema:
            type: string
            enum:
              - relevance
              - rating
              - date
              - views
        - name: limit
          in: query
          description: Max results
          schema:
            type: integer
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YoutubeSearchResponse'
components:
  schemas:
    YoutubeSearchResponse:
      type: object
      properties:
        query:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/YoutubeSearchResult'
        totalResults:
          type: integer
    YoutubeSearchResult:
      type: object
      properties:
        type:
          type: string
          enum:
            - video
            - channel
            - playlist
        id:
          type: string
        title:
          type: string
        description:
          type: string
        thumbnail:
          type:
            - string
            - 'null'
        duration:
          type: integer
        viewCount:
          type: integer
        uploadDate:
          type: string
        channel:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
        handle:
          type: string
        videoCount:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-default: your-api-key
      description: API key as Bearer token (e.g. Bearer mp_abc123_secret)

````