build_dataset_from_dataset
/build_dataset_from_datasetLegacy. Use POST /datasets/{id}/rows/build for new work. The same build on the resource path: POST /datasets/{id}/extend.
Build a new list seeded from a completed list build (the "source"). The source's rows are passed to the builder as context so it finds new rows only — use this to extend a list with more rows matching the same shape.
For example, if the source list was built with the prompt "Find tech companies in New York", you can extend it with the prompt "Find more companies, but in Seattle" — the agent will see the prior prompt, as well as the new one.
Inheritance rules:
- Identifiers and attributes are always inherited from the source and cannot be overridden
- prompt is optional — when provided it's combined with the source's prompt as an extension instruction; when omitted the source's prompt is reused
- qualifiers are optional — when provided they replace the source's qualifiers; when omitted they are inherited
- max_items is the maximum number of NEW rows to find; defaults to the source's max_items
The new build has its own run_key and lifecycle — the source build is not modified. Results contain only the newly found rows by default; pass include_rows_from_source=true to /dataset_build_data to get the combined set.
Note: Extensions can be chained (extending a build that is itself an extension), but after chaining 5 list builds the agent may lose the original context from the first prompt — beyond that depth, consider starting a fresh build instead, or re-adding information from the initial prompt.
Recommended: Pass dataset_webhook_url to receive results when complete — this is more efficient than polling. If you must poll, use /dataset_build_status (suggested interval: 5–10 seconds).
Query parameters
source_run_keystringrequiredThe run_key of the completed list build to extend
Request body
promptstringExtension instruction combined with the source's prompt (e.g. "also include European companies"). When omitted, the source's prompt is reused as-is.
qualifiersarray of stringReplaces the source's qualifiers when provided (max 10). Inherited from the source when omitted.
max_itemsintegerMaximum number of NEW rows to find. Defaults to the source's max_items.
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.
404Resource not found
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.