Overview

The Acqwired Research API (DRA) is a REST API that runs investment-grade company research via a 7-stage multi-agent pipeline. Submit a research task with a company name, a question, and an optional structured extraction schema — receive verified findings, claims, an optional full report, and structured data in minutes.

Base URL

https://api.acqwired.com/v1

Protocol

HTTPS only

Format

JSON

Quick start

1. Obtain your API key from the dashboard. 2. Submit a research task via POST /research. 3. Poll GET /task/{taskId} until status === "completed". 4. Read structured_output.result for your structured output.

Authentication

All endpoints except GET /health require an API key sent as a Bearer token in the Authorization header.

Request header
Authorization: Bearer YOUR_API_KEY
curl example
curl -X POST https://api.acqwired.com/v1/research \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "company_name": "Acme Manufacturing", "question": "Is this a good PE target?" }'

API Keys

API keys are generated in the dashboard under your user profile. Each key is scoped to your organization. Keys are not rotated automatically — contact your admin to revoke or regenerate.

Endpoints

All endpoints are relative to the base URL.

POST/research

Queue a new research task. Processing is asynchronous — returns immediately with a taskId (202). Poll GET /task/{taskId} for results. Schema is optional: omit both schema and schema_id to let the API auto-resolve one from your question.

Schema resolution order

  1. schema_id — use a specific saved schema by ID
  2. schema — define a schema inline in the request
  3. Auto-resolve — omit both: the API calls AI to derive a keyName from the question, then reuses a matching saved schema or creates one automatically

Request Body

FieldTypeReq.Description
company_namestringyesFull legal or trade name of the company to research.
domainstringCompany website domain (e.g. "acmemfg.com"). Improves research accuracy. Required when completeCompanyProfile is true.
questionstringThe research question. Required unless completeCompanyProfile is true. Can be broad ("Is this a good PE target?") or specific ("What quality certifications do they hold?").
completeCompanyProfilebooleanWhen true, runs a full company intelligence analysis across 4 parallel pipelines (identity, operations, contacts, people). Returns a rich structured result with 40+ classified fields and confidence scores. question, schema, and schema_id are ignored when this flag is set. Defaults to false.
thesis_textstringInvestment thesis text (only used when completeCompanyProfile is true). When provided, the response includes a thesis section with thesis_fit_score (0–100), thesis_alignment (Excellent / Good / Moderate / Poor Fit), and thesis_fit_justification.
schemaobjectInline schema definition for structured extraction. See Schema Types. Mutually exclusive with schema_id. Omit both to auto-resolve.
schema.keyNamestringOutput field name (e.g. "ceo_name"). Used as the key in structured_output.result.
schema.keyDescriptionstringDescription of what the field should capture.
schema.keyDataType"categorical" | "string" | "number"Data type of the extracted field.
schema.keyOptionsstring[]Required when keyDataType is "categorical". List of allowed options.
schema.enumType"best" | "all" | "topN"Result mode for categorical schemas. "best" returns a single best match (default), "all" returns all matching options comma-separated, "topN" returns the top N matches.
schema.enumTopNnumberNumber of results when enumType is "topN". Defaults to 3.
schema_idstringID of a saved schema. Mutually exclusive with inline schema. Omit both to auto-resolve.
generateReportbooleanIf true, the pipeline generates a full markdown report (stage 6). Defaults to false. Not applicable when completeCompanyProfile is true.
callback_urlstringURL to POST to when the task reaches a terminal state (completed or failed). Retried up to 3 times with 1s/2s/4s backoff.
callback_tokenstringBearer token sent in the Authorization header of each callback request. Required if callback_url is set.
callback_contextstringArbitrary string echoed back in the callback payload as "context". Use to correlate callbacks with your own records (e.g. a CRM row ID).

Response — 202 Accepted

