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

# Batch Result

> Get the status and results of a YouTube batch job.



## OpenAPI

````yaml v1-openapi GET /youtube/batch/{jobId}
openapi: 3.1.0
info:
  title: Supadata
  description: Web & Social Media Content API for Developers
  version: 1.3.0
servers:
  - url: https://api.supadata.ai/v1
security:
  - apiKeyAuth: []
paths:
  /youtube/batch/{jobId}:
    get:
      description: Get the status and results of a YouTube batch job.
      operationId: getYoutubeBatchByJobId
      parameters:
        - name: jobId
          in: path
          required: true
          schema:
            type: string
          description: The batch job ID
      responses:
        '200':
          description: Successfully retrieved the status and results (if completed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YouTubeBatchResults'
        '400':
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: TypeScript
          label: Node.js
          source: >-
            import { Supadata } from '@supadata/js';


            const supadata = new Supadata({
              apiKey: 'YOUR_API_KEY',
            });


            const batchResults = await
            supadata.youtube.batch.getBatchResults(JOB_ID);

            console.log(batchResults);
        - lang: Python
          label: Python
          source: >-
            from supadata import Supadata, SupadataError


            supadata = Supadata(api_key="YOUR_API_KEY")


            batch_results =
            supadata.youtube.batch.get_batch_results(job_id=JOB_ID)

            print(batch_results)
        - lang: Shell
          label: cURL
          source: |-
            curl -X GET "https://api.supadata.ai/v1/youtube/batch/JOB_ID" \
              -H "x-api-key: YOUR_API_KEY" \
              -H "Content-Type: application/json"
components:
  schemas:
    YouTubeBatchResults:
      type: object
      properties:
        status:
          type: string
          enum:
            - queued
            - active
            - completed
            - failed
          description: Current status of the batch job
          example: completed
        results:
          type: array
          items:
            type: object
            properties:
              videoId:
                type: string
                description: YouTube video ID
                example: dQw4w9WgXcQ
              transcript:
                oneOf:
                  - $ref: '#/components/schemas/Transcript'
                  - type: 'null'
              video:
                oneOf:
                  - $ref: '#/components/schemas/YoutubeVideo'
                  - type: 'null'
              errorCode:
                type:
                  - string
                  - 'null'
                enum:
                  - invalid-request
                  - internal-error
                  - forbidden
                  - unauthorized
                  - upgrade-required
                  - transcript-unavailable
                  - not-found
                  - limit-exceeded
                description: Error code if processing this item failed
                example: not-found
            required:
              - videoId
          description: Array of results for each video in the batch
        stats:
          type: object
          properties:
            total:
              type: number
              description: Total number of items in the batch
              example: 10
            succeeded:
              type: number
              description: Number of items successfully processed
              example: 8
            failed:
              type: number
              description: Number of items that failed processing
              example: 2
          required:
            - total
            - succeeded
            - failed
          description: Statistics about the batch job progress
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the job completed, if status is completed
          example: '2025-04-03T06:59:53.428Z'
      required:
        - status
        - results
        - stats
      description: Response for batch job results
    Error:
      type: object
      properties:
        error:
          type: string
          enum:
            - invalid-request
            - internal-error
            - forbidden
            - unauthorized
            - upgrade-required
            - transcript-unavailable
            - not-found
            - limit-exceeded
          description: Error code identifying the type of error
          example: invalid-request
        message:
          type: string
          description: Human readable error message
          example: Invalid Request
        details:
          type: string
          description: Detailed error description
          example: The request is invalid or malformed
        documentationUrl:
          type: string
          description: URL to error documentation
          example: https://supadata.ai/documentation/errors#invalid-request
      required:
        - error
        - message
        - details
      description: Standard error response format
    Transcript:
      type: object
      properties:
        content:
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/TranscriptChunk'
            - type: string
              description: Plain text transcript when text=true parameter is used
              example: Never gonna give you up, never gonna let you down...
        lang:
          type: string
          description: ISO 639-1 language code of transcript
          example: en
        availableLangs:
          type: array
          items:
            type: string
          description: List of available language codes
          example:
            - en
            - es
            - zh-TW
      required:
        - content
        - lang
        - availableLangs
    YoutubeVideo:
      type: object
      properties:
        id:
          type: string
          description: YouTube video ID
          example: dQw4w9WgXcQ
        title:
          type: string
          description: Video title
          example: Rick Astley - Never Gonna Give You Up (Official Music Video)
        description:
          type: string
          description: Video description
          example: The official music video for "Never Gonna Give You Up"...
        duration:
          type: number
          description: Video duration in seconds
          example: 213
        channel:
          type: object
          properties:
            id:
              type: string
              description: Channel ID
              example: UCuAXFkgsw1L7xaCfnd5JJOw
            name:
              type: string
              description: Channel name
              example: Rick Astley
          required:
            - id
            - name
          description: Channel information
        tags:
          type: array
          items:
            type: string
          description: Video tags
          example:
            - Rick Astley
            - Official Video
            - Music
        thumbnail:
          type: string
          description: URL to video thumbnail
          example: https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg
        uploadDate:
          type:
            - string
            - 'null'
          description: Video upload date
          example: '2009-10-25T00:00:00.000Z'
          format: date-time
        viewCount:
          type:
            - number
            - 'null'
          description: Number of views
          example: 1234567890
        likeCount:
          type:
            - number
            - 'null'
          description: Number of likes
          example: 12345678
        transcriptLanguages:
          type: array
          items:
            type: string
          description: Available transcript language codes
          example:
            - en
            - es
            - fr
      required:
        - id
        - title
        - description
        - duration
        - channel
        - tags
        - transcriptLanguages
    TranscriptChunk:
      type: object
      properties:
        text:
          type: string
          description: Transcript segment
          example: Never gonna give you up...
        offset:
          type: number
          description: Start time in milliseconds
          example: 8150
        duration:
          type: number
          description: Duration in milliseconds
          example: 1200
        lang:
          type: string
          description: ISO 639-1 language code of chunk
          example: en
      required:
        - text
        - offset
        - duration
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````