What Research does
The Research endpoint runs a custom, AI-powered analysis over a list of entities. Instead of returning a fixed enrichment schema, you describe the task — either as a natural-languagequery or as a prompt_template — and define the exact shape of the result with an output_schema. For each entity, the engine resolves its profile, optionally performs real-time web research, and returns structured JSON that conforms to your schema.
This is ideal when an off-the-shelf enrichment doesn’t exist for your use case, for example:
- Custom classification — e.g. B2B vs B2C, ICP fit, seniority or buying-role inference.
- Fit scoring with reasoning — score each account or contact against a value proposition and explain why.
- Campaign-ready copy — one-line segments or personalized openers tailored per entity. Each entity is processed independently against your prompt and schema, so a single request can research many records at once.
Endpoints
Research runs on two entity types. The concepts on this page apply to both; each endpoint page documents its own record fields, request shape, and examples.
All are
POST. Sync endpoints accept a single ID or a list of IDs; async endpoints take a list_id from an uploaded dataset — see v2 conventions and async jobs.
Authenticate with your API key in the api_key header. See Getting your API key.
How it works
How It Works
How It Works
- Input: A list of entities (each identified by a
business_idorprospect_id, with optionalcustom_fields) plus aparametersobject containing either aqueryor aprompt_template, and anoutput_schema(required withprompt_template, optional withquery). - Processing: For each entity, Explorium resolves the profile and builds a
recordcontext. When you pass aquery, an internal LLM first generates an optimized prompt from your instruction, the availablerecordfields, and the available research functions — and, if you didn’t supply anoutput_schema, generates one as well. When you pass aprompt_template, your prompt is used as-is. The engine then runs the prompt — performing web research where instructed — and produces structured output constrained to the schema. - Output: One result row per input entity, returned under
data. Each successful row contains the generated fields defined by theoutput_schema; failed rows are returned with an_errorfield rather than being dropped.
`query` vs `prompt_template`
`query` vs `prompt_template`
You must provide exactly one of
query or prompt_template. Sending both, or neither, returns a validation error.The `record` context
The `record` context
When rendering a
prompt_template (and when the model composes a prompt from a query), each entity is represented by a record object. The record contains:- Explorium profile fields resolved from the identifier. For businesses, fields such as
record['organization_name']andrecord['description']. For prospects, fields such asrecord['full_name'],record['job_title'], andrecord['organization_name']. - Any
custom_fieldsyou supplied for that entity — for examplerecord['campaign_name'].
prompt_template using {{ record['field_name'] }}. Custom fields are merged into the same record namespace as the profile fields, so they’re referenced the same way. The full field list lives on each endpoint page: businesses and prospects.Real-time web research
What sets Research apart from standard enrichments is that the engine can ground its analysis in live web data, not just the data already on file. Per entity, it can:- Run a SERP search and use the top results as context for the model.
- Search and scrape the most relevant web pages and pass that content to the model as grounding context. You steer this directly from your instruction — for example, “…use web search to validate if the description is insufficient” or “…use web search to supplement missing context.” When the resolved profile is enough, the model can answer from it; when it isn’t, the model can reach out to the web.
Because some rows trigger live web lookups, per-entity latency varies and can take several seconds. Size your batches and set client timeouts accordingly.
v2: this endpoint accepts either a single ID (a string) or a list of IDs — the separate
/bulk_enrich route is gone. See v2 conventions.Research functions
Inside aprompt_template, you can call research functions to ground the analysis in live web data. Render them with {{ ... }} just like a record field: the function runs first, and its output — SERP results or scraped page text — is injected into the prompt as context before the model reasons over it. Their arguments are typically built from record fields (e.g. record['organization_name'], record['url']).
You can use up to two research functions in a single prompt_template.
These functions apply to
prompt_template only. When you pass a query, the prompt generator selects and invokes the appropriate research functions automatically based on your instruction — you don’t call them explicitly.ReadMostRelevantLinks
Runs a SERP search for query and scrapes the top max_results result pages, injecting their combined content into the prompt as grounding context. Use it when the company or person isn’t well described by the resolved profile alone and you want fresh, broad web context.
string
required
The search query to run. Commonly built from a record field, e.g.
record['organization_name'].integer
The number of top SERP results to fetch and scrape.
ReadUrlText
Scrapes the text content of a single URL and injects it into the prompt as grounding context. Use it when you already know the exact page to read — most often the entity’s own website via record['url'].
string
required
The URL of the page to scrape, e.g.
record['url'].Using two functions together
You can combine both functions in oneprompt_template (the two-function maximum). Here the model reads the company’s own site with ReadUrlText and supplements it with broader web results from ReadMostRelevantLinks before answering.
Per-call credit usage
The Research endpoints support the opt-in Per-Call Credit Usage header. Sendcredit-usage: true to receive a credit_usage object alongside the response, reporting the exact credits deducted for the call. This is the recommended way to track research costs while you tune prompts and schemas.
Best practices
- Be explicit in your schema. Use clear field
descriptions, andenum/minimum/maximumconstraints, so the model returns consistent, parseable values. - Keep outputs focused. Smaller, well-scoped schemas produce more reliable results than large free-form objects.
- Tell the model when to use the web. If a task may need information beyond the resolved profile, say so in your instruction (e.g. “use web search to supplement missing context”).
- Prefer
prompt_templatefor repeatable pipelines where you need full control over wording, injected fields, and inline research functions; usequeryfor quick, natural-language instructions. - Resolve identifiers first with Match Businesses or Match Prospects so the engine has a profile to work from.
- Attach context with
custom_fields(e.g. campaign name, segment) rather than hard-coding it into every prompt. - Handle
_errorrows. Iterate overdataand check for_errorbefore reading the generated fields.
Errors
object
Returned when the request body is invalid — for example when both
query and prompt_template are provided, when neither is provided, when prompt_template is used without an output_schema, or when the output_schema is malformed.Endpoint reference
Businesses research
Business record fields, request shape, and examples
Prospects research
Prospect record fields, request shape, and examples