APILegacy
Legacy API. These endpoints keep working. New integrations should use the current API.
List builder

build_dataset

POST/build_dataset

Legacy. Use POST /datasets with prompt + count for new work. The same build on the resource path, with the field mapping: POST /datasets (list-build body).

Build a list of rows by providing either a natural-language prompt, a structured spec (identifiers, qualifiers, attributes), or both. On an account on Datasets the rows land in a new dataset (dataset_id on the status names it); on an older account, in a legacy enrichment.

Recommended: Pass a dataset_webhook_url to receive results when the build completes — this is more efficient than polling. If you must poll, use /dataset_build_status (suggested interval: 5–10 seconds).

Input options

Prompt only — describe what you want in plain English:

{ "prompt": "Top 50 SaaS companies by revenue", "max_items": 50 }

Structured spec — define the shape explicitly:

{
  "identifiers": ["Company Name"],
  "qualifiers": ["B2B SaaS", "revenue > $10M"],
  "attributes": ["CEO", "Headquarters"],
  "max_items": 50
}

Both — the prompt provides intent while the spec constrains the output.

Request bodyrequired

promptstring

Natural-language description of the list to build. Can be used alone or combined with identifiers/qualifiers/attributes. At least one of prompt or identifiers is required.

identifiersarray of string

Column names that uniquely identify each row (max 3). Can be used alone or combined with prompt. At least one of prompt or identifiers is required.

Max items 3
qualifiersarray of string

Filters or constraints on the list (max 10). Used with identifiers and/or prompt.

Max items 10
attributesarray of string

Additional columns to include in the output (max 20). Used with identifiers and/or prompt.

Max items 10
max_itemsinteger

Maximum number of rows to generate

Default 100Min 1
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
dataset_webhook_urlstring uri

URL to receive a POST when the list build completes.

Always pass URLs containing query strings (e.g. Power Automate / Azure Logic Apps SAS URLs) here in the body — never as a query parameter — so the & characters in the SAS token are preserved.

auto_run_enrichmentboolean

Automatically create and run an enrichment from the list when the build completes. When true, an auto_run_enrichment_run_key is returned immediately in the response that can be used to poll run_status / run_data.

Default false
auto_run_enrichment_webhook_urlstring uri

Webhook URL for the auto-run enrichment (requires auto_run_enrichment). Same body-only guidance applies.

Responses

200List build started
request_statusstringrequired
One of success
messagestringrequired
run_keystringrequired

Unique identifier for this list build (use with /dataset_build_status and /dataset_build_data)

max_itemsinteger
app_urlstring uri
auto_run_enrichment_run_keystring

Returned when auto_run_enrichment is true. Use with /run_status and /run_data to poll the enrichment run.

400Bad request - invalid input or missing required parameters
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
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
403Forbidden - API access not enabled for account
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
422Unprocessable entity - validation failed
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