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

# Fetch a video's full details and transcript from its YouTube link



## OpenAPI

````yaml /openapi.json post /youtube/get-video
openapi: 3.1.0
info:
  title: Bridgly API
  description: >-
    Web scraping API for LinkedIn, X (Twitter) and Reddit. Authenticated
    endpoints accept a Bridgly API key (`bgly_…`) via `Authorization: Bearer
    <token>`.
  version: 1.0.0
servers:
  - url: https://api.bridgly.app
    description: Production
security: []
tags:
  - name: LinkedIn
    description: Scrape LinkedIn profiles, companies, posts, and search.
  - name: Reddit
    description: Scrape Reddit posts, subreddits, users, and search.
  - name: X (Twitter)
    description: Scrape tweets and search X.
  - name: GitHub
    description: >-
      Fetch GitHub profiles, pinned repos, contributions, repositories, stars,
      and projects via GitHub's GraphQL API.
paths:
  /youtube/get-video:
    post:
      tags:
        - YouTube
      summary: Fetch a video's full details and transcript from its YouTube link
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  minLength: 1
                  description: >-
                    The video to fetch. Accepts any YouTube video link — watch,
                    youtu.be, Shorts, embed, or live — or a bare 11-character
                    video ID.
                includeTranscript:
                  default: true
                  description: >-
                    Whether to also fetch the timed transcript in the same call.
                    Defaults to true.
                  type: boolean
                transcriptLanguage:
                  description: >-
                    Preferred transcript language as a BCP-47 code, e.g. "en" or
                    "pt-BR". Defaults to the video's own default caption track.
                  type: string
              required:
                - url
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  timeMs:
                    type: number
                    description: >-
                      Wall-clock time the request took to complete, in
                      milliseconds.
                  creditsCost:
                    type: number
                    description: Number of account credits this request consumed.
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: The 11-character video ID, e.g. "dQw4w9WgXcQ".
                      url:
                        type: string
                        description: Canonical watch URL for the video.
                      title:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Video title.
                      description:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: Full video description, with line breaks preserved.
                      durationSeconds:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: Video length in seconds.
                      viewCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: Lifetime view count.
                      likeCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: Like count, when the uploader has not hidden it.
                      publishedAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: ISO 8601 timestamp of when the video was published.
                      category:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: YouTube category of the video, e.g. "Music".
                      keywords:
                        anyOf:
                          - type: array
                            items:
                              type: string
                          - type: 'null'
                        description: Uploader-supplied tags on the video.
                      thumbnails:
                        anyOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                url:
                                  type: string
                                  description: Direct image URL for this thumbnail size.
                                width:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: Thumbnail width in pixels.
                                height:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: Thumbnail height in pixels.
                              required:
                                - url
                                - width
                                - height
                              additionalProperties: false
                          - type: 'null'
                        description: Available thumbnail sizes, smallest first.
                      channel:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: string
                                description: >-
                                  Channel ID that owns the video, e.g.
                                  "UCuAXFkgsw1L7xaCfnd5JJOw".
                              name:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: Channel display name, e.g. "Rick Astley".
                              url:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: >-
                                  Channel page URL, e.g.
                                  "https://www.youtube.com/@RickAstleyYT".
                              handle:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                                description: >-
                                  Channel handle without the "@", e.g.
                                  "RickAstleyYT".
                            required:
                              - id
                              - name
                              - url
                              - handle
                            additionalProperties: false
                          - type: 'null'
                        description: The channel that published the video.
                      isLive:
                        anyOf:
                          - type: boolean
                          - type: 'null'
                        description: True when the video is a live broadcast.
                      isPrivate:
                        anyOf:
                          - type: boolean
                          - type: 'null'
                        description: True when the video is private.
                      isUnlisted:
                        anyOf:
                          - type: boolean
                          - type: 'null'
                        description: True when the video is unlisted.
                      isFamilySafe:
                        anyOf:
                          - type: boolean
                          - type: 'null'
                        description: True when YouTube marks the video as family safe.
                      captionTracks:
                        anyOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                languageCode:
                                  type: string
                                  description: >-
                                    BCP-47 language code of the track, e.g. "en"
                                    or "pt-BR".
                                languageName:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    Human-readable language name, e.g.
                                    "English".
                                isAutoGenerated:
                                  type: boolean
                                  description: >-
                                    True when the track was auto-generated by
                                    speech recognition rather than authored.
                              required:
                                - languageCode
                                - languageName
                                - isAutoGenerated
                              additionalProperties: false
                          - type: 'null'
                        description: >-
                          Caption tracks available on the video, in any
                          language.
                      transcript:
                        anyOf:
                          - type: object
                            properties:
                              languageCode:
                                type: string
                                description: >-
                                  BCP-47 language code of the returned
                                  transcript, e.g. "en".
                              isAutoGenerated:
                                type: boolean
                                description: >-
                                  True when this transcript came from an
                                  auto-generated track.
                              text:
                                type: string
                                description: >-
                                  The full transcript as a single newline-joined
                                  string.
                              segments:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    startMs:
                                      type: number
                                      description: >-
                                        Offset from the start of the video, in
                                        milliseconds.
                                    durationMs:
                                      anyOf:
                                        - type: number
                                        - type: 'null'
                                      description: >-
                                        How long this line stays on screen, in
                                        milliseconds.
                                    text:
                                      type: string
                                      description: The spoken text for this segment.
                                  required:
                                    - startMs
                                    - durationMs
                                    - text
                                  additionalProperties: false
                                description: Timed transcript lines, in playback order.
                            required:
                              - languageCode
                              - isAutoGenerated
                              - text
                              - segments
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          The timed transcript, when one was requested and the
                          video has captions.
                    required:
                      - id
                      - url
                      - title
                      - description
                      - durationSeconds
                      - viewCount
                      - likeCount
                      - publishedAt
                      - category
                      - keywords
                      - thumbnails
                      - channel
                      - isLive
                      - isPrivate
                      - isUnlisted
                      - isFamilySafe
                      - captionTracks
                      - transcript
                    additionalProperties: false
                required:
                  - timeMs
                  - creditsCost
                  - data
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '402':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: typescript
          label: Bridgly SDK
          source: |-
            import { Bridgly } from 'bridgly';

            const client = new Bridgly({ apiKey: process.env.BRIDGLY_API_KEY });

            const res = await client.youtube.getVideo({
              url: "string",
              includeTranscript: true,
            });
            if (res.type === 'success') console.log(res.data);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Bridgly API key (`bgly_…`). Metered endpoints deduct credits from the
        resolved account.

````