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

# Get results

> Get results for a finished task query job.

## Overview

Retrieve a finished task query job one page at a time. Check the job's status
before requesting results and download all pages before `expires_at`.

## Examples

Set `UNIFY_API_KEY` to your API key.

> [accordion] Read a page of tasks
>
> Replace the example job ID with your finished query job:
>
> ```bash theme={null}
> curl --request GET \
>   --url "https://api.unifygtm.com/tasks/v1/tasks/query-jobs/e5a1aab2-3d0c-4a47-9a0d-11a7ac6d3a34/results?page=1&page_size=1000" \
>   --header "X-Api-Key: $UNIFY_API_KEY"
> ```
>
> The JSON response contains `data`, `total`, `page`, and `page_size`. Increment
> `page` until you've retrieved all `total` rows. JSON pages support up to 2,000
> rows. If a page exceeds the payload limit, request fewer rows or use NDJSON.

> [accordion] Stream a larger page
>
> Add `Accept: application/x-ndjson` to receive one task per line. NDJSON supports
> up to 10,000 rows per page and returns pagination metadata in the `x-total`,
> `x-page`, and `x-page-size` response headers.
>
> ```bash theme={null}
> curl --no-buffer \
>   --url "https://api.unifygtm.com/tasks/v1/tasks/query-jobs/e5a1aab2-3d0c-4a47-9a0d-11a7ac6d3a34/results?page=1&page_size=10000" \
>   --header "X-Api-Key: $UNIFY_API_KEY" \
>   --header "Accept: application/x-ndjson"
> ```
>
> A `409` response means the job has no available results. Inspect the job status
> to distinguish an in-progress job from a failed or canceled job. A `410`
> response means the results expired and you need to create a new job.


## OpenAPI

````yaml GET /tasks/v1/tasks/query-jobs/{job_id}/results
openapi: 3.1.0
info:
  title: Unify Tasks API
  summary: List and manage tasks within the Unify platform.
  version: '1'
  termsOfService: https://www.unifygtm.com/legal/terms-and-conditions
  contact:
    name: Unify Support
    url: https://www.unifygtm.com/support
    email: support@unifygtm.com
servers:
  - url: https://api.unifygtm.com
    variables: {}
security:
  - ApiKeyAuth: []
tags:
  - name: Tasks
paths:
  /tasks/v1/tasks/query-jobs/{job_id}/results:
    get:
      tags:
        - Tasks
      description: |-
        Get query job results. By default this returns JSON. Send
        `Accept: application/x-ndjson` to stream newline-delimited JSON.
      operationId: get_task_query_job_results
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
          explode: false
        - name: page_size
          in: query
          required: false
          description: |-
            Maximum is 2,000 for JSON responses and 10,000 when `Accept` is
            `application/x-ndjson`.
          schema:
            type: integer
            minimum: 1
            maximum: 10000
          explode: false
      responses:
        '200':
          description: >-
            Successful response returned when fetching completed query job
            results.
          headers:
            x-total:
              required: false
              description: Total result count. Present for NDJSON responses.
              schema:
                type: integer
            x-page:
              required: false
              description: Result page number. Present for NDJSON responses.
              schema:
                type: integer
            x-page-size:
              required: false
              description: Result page size. Present for NDJSON responses.
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                required:
                  - total
                  - page
                  - page_size
                  - data
                properties:
                  total:
                    type: integer
                  page:
                    type: integer
                  page_size:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TaskQueryJobResult'
                description: >-
                  Successful response returned when fetching completed query job
                  results.
            application/x-ndjson:
              schema:
                type: string
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                properties:
                  status:
                    type: string
                    enum:
                      - bad_request
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: >-
                  Response for any operation that results in a bad request
                  error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - unauthorized
                  message:
                    type: string
                description: >-
                  Response for any operation that results in an unauthorized
                  error.
        '404':
          description: Response returned when a query job cannot be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBulkApiJobNotFoundResponse'
        '409':
          description: Response returned when query job results are not ready yet.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GetBulkApiJobResultsNotReadyResponse'
                  - $ref: '#/components/schemas/GetBulkApiJobResultsFailedResponse'
                  - $ref: '#/components/schemas/GetBulkApiJobResultsCanceledResponse'
        '410':
          description: Response returned when query job results have expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBulkApiJobResultsExpiredResponse'
        '413':
          description: >-
            Response returned when a requested query job results page is too
            large.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetBulkApiJobResultsPayloadTooLargeResponse
        '429':
          description: Response for any operation that exceeds a rate limit.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - rate_limited
                  message:
                    type: string
                description: Response for any operation that exceeds a rate limit.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                description: >-
                  Response for any operation that results in an internal server
                  error.