Response body
{
  "taskId": "task_9f2a4c1e",
  "status": "queued",
  "message": "Research task submitted successfully",
  "schemaId": "schema_abc123"  // present for standard research tasks
}
curl — minimal (schema auto-resolved)
curl -X POST https://api.acqwired.com/v1/research \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "Acme Manufacturing",
    "domain": "acmemfg.com",
    "question": "Who is the CEO?"
  }'
curl — complete company profile
curl -X POST https://api.acqwired.com/v1/research \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "Acme Manufacturing",
    "domain": "acmemfg.com",
    "completeCompanyProfile": true
  }'
curl — with callback
curl -X POST https://api.acqwired.com/v1/research \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "Acme Manufacturing",
    "domain": "acmemfg.com",
    "question": "Is this a good PE target?",
    "callback_url": "https://your-app.com/webhooks/research",
    "callback_token": "whsec_abc123",
    "callback_context": "crm_row_7821"
  }'

Callback payload

When the task reaches a terminal state the API POSTs this JSON to your callback_url with Authorization: Bearer {callback_token}. Retried up to 3 times (1 s / 2 s / 4 s backoff).

{
  "taskId":       "550e8400-e29b-41d4-a716-446655440000",
  "status":       "completed",           // or "failed"
  "context":      "crm_row_7821",        // echoed from callback_context
  "result":       { ... },               // structured_output (or full profile) — null on failure
  "errorMessage": null                   // error string when status is "failed"
}
curl — with explicit schema
curl -X POST https://api.acqwired.com/v1/research \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "Acme Manufacturing",
    "domain": "acmemfg.com",
    "question": "Is this an ideal PE acquisition target?",
    "schema": {
      "keyName": "AcquisitionScore",
      "keyDescription": "Overall acquisition attractiveness",
      "keyDataType": "categorical",
      "keyOptions": [
        "5 = Highly attractive",
        "4 = Attractive",
        "3 = Neutral",
        "2 = Unattractive",
        "1 = Pass"
      ]
    }
  }'
GET/research/{taskId}

Lightweight status check that reads directly from DynamoDB. Returns task metadata and current status, but not full results (structured output, claims, report). Use GET /task/{taskId} for complete results.

Response Fields

FieldTypeReq.Description
taskIdstringyesUnique task identifier.
status"pending" | "queued" | "active" | "in-progress" | "completed" | "failed"yesCurrent task status.
taskType"research" | "company_profile"yes"research" for standard lite/deep tasks; "company_profile" when completeCompanyProfile was true.
companyNamestringyesCompany name as submitted.
domainstringCompany domain as submitted.
questionstringResearch question as submitted. Absent for company_profile tasks.
schemaobjectSchema definition used for this task. Absent for company_profile tasks.
schemaIdstringSaved schema ID if one was used. Absent for company_profile tasks.
thesisstring | nullInvestment thesis text submitted with the task. Present only for company_profile tasks where thesis_text was provided.
createdAtISO 8601 stringyesTask creation timestamp.
updatedAtISO 8601 stringLast update timestamp.
completedAtISO 8601 stringCompletion timestamp. Present when status is "completed".
errorMessagestringError description when status is "failed".
curl example
curl https://api.acqwired.com/v1/research/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/task/{taskId}

Retrieve the current status and results of a research task. Poll this endpoint until status equals 'completed' or 'failed'. Standard research tasks typically resolve within 2–5 minutes. Company profile tasks typically resolve within 3–8 minutes.

Standard research tasks (taskType: "lite" or "deep")

Response Fields

