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

> Request additional results for a Deep Search task.

# Resume Discovery Task

## Overview

This endpoint requests additional results for an existing Deep Search task.
If the task is already exhausted, the request fails with `400 Bad Request`.

## Example request

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

curl -X POST "https://api.extruct.ai/v1/discovery_tasks/${TASK_ID}/resume" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}" \
  -d '{"desired_new_results": 25}'
```

## Key parameters

* `task_id` (required): Task identifier.
* `desired_new_results` (optional): additional result count; default `25`, min `0`, max `250`.

Resume requests are still constrained by the task-level 250-result cap.

If `is_exhausted=true`, this request returns `400 Bad Request`. That means the task has no more candidates to return.

## Success signal

A successful response returns updated task state. Track progress via task status and results endpoints.

## Common errors

### `401 Unauthorized`

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

### `404 Not Found`

The task ID is invalid or unavailable in your workspace.

### `422 Unprocessable Entity`

Most often caused by invalid JSON or `desired_new_results` outside `0..250`.

### `400 Bad Request`

Returned when the task is already exhausted and cannot be resumed for more results.

## Related endpoints

* [Get Task Endpoint](/api-reference/discover/get-company-discovery-task)
* [Get Task Results Endpoint](/api-reference/discover/get-company-discovery-task-results)

## Related guides

* [Deep Search](/api-guides/search/deep-search)


## OpenAPI

````yaml post /v1/discovery_tasks/{task_id}/resume
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /v1/discovery_tasks/{task_id}/resume:
    post:
      tags:
        - company-discovery
      summary: Resume Discovery Task
      operationId: resume_discovery_task_v1_discovery_tasks__task_id__resume_post
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResumeDiscoveryTaskInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoveryTaskOutput'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ResumeDiscoveryTaskInput:
      properties:
        desired_new_results:
          type: integer
          maximum: 250
          minimum: 0
          title: Desired New Results
          description: >-
            Additional results requested for an existing task. Limited by the
            250-result task cap.
          default: 25
      type: object
      title: ResumeDiscoveryTaskInput
    DiscoveryTaskOutput:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        status:
          $ref: '#/components/schemas/Status'
        query:
          type: string
          title: Query
        desired_num_results:
          type: integer
          title: Desired Num Results
        is_exhausted:
          type: boolean
          title: Is Exhausted
          default: false
        num_results_discovered:
          type: integer
          title: Num Results Discovered
          description: Total number of company candidates discovered from search
          default: 0
        num_results_enriched:
          type: integer
          title: Num Results Enriched
          description: Number of candidates enriched with company profiles
          default: 0
        num_results_evaluated:
          type: integer
          title: Num Results Evaluated
          description: Number of candidates that had criteria evaluation completed
          default: 0
        num_results:
          type: integer
          title: Num Results
          description: Total number of results
          default: 0
        table_id:
          anyOf:
            - type: string
            - type: 'null'
        auto_data_sources:
          type: boolean
          title: Auto Data Sources
          default: true
        data_sources:
          anyOf:
            - items:
                $ref: '#/components/schemas/DiscoveryDataSource'
              type: array
            - type: 'null'
        criteria:
          anyOf:
            - items:
                $ref: '#/components/schemas/CriterionDefinition'
              type: array
            - type: 'null'
        exclude_domains:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Domains
          description: >-
            The resolved, sorted list of registered domains that were excluded
            from this run (union of `exclude_domains` and the visible results of
            `exclude_task_ids` at creation time). Capped at 1000.
      type: object
      required:
        - id
        - created_at
        - status
        - query
        - desired_num_results
      title: DiscoveryTaskOutput
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Status:
      type: string
      enum:
        - created
        - in_progress
        - done
        - failed
      title: Status
    DiscoveryDataSource:
      type: string
      enum:
        - web_search
        - linkedin
        - maps
      title: DiscoveryDataSource
    CriterionDefinition:
      properties:
        key:
          type: string
          pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
          title: Key
          description: Unique identifier for this criterion (e.g., "is_ai_company")
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
          description: Human-readable name for this criterion (e.g., "AI Company")
        criterion:
          type: string
          maxLength: 500
          minLength: 10
          title: Criterion
          description: The actual criterion text to evaluate against companies
      type: object
      required:
        - key
        - name
        - criterion
      title: CriterionDefinition
      description: Definition of a criterion for evaluating companies in discovery tasks
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````