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

# Get Extraction

> Retrieve the current state of an extraction job. Results are paginated with a default limit of 50 segment entities per request (maximum 100). Use limit and offset parameters to paginate through all segment entities.



## OpenAPI

````yaml GET /extract/{job_id}
openapi: 3.0.0
info:
  title: Cloudglue API
  description: API for Cloudglue
  license:
    name: Apache License 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 0.7.13
servers:
  - url: https://api.cloudglue.dev/v1
security:
  - bearerAuth: []
paths:
  /extract/{job_id}:
    get:
      tags:
        - Extract
      summary: Retrieve the current state of an extraction job
      description: >-
        Retrieve the current state of an extraction job. Results are paginated
        with a default limit of 50 segment entities per request (maximum 100).
        Use limit and offset parameters to paginate through all segment
        entities.
      operationId: getExtract
      parameters:
        - name: job_id
          in: path
          required: true
          description: The unique identifier of the extraction job
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of segment entities to return
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
        - name: offset
          in: query
          description: Number of segment entities to skip
          required: false
          schema:
            type: integer
            minimum: 0
        - name: include_thumbnails
          in: query
          description: >-
            When true, include a file-level thumbnail_url in the data object and
            a per-segment thumbnail_url on each segment entity
          required: false
          schema:
            type: boolean
        - name: include_chapters
          in: query
          description: >-
            Include narrative chapters in the response (when segmentation
            strategy is 'narrative')
          required: false
          schema:
            type: boolean
            default: false
        - name: include_shots
          in: query
          description: >-
            Include shot boundaries in the response (when segmentation strategy
            is 'shot-detector')
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successful response with job details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Extract'
        '404':
          description: Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: An unexpected error occurred on the server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Extract:
      required:
        - job_id
        - status
      type: object
      properties:
        job_id:
          type: string
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
            - not_applicable
        url:
          type: string
          description: The URL of the processed video
        created_at:
          type: integer
          description: Unix timestamp in milliseconds when the job was created
        extract_config:
          type: object
          description: Configuration for automatic entity extraction from videos
          properties:
            prompt:
              type: string
              description: >-
                A natural language prompt describing the data to extract.
                Required if no schema is provided.
            schema:
              type: object
              description: >-
                A more rigid structure if you already know the JSON layout you
                want. Required if no prompt is provided.
            enable_video_level_entities:
              type: boolean
              description: >-
                Whether to extract entities at the video level. Mutually
                exclusive with enable_segment_level_entities - only one can be
                true.
            enable_segment_level_entities:
              type: boolean
              description: >-
                Whether to extract entities at the segment level. Mutually
                exclusive with enable_video_level_entities - only one can be
                true.
            enable_transcript_mode:
              type: boolean
              description: >-
                When enabled, extract entities from transcript only (similar to
                YouTube path). Useful for speech-heavy content.
            enable_metadata_mode:
              type: boolean
              description: >-
                When enabled, extract entities from the file's metadata document
                (filename, file details, user metadata, and connector source
                metadata) instead of the media content. File-level entities
                only; flat 1 credit per file; works on metadata-only files
                without ingesting their media. Mutually exclusive with
                enable_transcript_mode.
        segmentation_id:
          type: string
          description: The ID of the segmentation job used for this extraction
        data:
          description: >-
            The structured data extracted from the video based on prompt or
            schema. Only present when status is 'completed'.
          type: object
          properties:
            entities:
              type: object
              description: Entities extracted from the video level
            segment_entities:
              type: array
              description: Array of video entities extracted from individual time segments
              items:
                type: object
                properties:
                  start_time:
                    type: number
                    description: Start time of the segment in seconds
                  end_time:
                    type: number
                    description: End time of the segment in seconds
                  entities:
                    type: object
                    description: Entities extracted from the segment
                  thumbnail_url:
                    type: string
                    format: uri
                    description: URL of the segment thumbnail, when available.
            thumbnail_url:
              type: string
              format: uri
              description: >-
                URL of the file-level thumbnail for the video. Only present when
                include_thumbnails=true.
        total:
          type: integer
          description: >-
            Total number of segment entities available. Only present when status
            is 'completed'.
        limit:
          type: integer
          description: >-
            Maximum number of segment entities returned per request. Only
            present when status is 'completed'.
        offset:
          type: integer
          description: >-
            Number of segment entities skipped. Only present when status is
            'completed'.
        error:
          type: string
          description: Error message if status is 'failed'
        chapters:
          type: array
          description: >-
            Array of narrative chapters (only present when include_chapters=true
            and segmentation strategy is 'narrative')
          items:
            type: object
            properties:
              index:
                type: integer
                minimum: 0
              start_time:
                type: number
                minimum: 0
              end_time:
                type: number
                minimum: 0
              description:
                type: string
            required:
              - index
              - start_time
              - end_time
              - description
        shots:
          type: array
          description: >-
            Array of shot boundaries (only present when include_shots=true and
            segmentation strategy is 'shot-detector')
          items:
            type: object
            properties:
              index:
                type: integer
                minimum: 0
              start_time:
                type: number
                minimum: 0
              end_time:
                type: number
                minimum: 0
            required:
              - index
              - start_time
              - end_time
        total_chapters:
          type: integer
          minimum: 0
          description: >-
            Total number of chapters (only present when include_chapters=true
            and segmentation strategy is 'narrative')
        total_shots:
          type: integer
          minimum: 0
          description: >-
            Total number of shots (only present when include_shots=true and
            segmentation strategy is 'shot-detector')
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````