FieldTypeReq.Description
taskIdstringyesUnique task identifier.
status"pending" | "queued" | "active" | "in-progress" | "completed" | "failed"yesCurrent pipeline status.
taskType"lite" | "deep" | "company_profile"Type of task.
companyNamestringyesCompany name as submitted.
domainstringCompany domain as submitted.
questionstringResearch question as submitted.
currentStagestringName of the currently executing pipeline stage.
webSearchesCountnumberTotal web searches performed across all stages.
executionTimeMsnumberTotal pipeline execution time in milliseconds.
tokenUsagenumberTotal LLM tokens consumed by the task.
reconstructCountnumberNumber of reconstruct operations performed on this task.
structured_output.resultobjectExtracted values matching your schema definition. Keys match the keyName you defined. Present when status is "completed".
structured_output.confidencenumberPipeline confidence score (0–100).
structured_output.justificationstringAI reasoning for the extracted values.
structured_output.stepsstring[]Steps taken to arrive at the result.
structured_output.sourcesarrayCited sources: [{title, url, description}].
reportstringFull markdown report. Present only if generateReport was true.
claimsstringMarkdown-formatted verified claims extracted from research.
errorMessagestringError description when status is "failed".
Response — standard task (completed)
{
  "taskId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "completed",
  "taskType": "lite",
  "companyName": "Acme Manufacturing",
  "domain": "acmemfg.com",
  "question": "Is this an ideal PE acquisition target?",
  "executionTimeMs": 187432,
  "tokenUsage": 41203,
  "webSearchesCount": 14,
  "structured_output": {
    "result": { "AcquisitionScore": "4 = Attractive" },
    "confidence": 84,
    "justification": "Acme Manufacturing demonstrates strong acquisition appeal...",
    "sources": [
      { "title": "Acme Manufacturing — Company Overview", "url": "https://acmemfg.com/about", "description": "Company overview page" }
    ]
  },
  "claims": "- Founded in 1994\n- ~340 employees\n- ISO 9001 certified"
}

Company profile tasks (taskType: "company_profile")

When completeCompanyProfile: true was set on submission, the completed response contains a structured multi-section result instead of structured_output. Each field includes a confidence score (0–100) and null fields are omitted.

