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

# Youtube Endpoint



## OpenAPI

````yaml https://api.notte.cc/openapi.json post /data/youtube/extract
openapi: 3.1.0
info:
  title: Notte API
  description: >-
    Notte API is a REST API that allows you to interact with Notte. It is used
    to create cloud browser sessions, scrape webpages, and run web ai agents to
    act on your behalf on the internet.
  version: 1.9.8
  x-logo:
    url: https://www.notte.cc/images/logo/logo-white.png
servers: []
security: []
tags:
  - name: agents
    description: Web AI agents (start, stop, status, replay, etc.)
  - name: sessions
    description: Session management (start, stop, status, etc.)
  - name: debug
    description: Session debugging tools (replay,logs, recording, etc.)
  - name: page
    description: Page operations withing a session (observe, step, scrape, etc.)
  - name: storage
    description: File storage interface (upload, download, list, etc.)
  - name: network
    description: Network requests/responses withing a session (intercept, etc.)
  - name: vaults
    description: >-
      Vault & Credentials management (create/delete vaults, create/delete
      credentials, etc.)
  - name: personas
    description: Persona management (create, delete, list emails, list sms, etc.)
  - name: scrape
    description: >-
      Webpage scraping (scrape, screenshot, etc.) with automatic session
      management.
  - name: health
    description: Health check endpoint.
  - name: usage
    description: Usage logs (usage, logs, etc.)
  - name: audit
    description: Audit trail of account and workspace changes.
  - name: functions
    description: Functions management (create, delete, list, etc.)
paths:
  /data/youtube/extract:
    post:
      tags:
        - Data APIs
        - Data YouTube
      summary: Youtube Endpoint
      operationId: youtube_endpoint
      parameters:
        - name: x-notte-request-origin
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Notte-Request-Origin
        - name: x-notte-sdk-version
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Notte-Sdk-Version
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/YouTubeExtractRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YouTubeResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
      x-codeSamples:
        - lang: Python
          source: |-
            import os

            import requests

            response = requests.post(
                "https://api.notte.cc/data/youtube/extract",
                headers={"Authorization": f"Bearer {os.environ['NOTTE_API_KEY']}"},
                json={"url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"},
                timeout=330,
            )
            response.raise_for_status()
            print(response.json())
          label: python
        - lang: TypeScript
          source: >-
            const response = await
            fetch("https://api.notte.cc/data/youtube/extract", {
              method: "POST",
              headers: {
                Authorization: `Bearer ${process.env.NOTTE_API_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
              }),
              signal: AbortSignal.timeout(330_000),
            });

            if (!response.ok) throw new Error(await response.text());

            console.log(await response.json());
          label: node
        - lang: Curl
          source: >-
            curl --fail-with-body --max-time 330 --request POST
            https://api.notte.cc/data/youtube/extract \
              --header "Authorization: Bearer $NOTTE_API_KEY" \
              --header 'Content-Type: application/json' \
              --data '{
              "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw"
            }'
          label: curl
components:
  schemas:
    YouTubeExtractRequest:
      properties:
        includeImages:
          type: boolean
          title: Includeimages
          default: false
        url:
          type: string
          maxLength: 2048
          minLength: 1
          title: Url
      additionalProperties: false
      type: object
      required:
        - url
      title: YouTubeExtractRequest
    YouTubeResult:
      properties:
        markdown:
          type: string
          title: Markdown
        metadata:
          $ref: '#/components/schemas/YouTubeMetadata'
        captions_status:
          type: string
          enum:
            - available
            - unavailable
            - disabled
            - not_applicable
          title: Captions Status
        captions_language:
          anyOf:
            - type: string
            - type: 'null'
          title: Captions Language
        captions_automatic:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Captions Automatic
        captions:
          items:
            $ref: '#/components/schemas/YouTubeCaption'
          type: array
          title: Captions
        videos:
          items:
            $ref: '#/components/schemas/YouTubeVideo'
          type: array
          title: Videos
      additionalProperties: false
      type: object
      required:
        - markdown
        - metadata
        - captions_status
      title: YouTubeResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    YouTubeMetadata:
      properties:
        kind:
          type: string
          enum:
            - video
            - channel
          title: Kind
        url:
          type: string
          title: Url
        title:
          type: string
          title: Title
        video_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Id
        channel:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel
        channel_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel Url
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Seconds
        views:
          anyOf:
            - type: string
            - type: 'null'
          title: Views
        subscribers:
          anyOf:
            - type: string
            - type: 'null'
          title: Subscribers
        video_count:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Count
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
        published:
          anyOf:
            - type: string
            - type: 'null'
          title: Published
      additionalProperties: false
      type: object
      required:
        - kind
        - url
        - title
      title: YouTubeMetadata
    YouTubeCaption:
      properties:
        start:
          type: number
          minimum: 0
          title: Start
        duration:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Duration
        text:
          type: string
          title: Text
      additionalProperties: false
      type: object
      required:
        - start
        - text
      title: YouTubeCaption
    YouTubeVideo:
      properties:
        id:
          type: string
          title: Id
        url:
          type: string
          title: Url
        title:
          type: string
          title: Title
        duration:
          anyOf:
            - type: string
            - type: 'null'
          title: Duration
        views:
          anyOf:
            - type: string
            - type: 'null'
          title: Views
        published:
          anyOf:
            - type: string
            - type: 'null'
          title: Published
      additionalProperties: false
      type: object
      required:
        - id
        - url
        - title
      title: YouTubeVideo
    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
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: token

````

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