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

# Get Results

> Get batch execution results once a batch reaches COMPLETED status. Receive the raw output or data to download depending on flag selection.



## OpenAPI

````yaml openapi-v0.1.json get /v0.1/batches/{id}/results
openapi: 3.0.0
info:
  title: API Documentation
  description: API description
  version: '0.1'
  contact: {}
servers:
  - url: https://api.promptloop.com/
    description: Production API v0.1
security: []
tags: []
paths:
  /v0.1/batches/{id}/results:
    get:
      tags:
        - Batches
      summary: Get Results
      description: >-
        Get batch execution results once a batch reaches COMPLETED status.
        Receive the raw output or data to download depending on flag selection.
      operationId: BatchesController_getBatchResultsV01
      parameters:
        - name: id
          required: true
          in: path
          description: Batch ID to retrieve results from
          schema:
            type: string
        - name: output_type
          required: false
          in: query
          description: Output type (raw, stream, webhook) - default raw
          schema:
            enum:
              - raw
              - stream
              - webhook
            type: string
        - name: webhook_url
          required: false
          in: query
          description: >-
            Webhook URL to send data to (if output_type "webhook" is selected.
            If not set and webhook is selected, it will default to the existing
            webhook associated with the batch if one exists.
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved batch results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetResultResponseDtoV01'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - x-api-key: []
components:
  schemas:
    GetResultResponseDtoV01:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: success
        data:
          $ref: '#/components/schemas/RawBatchResultDtoV01'
        message:
          type: string
        error:
          $ref: '#/components/schemas/ErrorDetailsDto'
        file:
          $ref: '#/components/schemas/StreamBatchResultDto'
      required:
        - status
        - data
        - message
    ErrorResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: error
        data:
          type: object
        message:
          type: string
        error:
          $ref: '#/components/schemas/ErrorDetailsDto'
      required:
        - status
        - data
        - message
    RawBatchResultDtoV01:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RawBatchResultItemDtoV01'
      required:
        - data
    ErrorDetailsDto:
      type: object
      properties:
        code:
          type: number
        details:
          type: string
      required:
        - code
        - details
    StreamBatchResultDto:
      type: object
      properties:
        file:
          type: string
          format: binary
      required:
        - file
    RawBatchResultItemDtoV01:
      type: object
      properties:
        row_id:
          type: string
          example: a427201b-2340-4f06-ad68-2da8e0fdb120
          description: Unique identifier for the row
        user_provided_data_uuid:
          type: string
          example: '51'
          description: User provided identifier
        input_array:
          example:
            - Acmeco.com
          description: Array of strings passed in as inputs for the task
          type: array
          items:
            type: string
        row_data_json:
          type: object
          additionalProperties:
            type: string
          example:
            website: http://www.acmeco.com
            site description: Acme Co is...
            contact email: hello@acmeco.com
            pricing page link: Not Found
          description: JSON object containing the row data key-value pairs
        row_list_data_json:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
          example:
            - name: Product A
              price: $99
              description: Description for product A
            - name: Product B
              price: $149
              description: Description for product B
            - name: Product C
              price: $199
              description: Description for product C
          description: >-
            Array of objects where each object represents a row with consistent
            column keys
        confidence_interval:
          type: number
          example: 8
          description: Confidence score of the results
        links_crawled:
          type: array
          items:
            type: string
          example:
            - http://www.acmeco.com
            - http://www.acmeco.com/about
          description: List of URLs that were crawled
        list:
          type: boolean
          example: false
          description: >-
            Indicates if this is a list operation and whether the data is in the
            row_data_json or row_list_data_json field
        list_entity_count:
          type: number
          example: 0
          description: Number of entities counted by Promptloop models prior to extraction.
        error:
          type: boolean
          example: true
          description: Indicates if an error occurred
      required:
        - row_id
        - user_provided_data_uuid
        - input_array
        - row_data_json
        - row_list_data_json
        - confidence_interval
        - links_crawled
        - list
        - list_entity_count
        - error
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````