API
Enrich

Create enrichment

POST/enrichments

Create an enrichment without running it: the task prompt the row agent reads for every row, the output columns it fills, and optionally input_columns (the headers rows must carry; empty = any), a budget in credits per row (default 1.5 per output column; it then moves by 1.5 as columns are added or removed until budget_locked is true), and the tools (only_tools replaces the default set, additional_tools adds to it; names from GET /tools). Each output entry is a column name or { "name", "prompt"?, "output_schema"?, "tool"? }; output_schema is a JSON Schema for the cell value (see help → output_schema); without one, the column is typed from the prompts as the one value it is about (email, URL, date, year, count, money, percentage, phone, address, a person's or company's name, ...; only prose stays free text); tool pins a tool to the column — "tool": "linkedin_person_profile", the ColumnToolPin: the agent makes one call of it per row, with arguments it works out from the row and its research, and the call's result is the cell. Output names may not repeat an input column.

From a prompt alone. Leave output out and the recipe is written from the prompt: one output column per fact it asks to find about each row, each with its own prompt and type, plus the name and input_columns when you give none ("Research each company: its CEO, employee count, latest funding round date and amount, and whether it is hiring" → CEO, Employee count, Latest funding round date, Latest funding round amount, Hiring, typed). The response shows what was written; adjust it with PATCH /enrichments/{id}. A prompt that names no facts to find is refused (422): add output.

The enrichment comes with the dataset it fills: an empty dataset bound to it, named after it, whose input columns are input_columns (one Input column when you give none; the first build names it, or rename it with PATCH /datasets/{id}). It is on the Datasets page of the app at once. The response is the enrichment plus dataset_id (its id) and app_url (the dataset in the app).

Then add rows to the dataset — POST /datasets/{id}/rows, rows/import for a CSV, or rows/build to generate them — and fill it with POST /enrich (dataset_id): the rows and cells are kept and the dataset shows them. Or run the enrichment once on rows you send inline (enrichment_id + input), nothing kept. Editing the enrichment through its dataset (the app's Column tab, PATCH /datasets/{id}) rebinds the dataset to a private copy; PATCH /enrichments/{id} edits this enrichment itself.

{ "dataset_id": "ds_..." } alone answers the dataset's own enrichment as { id, name, app_url, dataset_id } (nothing is created; 422 while the dataset has no output columns — PATCH /datasets/{id} adds them).

Request bodyrequired

dataset_idstring

Alone: a dataset's id (ds_...); answers its own enrichment. Not with the fields below.

namestring

Recipe: display name

Max length 200
promptstring

Recipe: the task prompt the row agent reads for every row. Required without dataset_id.

Max length 50000
input_columnsarray of string

Recipe: the headers rows must carry, the dataset's input columns. Omit for any (one Input column), or, without output, for the ones the prompt implies.

Max items 50
outputarray of OutputColumnSpec

Recipe: the columns to fill; a plain string is a name whose type is inferred. Omit it and the columns are written from the prompt, one per fact it asks for, each typed.

Max items 50
Attributes
namestringrequired

The column name; the handle in every later call

Max length 100
promptstring

What to find for this column, one value, on top of the enrichment's task prompt; on a pinned column, what to call the tool on. Leave sources out; the agent records the URLs it cited on the cell's sources.

Max length 5000
output_schemaobject

A JSON Schema for the cell value (help with output_schema). Leave it out: the type is inferred from the prompt, caveats included. Send one only for an enum, a list, or an object. Does not apply to a pinned column.

toolColumnToolPinnullable

A tool name from GET /tools. The row agent makes one call of it per row — arguments it works out from the row, the known values, and its research; the column prompt says what to call it on — and the call's result is the cell. null unpins. help with pinned_columns.

Example linkedin_person_profile
budgetnumber

Recipe: credits the row agent may spend per row. Default 1.5 per output column.

Min 0.1Max 100
budget_lockedboolean

Recipe: true keeps the budget as set when output columns are later added or removed; false lets it move by 1.5 per column.

Default false
only_toolsarray of string

Recipe: exactly these tools (GET /tools). Replaces the default set.

additional_toolsarray of string

Recipe: the default tools plus these (GET /tools; some need enabling on the account or a linked key).

Responses

201Save a recipe — the saved enrichment plus dataset_id and app_url, the dataset it fills. With dataset_id alone — the dataset's own enrichment as { id, name, app_url, dataset_id }
One of
  • Save a recipe
    idstring

    enr_...

    namestringnullable
    promptstring

    The task prompt the row agent reads for every row

    input_columnsarray of string

    The headers rows must carry (empty = any)

    outputarray of OutputColumnSpec
    Attributes
    namestringrequired

    The column name; the handle in every later call

    Max length 100
    promptstring

    What to find for this column, one value, on top of the enrichment's task prompt; on a pinned column, what to call the tool on. Leave sources out; the agent records the URLs it cited on the cell's sources.

    Max length 5000
    output_schemaobject

    A JSON Schema for the cell value (help with output_schema). Leave it out: the type is inferred from the prompt, caveats included. Send one only for an enum, a list, or an object. Does not apply to a pinned column.

    toolColumnToolPinnullable

    A tool name from GET /tools. The row agent makes one call of it per row — arguments it works out from the row, the known values, and its research; the column prompt says what to call it on — and the call's result is the cell. null unpins. help with pinned_columns.

    Example linkedin_person_profile
    toolsarray of string

    The tools the row agent may call (names from GET /tools)

    budget_credits_per_rownumber

    The most the row agent may spend on one row. Moves by 1.5 per output column added or removed unless budget_locked

    budget_lockedboolean

    true when the budget stays as set through column changes

    versioninteger

    Goes up by one on every column change; a cell filled under an older version reads stale

    created_atstring date-time
    updated_atstring date-time
    dataset_idstring

    The dataset created for the enrichment (ds_...); add rows to it and fill it

    app_urlstring uri

    The dataset in the app

  • A dataset's own enrichment
    idstring

    The dataset's enrichment (enr_...)

    namestring
    app_urlstring uri

    The dataset in the app

    dataset_idstring
400The request is malformed or names a conflicting parameter combination
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

401Missing or invalid API key (request_status body — see the AuthError schema)
request_statusstring
One of error
messagestring
error_typestring
One of unauthorized
403The API key's account may not access this resource or endpoint (forbidden), or the account has not migrated to Datasets yet (feature_not_enabled — open Datasets in the app and click "Migrate to Datasets")
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

404No resource with that id on this account
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

422The request is valid but can't be executed (e.g. insufficient_credits, credit_cap_exceeded when max_credits is set, validation failure)
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.