components:
  schemas:
    TaskQueryJobResult:
      type: object
      required:
        - note_content
        - updated_at
      properties:
        note_content:
          anyOf:
            - type: string
            - type: 'null'
        updated_at:
          type: string
          format: date-time
      allOf:
        - type: object
          required:
            - id
            - type
            - status
            - priority
            - person_id
            - assigned_user_id
            - due_at
            - ended_at
            - created_at
          properties:
            id:
              $ref: '#/components/schemas/uuid'
            type:
              $ref: '#/components/schemas/TaskType'
            status:
              $ref: '#/components/schemas/TaskStatus'
            priority:
              $ref: '#/components/schemas/TaskPriority'
            person_id:
              $ref: '#/components/schemas/uuid'
            assigned_user_id:
              anyOf:
                - $ref: '#/components/schemas/uuid'
                - type: 'null'
            due_at:
              anyOf:
                - type: string
                  format: date-time
                - type: 'null'
            ended_at:
              anyOf:
                - type: string
                  format: date-time
                - type: 'null'
            created_at:
              type: string
              format: date-time
          description: The template for omitting properties.
      description: A task returned by task query jobs.
    UResponses.BadRequestError:
      type: object
      required:
        - code
      properties:
        code:
          type: string
        path:
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        object_api_name:
          type: string
        attribute_api_name:
          type: string
      allOf:
        - type: object
          unevaluatedProperties: {}
      description: Validation error detail returned for bad request responses.
    GetBulkApiJobNotFoundResponse:
      type: object
      allOf:
        - type: object
          required:
            - status
            - message
          properties:
            status:
              type: string
              enum:
                - not_found
            message:
              type: string
          description: Response for any operation that results in a not found error.
      description: Response returned when a query job cannot be found.
    GetBulkApiJobResultsNotReadyResponse:
      type: object
      allOf:
        - type: object
          required:
            - status
            - message
          properties:
            status:
              type: string
              enum:
                - results_not_ready
            message:
              type: string
          description: Response for any operation that results in a conflict error.
      description: Response returned when query job results are not ready yet.
    GetBulkApiJobResultsFailedResponse:
      type: object
      allOf:
        - type: object
          required:
            - status
            - message
          properties:
            status:
              type: string
              enum:
                - results_failed
            message:
              type: string
          description: Response for any operation that results in a conflict error.
      description: Response returned when a query job failed and has no results.
    GetBulkApiJobResultsCanceledResponse:
      type: object
      allOf:
        - type: object
          required:
            - status
            - message
          properties:
            status:
              type: string
              enum:
                - results_canceled
            message:
              type: string
          description: Response for any operation that results in a conflict error.
      description: Response returned when a query job was canceled and has no results.
    GetBulkApiJobResultsExpiredResponse:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - results_expired
        message:
          type: string
      description: Response returned when query job results have expired.
    GetBulkApiJobResultsPayloadTooLargeResponse:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - results_page_too_large
        message:
          type: string
      description: Response returned when a requested query job results page is too large.
    uuid:
      type: string
      format: uuid
    TaskType:
      type: string
      enum:
        - EMAIL
        - ACTION_ITEM
        - PHONE_CALL
        - LINKEDIN_SEND_MESSAGE
        - LINKEDIN_SEND_CONNECTION_REQUEST
        - LINKEDIN_VIEW_PROFILE
        - REPLY_TO_EMAIL
    TaskStatus:
      type: string
      enum:
        - NOT_READY
        - READY
        - COMPLETED
        - SKIPPED
        - CANCELED
    TaskPriority:
      type: string
      enum:
        - LOW
        - MEDIUM
        - HIGH
        - URGENT
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.