> ## 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.

# Batch Fetch Video Entities

> List all extracted entities for files in a collection. This API is only available when a collection is created with collection_type 'entities'

For details on how to create a video collection, see [Create Collection](/api-reference/endpoint/collections/post)


## OpenAPI

````yaml GET /collections/{collection_id}/entities
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.10
servers:
  - url: https://api.cloudglue.dev/v1
security:
  - bearerAuth: []
paths:
  /collections/{collection_id}/entities:
    get:
      tags:
        - Collections
      summary: List all extracted entities for files in a collection
      description: >-
        List all extracted entities for files in a collection. This API is only
        available when a collection is created with collection_type 'entities'
      operationId: listCollectionEntities
      parameters:
        - name: collection_id
          in: path
          required: true
          description: The ID of the collection
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of files to return
          required: false
          schema:
            type: integer
            maximum: 100
        - name: offset
          in: query
          description: Number of files to skip
          required: false
          schema:
            type: integer
        - name: order
          in: query
          description: Order the files by a specific field
          required: false
          schema:
            type: string
            enum:
              - added_at
              - filename
        - name: sort
          in: query
          description: Sort the files in ascending or descending order
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: added_before
          in: query
          description: >-
            Filter files added before a specific date (YYYY-MM-DD format), in
            UTC timezone
          required: false
          schema:
            type: string
            format: date
        - name: added_after
          in: query
          description: >-
            Filter files added after a specific date (YYYY-MM-DD format), in UTC
            timezone
          required: false
          schema:
            type: string
            format: date
      responses:
        '200':
          description: A list of file entities in the collection
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEntitiesList'
        '400':
          description: Collection type is not 'entities'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Collection 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:
    CollectionEntitiesList:
      type: object
      properties:
        object:
          type: string
          enum:
            - list
          description: Object type, always 'list'
        data:
          type: array
          items:
            type: object
            properties:
              file_id:
                type: string
                description: ID of the file
              data:
                type: object
                properties:
                  entities:
                    type: object
                    description: Entities extracted from the file at 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
                required:
                  - entities
            required:
              - file_id
              - data
          description: Array of file entities
        total:
          type: integer
          description: Total number of files with entities matching the query
        limit:
          type: integer
          description: Number of items returned in this response
        offset:
          type: integer
          description: Offset from the start of the list
      required:
        - object
        - data
        - total
        - limit
        - offset
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````