FieldTypeReq.Description
taskIdstringyesUnique task identifier.
status"queued" | "running" | "completed" | "failed"yesCurrent task status.
taskType"company_profile"yesAlways "company_profile" for this task type.
companyNamestringyesCompany name as submitted.
domainstringyesResolved company domain.
completedAtISO 8601 stringTimestamp when analysis completed.
tokenUsageobjectToken consumption breakdown: { inputTokens, outputTokens, totalTokens, model }.
identityobjectCore company identity fields. Keys: official_name, domain, company_summary, industry_niche, customer_segments, founding_year, headquarters, employee_count, total_customers, company_size, business_model.
operationsobjectOperational profile. Keys: operational_scale, operational_volume_metrics, geographic_footprint, remote_vs_office.
contactobjectContact information. Keys: primary_email, primary_phone, physical_address, contact_form_url, linkedin_company_url.
peopleobjectKey people. Keys: ceo_name, ceo_email, ceo_linkedin_url, founder_name, founder_linkedin_url, other_executives, best_outreach_contact.
indicatorsobjectCategorical classification indicators. Keys: Cap Table Status, Employee Headcount Size, Geographic Reach, Primary Headquarters Region, Product Category, Delivery Model Type, Primary GTM Motion, Management Structure Type, Primary Competitive Position, Competitive Advantage, contact_availability, social_presence_strength, decision_maker_accessibility.
thesisobjectThesis fit analysis. Present only when thesis_text was supplied on submission. Keys: thesis_fit_score (0–100 integer), thesis_alignment (Excellent / Good / Moderate / Poor Fit), thesis_fit_justification (string). Each field: { value, confidence }.
insightsarrayDynamic facts discovered during research that fall outside standard schema fields. Each item: { field, value, source? }.
errorsarrayPer-pipeline errors if any pipeline partially failed: [{ name, error }].
errorMessagestringTop-level error when status is "failed".
Response — company profile (completed)
{
  "taskId": "47463e01-7f03-4065-998c-e36b63b9e2bd",
  "status": "completed",
  "taskType": "company_profile",
  "companyName": "Acme Manufacturing",
  "domain": "acmemfg.com",
  "completedAt": "2026-05-26T14:22:11.000Z",
  "tokenUsage": {
    "inputTokens": 84210,
    "outputTokens": 12430,
    "totalTokens": 96640,
    "model": "claude-opus-4-7"
  },
  "identity": {
    "official_name":    { "value": "Acme Manufacturing Inc.", "confidence": 95 },
    "company_summary":  { "value": "Contract manufacturer of precision metal components for aerospace and defense OEMs.", "confidence": 88 },
    "industry_niche":   { "value": "Aerospace & Defense contract manufacturing", "confidence": 91 },
    "founding_year":    { "value": 1994, "confidence": 90 },
    "headquarters":     { "value": "Tulsa, Oklahoma", "confidence": 87 },
    "employee_count":   { "value": 340, "confidence": 72 },
    "company_size":     { "value": "Mid-market (100-500)", "confidence": 85 },
    "business_model":   { "value": "B2B contract manufacturing", "confidence": 93 }
  },
  "contact": {
    "primary_email":        { "value": "info@acmemfg.com", "confidence": 80 },
    "primary_phone":        { "value": "+1 (918) 555-0192", "confidence": 75 },
    "linkedin_company_url": { "value": "https://linkedin.com/company/acme-manufacturing", "confidence": 90 }
  },
  "people": {
    "ceo_name":         { "value": "Robert J. Walsh", "confidence": 82 },
    "ceo_linkedin_url": { "value": "https://linkedin.com/in/robertjwalsh", "confidence": 70 }
  },
  "indicators": {
    "Employee Headcount Size":    { "value": "Mid-market (100-500)", "confidence": 85 },
    "Primary GTM Motion":         { "value": "Direct Sales", "confidence": 80 },
    "Management Structure Type":  { "value": "Owner-operated", "confidence": 75 },
    "contact_availability":       { "value": "High", "confidence": 80 }
  },
  "thesis": {
    "thesis_fit_score":        { "value": 78, "confidence": 82 },
    "thesis_alignment":        { "value": "Good Fit", "confidence": 82 },
    "thesis_fit_justification": { "value": "Acme Manufacturing aligns well with the thesis: it operates in a regulated aerospace supply chain niche (matching the regulated-industry focus) and generates estimated $45M–$60M annual revenue within the target range. The B2B contract manufacturing model and direct-sales GTM motion fit the thesis criteria. The primary gap is the hardware/services nature vs. a preference for SaaS, which caps the fit score.", "confidence": 78 }
  },
  "insights": [
    { "field": "ISO Certification", "value": "ISO 9001:2015 certified since 2003", "source": "acmemfg.com/quality" },
    { "field": "Revenue Estimate", "value": "$45M–$60M annual revenue", "source": "industry report" }
  ]
}
curl example
curl https://api.acqwired.com/v1/task/47463e01-7f03-4065-998c-e36b63b9e2bd \
  -H "Authorization: Bearer YOUR_API_KEY"
POST/research/{taskId}/reconstruct

Re-extract structured data from a completed task using a new schema — without re-running the full research pipeline. Reuses cached analysis from stages 1–6, only executes stage 7. Costs approximately 5% of the original task.

~95% cost savings

Changed your extraction schema after reviewing initial results? Reconstruct instead of re-queuing. The task retains the same taskId and updates in-place.

Request Body

FieldTypeReq.Description
schemaobjectNew inline schema definition. Mutually exclusive with schema_id.
schema_idstringID of a saved schema to use for re-extraction. Mutually exclusive with schema.
Response — 202 Accepted
{
  "taskId": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Task reconstruction started - results will update when complete"
}
GET/tasks

List all tasks for your organization filtered by status bucket. Returns tasks newest-first. Use the nextPageToken from the response to paginate through additional results.

Query Parameters

FieldTypeReq.Description
status"active" | "pending" | "completed" | "failed"Status bucket to query. Defaults to "active". Active includes both queued and in-progress tasks.
limitnumberMaximum number of tasks per page. Defaults to 50, max 50.
nextPageTokenstringPagination cursor (unix timestamp ms) from the previous response. Omit for the first page.

