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

> Get a Deep Research task by ID.

# Get Deep Research Task

## Overview

This endpoint returns a Deep Research task's status, progress, and — once the task is `done` — the report.

## Example request

```bash theme={null}
export EXTRUCT_API_TOKEN="YOUR_API_TOKEN"

curl "https://api.extruct.ai/v1/deep_research_tasks/<task_id>" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}"
```

Poll every 10–15 seconds until `status` is `done` or `failed`. Tasks typically take minutes; deeper tasks take longer.

## Reading the response

* `status`: `created` → `in_progress` → `done` or `failed`.
* Progress counters while running: `iterations` (analysis steps), `agents` (research agents completed — this is what is billed), `sources` (unique sources collected).
* `report` is `null` until `done`, then one of two shapes tagged by `kind`:
  * `"kind": "markdown"` — a markdown report whose bracketed citations like `[1]` resolve against the `sources` registry (id → URL).
  * `"kind": "schema"` — `fields` conforming to your `output_schema`. A `done` schema report always validates against your schema. Provenance, where your schema opts in with an Evidenced wrapper, is co-located inside `fields` (`value` + `sources` + `reasoning`), so there is nothing separate to reconcile.
* `report.degradation_reasons`: plain-language notes when something reduced coverage (research stopped at its budget or step limit, or some research agents failed). Empty for a clean run. **Show these to your users alongside the report.**
* `failure_reason` (when `status` is `failed`): why the task failed — a rejected brief includes suggestions for fixing it. Failed tasks refund all their charges.

## Common errors

### `401 Unauthorized`

Check that your header is `Authorization: Bearer ${EXTRUCT_API_TOKEN}`.

### `403 Forbidden`

The task belongs to another user outside your organization.

### `404 Not Found`

No task with this ID exists.

## Related endpoints

* [Create Task Endpoint](/api-reference/deep-research/create-deep-research-task)
* [List Tasks Endpoint](/api-reference/deep-research/list-deep-research-tasks)

## Related guides

* [Deep Research](/api-guides/research/deep-research)


## OpenAPI

````yaml get /v1/deep_research_tasks/{task_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /v1/deep_research_tasks/{task_id}:
    get:
      tags:
        - deep-research
      summary: Get Deep Research Task
      description: Get a Deep Research task, including the report once status is done.
      operationId: get_deep_research_task_v1_deep_research_tasks__task_id__get
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeepResearchTaskOutput'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    DeepResearchTaskOutput:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        status:
          type: string
          enum:
            - created
            - in_progress
            - done
            - failed
          title: Status
          description: 'Task lifecycle: created -> in_progress -> done or failed.'
        brief:
          type: string
          title: Brief
        depth:
          type: string
          enum:
            - medium
            - high
            - xhigh
          title: Depth
        output_schema:
          anyOf:
            - type: object
            - type: 'null'
          title: Output Schema
        failure_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Reason
          description: >-
            Why the task failed, when status is failed: a rejected brief (with
            suggestions for fixing it), insufficient credits mid-run, or an
            internal error. Failed tasks refund their charges.
        iterations:
          type: integer
          title: Iterations
          description: Research analysis steps completed so far.
        agents:
          type: integer
          title: Agents
          description: Research agents completed so far; billing is two credits per agent.
        sources:
          type: integer
          title: Sources
          description: Unique sources collected across all research agents.
        report:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/DeepResearchMarkdownReport'
                - $ref: '#/components/schemas/DeepResearchSchemaReport'
              discriminator:
                propertyName: kind
                mapping:
                  markdown:
                    $ref: '#/components/schemas/DeepResearchMarkdownReport'
                  schema:
                    $ref: '#/components/schemas/DeepResearchSchemaReport'
            - type: 'null'
          title: Report
          description: >-
            Null until status is done; then a markdown report or, when
            output_schema was provided, a structured schema report.
        owner:
          $ref: '#/components/schemas/OwnerInfo'
      type: object
      required:
        - id
        - created_at
        - updated_at
        - status
        - brief
        - depth
        - iterations
        - agents
        - sources
        - owner
      title: DeepResearchTaskOutput
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DeepResearchMarkdownReport:
      properties:
        kind:
          type: string
          enum:
            - markdown
          title: Kind
          default: markdown
        markdown:
          type: string
          title: Markdown
          description: >-
            Markdown report. Bracketed numbers like [1] cite entries in
            `sources` by id.
        sources:
          items:
            $ref: '#/components/schemas/DeepResearchSource'
          type: array
          title: Sources
          description: Source registry (id -> url) that report citations resolve against.
        degradation_reasons:
          items:
            type: string
          type: array
          title: Degradation Reasons
          description: >-
            Plain-language notes when the report was produced under degraded
            conditions (early finalization, failed research agents). Empty for a
            clean run. Show these to the user alongside the report.
          default: []
      type: object
      required:
        - markdown
        - sources
      title: DeepResearchMarkdownReport
      description: Markdown report payload, returned when no output_schema was provided.
    DeepResearchSchemaReport:
      properties:
        kind:
          type: string
          enum:
            - schema
          title: Kind
          default: schema
        fields:
          type: object
          title: Fields
          description: >-
            Structured report values conforming to the task output_schema.
            Provenance, where the schema opts in, is co-located inside `fields`
            as Evidenced wrappers (an object with `value`, a `sources` array of
            URLs, and a `reasoning` string).
        degradation_reasons:
          items:
            type: string
          type: array
          title: Degradation Reasons
          description: >-
            Plain-language notes when the report was produced under degraded
            conditions (early finalization, failed research agents). Empty for a
            clean run. Show these to the user alongside the report.
          default: []
      type: object
      required:
        - fields
      title: DeepResearchSchemaReport
      description: Structured report payload, returned when output_schema was provided.
    OwnerInfo:
      properties:
        id:
          type: string
          title: Id
        email:
          type: string
          title: Email
      type: object
      required:
        - id
        - email
      title: OwnerInfo
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    DeepResearchSource:
      properties:
        id:
          type: integer
          title: Id
        url:
          type: string
          title: Url
      type: object
      required:
        - id
        - url
      title: DeepResearchSource
      description: A source available to the report by numeric id.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````