APILegacy
Legacy API. These endpoints keep working. New integrations should use the current API.
Retired resource endpoints

POST /datasets (list-build body)

POST/datasetsLegacy

Legacy. The list builder's body on the current API's POST /datasets path. For new work use POST /datasets with prompt + count (rows into a dataset) — the field mapping is below.

The same build as /build_dataset, on the resource path and in the current API's response shape: a run object plus dataset_id and max_items, and legacy saying what to send instead. prompt and / or identifiers + qualifiers with max_items find the rows; attributes (max 20) are saved as output columns and researched only by auto_run_enrichment: true (a second paid run; enrichment_run_id on the response) or a later POST /enrich with the dataset_id the run returns.

Where the rows land: on an account on Datasets, in a new dataset — dataset_id is its ds_... id, identifiers are its input columns, attributes the output columns of its enrichment, name its name; on an older account, in a legacy enrichment.

List-build fieldDataset body (POST /datasets)
max_itemscount
identifiersinput_columns
qualifierspart of prompt
attributesattributes (same name)
auto_run_enrichmentauto_fill
dataset_webhook_urlwebhook_url
auto_run_enrichment_webhook_urlfill_webhook_url

Which body runs. max_items, identifiers, qualifiers, dataset_webhook_url, auto_run_enrichment, or auto_run_enrichment_webhook_url make the request this list build; rows or count make it a dataset (the current API). estimate_cost: true prices the build (the list-gen price on max_items, plus attributes × max_items with auto_run_enrichment); max_credits refuses it above a ceiling.

Request bodyrequired

promptstring

What the rows are. Required unless identifiers are given.

identifiersarray of string

What each row is (e.g. ["Company name", "Website"]). Max 3.

Max items 3
qualifiersarray of string

Constraints each row must satisfy. Max 10.

Max items 10
max_itemsinteger

Max rows to generate (capped by your plan)

budgetnumber

Most credits the build may spend (default 50 + 1.5 per row); charged at kickoff, settled to the agent's spend. A low budget means fewer rows.

Min 10Max 5000
attributesarray of string

Output column names, not filled by the build. Max 20.

Max items 20
namestring

On an account on Datasets, the new dataset's name

Max length 200
dataset_webhook_urlstring uri

URL to POST the build's result to when it completes

auto_run_enrichmentboolean

When the build completes, run an enrichment of the attributes on the rows. A second paid run; its id is enrichment_run_id in the response.

Default false
auto_run_enrichment_webhook_urlstring uri

Webhook for the auto-run enrichment results

Validate and price the request without running or charging anything; the 200 response is the credit estimate.

Default false

Credit ceiling. Refused with 422 credit_cap_exceeded (nothing charged) when the estimate's maximum exceeds it.

Min 0

Responses

200estimate_cost only — the credit estimate; nothing was started
estimate_costbooleanrequired
One of true
typestringrequired
One of dataset_build
credit_detailCurrentCreditDetailrequired

The estimate made at kickoff next to what has been charged so far. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CurrentCreditEstimate model →
    minimumnumberrequired
    maximumnumberrequired
    charged_upfrontbooleanrequired

    true when maximum is taken at kickoff (list builds)

  • null
credits_usednumberrequired
credits_remainingnumber
sufficient_creditsboolean

Carried by every response of a retired resource endpoint and by the current API's paths when a request took a legacy mode. The response also has Deprecation: true and a Link header (rel="successor-version").

Attributes
noticestringrequired

What was legacy about the request and what to send instead

successorstringrequired

METHOD /v1/path of the current operation to use

docsstring urirequired

The successor's section of the current API docs

201List build started — the run plus dataset_id / max_items (and enrichment_run_id when auto-running), with legacy
idstringrequired

The run id (run_...)

typestringrequired
One of dataset_build
statusstringrequired
One of pending enqueued processing success stopped
progressCurrentRunProgressrequired

Completion estimate of a run in the current API's shape (the full shape is RunProgress in the current API docs).

Attributes
percent_completenumbernullable
estimated_seconds_remainingnumbernullable
elapsed_secondsnumbernullable
credits_usednumber
credit_detailCurrentCreditDetailrequired

The estimate made at kickoff next to what has been charged so far. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CurrentCreditEstimate model →
    minimumnumberrequired
    maximumnumberrequired
    charged_upfrontbooleanrequired

    true when maximum is taken at kickoff (list builds)

  • null