Response — 200 OK

Response body
{
  "tasks": [
    {
      "taskId": "task_9f2a4c1e",
      "companyName": "Acme Manufacturing",
      "domain": "acmemfg.com",
      "question": "Is this a good PE target?",
      "status": "completed",
      "createdAt": "2026-02-20T14:30:00Z",
      "updatedAt": "2026-02-20T14:35:12Z",
      "errorMessage": null
    }
  ],
  "pagination": {
    "hasMore": true,
    "nextPageToken": "1740059400000"
  }
}
curl example
curl "https://api.acqwired.com/v1/tasks?status=completed&limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"
POST/schema/recommend

Generate AI-powered schema recommendations from natural language questions. Uses 11 PE/VC-optimized examples as few-shot context. Ideal for helping users choose the right field type and options.

Request Body

FieldTypeReq.Description
questionsstring[]yesArray of natural language questions (e.g. ["What is their competitive moat?"]).
Response body
{
  "schemas": [
    {
      "keyName": "CompetitiveMoat",
      "keyDescription": "Strength of the company's competitive advantage",
      "keyDataType": "categorical",
      "keyOptions": [
        "5 = Dominant moat",
        "4 = Strong moat",
        "3 = Moderate moat",
        "2 = Weak moat",
        "1 = No moat",
        "0 = Insufficient data"
      ]
    }
  ]
}
POST/schema/generate

Generate a schema definition from a natural language hint using AI, then automatically save it. Returns the schemaId for immediate use in research tasks. Ideal for one-click schema creation in workflows.

Request Body

FieldTypeReq.Description
hintstringyesNatural language description of what to extract (e.g. "funding stage of the company", "quality certifications held").
enumType"best" | "all" | "topN"Result mode to apply if the AI generates a categorical schema. "best" (default) returns a single best match, "all" returns all matches, "topN" returns the top N.
enumTopNnumberNumber of results when enumType is "topN". Defaults to 3.

Response — 200 OK

Response body
{
  "schemaId": "schema_abc123",
  "name": "Funding Stage",
  "schema": {
    "keyName": "FundingStage",
    "keyDescription": "Current funding stage of the company",
    "keyDataType": "categorical",
    "keyOptions": [
      "Public",
      "Acquired — PE-backed",
      "VC-backed",
      "Angel-backed",
      "Bootstrapped / founder-owned"
    ],
    "enumType": "best"
  }
}
curl example
curl -X POST https://api.acqwired.com/v1/schema/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "hint": "funding stage of the company",
    "enumType": "best"
  }'
GET/schemas

List all saved schemas for your organization, ordered by creation date (newest first). Pass ?q= to prefix-search by field name (keyName) using the GSI2 index — no table scan.

Query Parameters

FieldTypeReq.Description
qstringPrefix match on schema keyName (e.g. "ceo" matches "ceo_name"). Uses DynamoDB begins_with on GSI2 — fast indexed lookup, not a scan.
limitnumberMaximum schemas per page. Defaults to 100.
nextPageTokenstringPagination cursor from the previous response. Omit for first page.
Response body
{
  "schemas": [
    {
      "schemaId": "schema_abc123",
      "name": "Acquisition Screening",
      "schema": { "keyName": "AcquisitionScore", "keyDataType": "categorical", ... },
      "createdAt": "2026-02-01T10:00:00Z",
      "createdBy": "user@firm.com"
    }
  ],
  "pagination": {
    "limit": 100,
    "nextPageToken": null
  }
}
curl — prefix search by keyName
curl "https://api.acqwired.com/v1/schemas?q=ceo" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/schemas/{schemaId}

Retrieve a single saved schema by ID.

FieldTypeReq.Description
schemaIdstringyesSchema identifier returned when the schema was created.
namestringyesHuman-readable schema name.
schemaobjectyesSchema definition object.
createdAtISO 8601 stringyesCreation timestamp.
createdBystringyesEmail of the user who created the schema.
POST/schemas

