Skip to main content
GET
/
v1
/
discovery_tasks
/
{task_id}
Get Discovery Task
curl --request GET \
  --url https://api.extruct.ai/v1/discovery_tasks/{task_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "status": "created",
  "query": "<string>",
  "desired_num_results": 123,
  "is_exhausted": false,
  "num_results_discovered": 0,
  "num_results_enriched": 0,
  "num_results_evaluated": 0,
  "num_results": 0,
  "table_id": "<string>",
  "auto_data_sources": true,
  "data_sources": [
    "web_search"
  ],
  "criteria": [
    {
      "key": "<string>",
      "name": "<string>",
      "criterion": "<string>"
    }
  ]
}

Overview

This endpoint returns the current state of a Deep Search task. It is the primary status endpoint for polling progress, checking counters, and seeing whether the task is exhausted.

Example request

export EXTRUCT_API_TOKEN="YOUR_API_TOKEN"
export TASK_ID="YOUR_TASK_ID"

curl --get "https://api.extruct.ai/v1/discovery_tasks/${TASK_ID}" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}"

Key parameters

  • task_id (required): Task identifier returned by create-task.
Track these fields while polling:
  • status
  • is_exhausted
  • num_results_discovered
  • num_results_enriched
  • num_results_evaluated
  • num_results
Interpret them like this:
  • num_results_discovered: candidates gathered from the selected data sources.
  • num_results_enriched: discovered candidates that passed the relevance pre-filter and were enriched with company profiles.
  • num_results_evaluated: enriched candidates that have been fully scored across all criteria.
  • num_results: evaluated candidates currently counted as high-fit, meaning at least 75% of criteria are graded 4 or 5.

Success signal

The task is complete when status=done or is_exhausted=true.

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. Re-check TASK_ID from create-task response.

status=failed

The task did not complete. Inspect returned error details, then retry create-task or use resume if appropriate.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

task_id
string
required

Response

Successful Response

id
string
required
created_at
string<date-time>
required
status
enum<string>
required
Available options:
created,
in_progress,
done,
failed
query
string
required
desired_num_results
integer
required
is_exhausted
boolean
default:false
num_results_discovered
integer
default:0

Total number of company candidates discovered from search

num_results_enriched
integer
default:0

Number of candidates enriched with company profiles

num_results_evaluated
integer
default:0

Number of candidates that had criteria evaluation completed

num_results
integer
default:0

Total number of results

table_id
string | null
auto_data_sources
boolean
default:true
data_sources
enum<string>[] | null
Available options:
web_search,
linkedin,
maps
criteria
CriterionDefinition · object[] | null