credits_usednumberrequired
credits_remainingnumber
sufficient_creditsboolean
app_urlstring uri
result_urlstring urirequired
started_atstring date-timenullable
finished_atstring date-timenullable
errorobjectnullable
Attributes
typestring
messagestring
stopped_reasonstring
One of user_request credit_limit error
webhook_urlstring uri
legacyLegacyNoticerequired

Carried by every response of a retired resource endpoint and by the current API's paths when a request took a legacy mode. The response also has Deprecation: true and a Link header (rel="successor-version").

Attributes
noticestringrequired

What was legacy about the request and what to send instead

successorstringrequired

METHOD /v1/path of the current operation to use

docsstring urirequired

The successor's section of the current API docs

dataset_idstring

On an account on Datasets, the new dataset (ds_...); otherwise the legacy build's id

max_itemsinteger
enrichment_run_idstring

Present when auto_run_enrichment is true

400The request is malformed or names a conflicting parameter combination (current API envelope)
errorobjectrequired
Attributes
typestringrequired

bad_request, not_found, forbidden, feature_not_enabled, insufficient_credits, credit_cap_exceeded, validation, ...

messagestringrequired
detailsany

Optional extra context

credit_detailCurrentCreditDetail

The estimate made at kickoff next to what has been charged so far. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CurrentCreditEstimate model →
    minimumnumberrequired
    maximumnumberrequired
    charged_upfrontbooleanrequired

    true when maximum is taken at kickoff (list builds)

  • null
credits_usednumberrequired
credits_remainingnumber
sufficient_creditsboolean

Carried by every response of a retired resource endpoint and by the current API's paths when a request took a legacy mode. The response also has Deprecation: true and a Link header (rel="successor-version").

Attributes
noticestringrequired

What was legacy about the request and what to send instead

successorstringrequired

METHOD /v1/path of the current operation to use

docsstring urirequired

The successor's section of the current API docs

401Unauthorized - invalid or missing API key
request_statusstringrequired

Status of the request

One of error
messagestringrequired

Human-readable error message

errorsarray of string

List of specific error details

error_typestringrequired

Stable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.

One of bad_request validation not_found gone unauthorized forbidden conflict duplicate_run duplicate_run_key credit_limit insufficient_credits invalid_json invalid_json_structure missing_parameter unprocessable_entity locked plan_not_ready run_already_in_progress discovery_in_progress invalid_variables invalid_output_record_json_schema extraction_plan_creation_not_enabled internal_server_error service_unavailable
403The API key's account may not access this resource or endpoint (current API envelope)
errorobjectrequired
Attributes
typestringrequired

bad_request, not_found, forbidden, feature_not_enabled, insufficient_credits, credit_cap_exceeded, validation, ...

messagestringrequired
detailsany

Optional extra context

credit_detailCurrentCreditDetail

The estimate made at kickoff next to what has been charged so far. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CurrentCreditEstimate model →
    minimumnumberrequired
    maximumnumberrequired
    charged_upfrontbooleanrequired

    true when maximum is taken at kickoff (list builds)

  • null
credits_usednumberrequired
credits_remainingnumber
sufficient_creditsboolean

Carried by every response of a retired resource endpoint and by the current API's paths when a request took a legacy mode. The response also has Deprecation: true and a Link header (rel="successor-version").

Attributes
noticestringrequired

What was legacy about the request and what to send instead

successorstringrequired

METHOD /v1/path of the current operation to use

docsstring urirequired

The successor's section of the current API docs

422The request is valid but can't be executed — insufficient_credits, credit_cap_exceeded when max_credits is set, validation (current API envelope)
errorobjectrequired
Attributes
typestringrequired

bad_request, not_found, forbidden, feature_not_enabled, insufficient_credits, credit_cap_exceeded, validation, ...

messagestringrequired
detailsany

Optional extra context

credit_detailCurrentCreditDetail

The estimate made at kickoff next to what has been charged so far. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CurrentCreditEstimate model →
    minimumnumberrequired
    maximumnumberrequired
    charged_upfrontbooleanrequired

    true when maximum is taken at kickoff (list builds)

  • null
credits_usednumberrequired
credits_remainingnumber
sufficient_creditsboolean

Carried by every response of a retired resource endpoint and by the current API's paths when a request took a legacy mode. The response also has Deprecation: true and a Link header (rel="successor-version").

Attributes
noticestringrequired

What was legacy about the request and what to send instead

successorstringrequired

METHOD /v1/path of the current operation to use

docsstring urirequired

The successor's section of the current API docs