Create and save a new schema for reuse across research tasks. Reference the returned schemaId in future POST /research calls.

Request Body

FieldTypeReq.Description
namestringyesHuman-readable name (e.g. "Acquisition Screening v2").
schema.keyNamestringyesOutput field name.
schema.keyDescriptionstringyesWhat the field captures.
schema.keyDataType"categorical" | "string" | "number"yesData type.
schema.keyOptionsstring[]Required when keyDataType is "categorical". Ordered list of allowed values.
schema.enumType"best" | "all" | "topN"Result mode for categorical schemas. Defaults to "best". See Result Mode in Schema Types.
schema.enumTopNnumberHow many results to return when enumType is "topN". Defaults to 3.
Response — 201 Created
{
  "schemaId": "schema_abc123",
  "name": "Acquisition Screening",
  "schema": { "keyName": "AcquisitionScore", ... }
}
PUT/schemas/{schemaId}

Update an existing schema. Partial updates supported — only include fields you want to change.

Request Body

FieldTypeReq.Description
namestringNew schema name.
schemaobjectUpdated schema definition (replaces existing).
DELETE/schemas/{schemaId}

Permanently delete a saved schema. Existing research tasks that used this schema are unaffected.

Response — 200 OK
{ "message": "Schema deleted successfully" }
GET/credits

Returns the enrichment credit balance for the organization associated with the authenticated API key. Returns 402 with remainingEnrichments: 0 when a research task is submitted and the balance is exhausted.

Response Fields

FieldTypeReq.Description
orgIdstringyesOrganization ID the API key belongs to.
remainingEnrichmentsnumberyesEnrichment credits remaining. Always 0 when isUnlimited is true.
totalEnrichmentsUsednumberyesCumulative enrichments consumed by this organization.
isUnlimitedbooleanyesWhen true, enrichments are not deducted per run. Balance is audited but not enforced.
lastEnrichmentDateISO 8601 stringTimestamp of the most recent enrichment run.
lastTopUpDateISO 8601 stringTimestamp of the most recent credit top-up.
Response body
{
  "orgId": "46805989-52b6-4ce4-b68b-4cb1e541912b",
  "remainingEnrichments": 500,
  "totalEnrichmentsUsed": 1234,
  "isUnlimited": false,
  "lastEnrichmentDate": "2026-05-25T10:00:00.000Z",
  "lastTopUpDate": "2026-05-20T09:00:00.000Z"
}
curl example
curl https://api.acqwired.com/v1/credits \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/health

Health check endpoint. Returns 200 with no authentication required. Use for uptime monitoring.

Response — 200 OK
{
  "status": "healthy",
  "service": "dra-api-public-gateway",
  "timestamp": "2026-02-26T00:00:00.000Z"
}

Schema Types

Three field types cover 100% of PE data enrichment needs. All types are extracted at temperature 0.0 for deterministic, consistent output across every task.

categorical— ordinal scales or named option sets

Use for scoring, grading, and classification. Define a fixed list of options — the pipeline selects the best match. Supports both ordinal 0–5 scales and named option sets (funding stage, business model, ownership type).

Ordinal scale example
{
  "keyName": "CompetitiveMoat",
  "keyDataType": "categorical",
  "keyOptions": [
    "5 = Dominant moat",
    "4 = Strong moat",
    "3 = Moderate moat",
    "2 = Weak moat",
    "1 = No moat",
    "0 = Insufficient data"
  ]
}
Named options example
{
  "keyName": "FundingStage",
  "keyDataType": "categorical",
  "keyOptions": [
    "Public",
    "Acquired — PE-backed",
    "VC-backed",
    "Angel-backed",
    "Bootstrapped / founder-owned"
  ]
}
string— free text or semicolon-delimited lists

Use for descriptions, multi-value lists (certifications, customers, investors), and narrative fields. For multiple values, the pipeline returns semicolon-delimited output.

