build_dataset
/build_datasetLegacy. 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
promptstringNatural-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 stringColumn 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.
qualifiersarray of stringFilters or constraints on the list (max 10). Used with identifiers and/or prompt.
attributesarray of stringAdditional columns to include in the output (max 20). Used with identifiers and/or prompt.
max_itemsintegerMaximum number of rows to generate
budgetnumberMost 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.
dataset_webhook_urlstring uriURL 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_enrichmentbooleanAutomatically 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.
auto_run_enrichment_webhook_urlstring uriWebhook URL for the auto-run enrichment (requires auto_run_enrichment). Same body-only guidance applies.
Responses
200List build started
request_statusstringrequiredmessagestringrequiredrun_keystringrequiredUnique identifier for this list build (use with /dataset_build_status and /dataset_build_data)
max_itemsintegerapp_urlstring uriauto_run_enrichment_run_keystringReturned 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_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, 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.
401Unauthorized - invalid or missing API key
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, 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.
403Forbidden - API access not enabled for account
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, 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.
422Unprocessable entity - validation failed
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, 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.