Delimited list example
// Input schema
{ "keyName": "Certifications", "keyDataType": "string", "keyDescription": "Quality certifications held" }

// Example output
"ISO-13485; AS-9100; IPC-A-610; ITAR"
Free text example
// Input schema
{ "keyName": "BusinessDescription", "keyDataType": "string", "keyDescription": "One-sentence business description" }

// Example output
"Enterprise AI platform for financial services serving 200+ institutional clients"
number— quantitative metrics

Use for headcount, revenue estimates, founding year, office count, and other numeric metrics extractable from public web content.

Number example
// Input schema
{ "keyName": "EstimatedHeadcount", "keyDataType": "number", "keyDescription": "Approximate number of employees" }

// Example outputs
342        // headcount
15000000   // revenue in dollars
1994       // founding year
enumType— result mode for categorical schemas

For categorical schemas, the enumType field controls how the AI returns matched options. Set it on inline schemas, saved schemas, or the generate endpoint.

best

Best match (default)

Returns a single highest-confidence option. Use for scoring scales and exclusive classifications.

all

All matches

Returns all matching options as a comma-separated string. Use when multiple categories may apply (e.g. certifications, industries).

topN

Top N matches

Returns the N most relevant options ordered by confidence. Pair with enumTopN (default: 3).

Top N example — returns top 3 certifications
{
  "keyName": "TopCertifications",
  "keyDataType": "categorical",
  "keyOptions": ["ISO 9001", "ISO 13485", "AS9100", "ITAR", "IPC-A-610", "NADCAP"],
  "enumType": "topN",
  "enumTopN": 3
}

// Example output: "ISO 9001, ITAR, AS9100"

Research Pipeline

Each research task executes in an isolated ECS Fargate container with a 9-minute timeout. The pipeline runs 7 sequential stages, with some stages executing sub-agents in parallel.

01

Query Decomposition

Breaks the research question into typed subtopics (company analysis, competitive intelligence, leadership, financial). Routes each to the optimal path: basic (fast factual lookup) or deep (multi-source analysis).

02

Strategic Web Search

Executes web searches to identify authoritative sources. Scores each URL by relevance (1–5 scale). Basic subtopics complete here; complex subtopics advance to planning.

03

Content Extraction

Scrapes high-priority URLs in parallel batches. Content over 3,000 characters is auto-summarized. All source content is merged into a unified knowledge base.

04

Multi-Agent Analysis

Four specialized agents collaborate: Analyst extracts insights, Writer drafts narrative, Reviewer quality-checks, Reviser improves based on feedback. Each subtopic produces a verified analysis.

05

Claim Verification

Findings are cross-referenced against cited sources. A confidence score (0–100) is computed for the overall output. Verified claims are formatted for the claims output field.

06

Report Generation (optional)

If generateReport=true, a comprehensive markdown report synthesizes all subtopic findings, with sources cited and confidence score. Skipped otherwise to reduce cost.

07

Structured Extraction

Your schema fields are extracted from the research output at temperature 0.0. Uses prompt engineering with Handlebars templates and JSON Schema validation for strict, deterministic output.

Error Codes

All errors return a JSON body with a message field describing the issue.

StatusMeaningCommon Cause
400Bad RequestMissing required fields, invalid schema definition, or malformed JSON.
401UnauthorizedMissing or invalid Authorization header. Check your API key.
402Payment RequiredEnrichment credit balance is exhausted. Top up via the dashboard to continue.
403ForbiddenAPI key is valid but lacks permission for the requested operation.
404Not FoundtaskId or schemaId does not exist in your organization.
409ConflictTask is not in a state that allows the requested operation (e.g. reconstruct on an in-progress task).
429Rate LimitedToo many concurrent research tasks. Queue additional tasks after existing ones complete.
500Internal Server ErrorPipeline execution error. The task status will be set to "failed" with an errorMessage.

Error response shape

{
  "message": "Missing required field: company_name",
  "statusCode": 400
}