Skip to main content

Overview

This guide walks through adding research columns and running structured enrichment on a company list. The inputs can come from Extruct discovery or from your own company list.

Prerequisites

export EXTRUCT_API_TOKEN="YOUR_API_TOKEN"
Generate tokens in Dashboard API Tokens. For full setup, see Authentication.

Endpoints used

Workflow

1) Create a base table

The create-table response includes id, which you will reuse as TABLE_ID.
TABLE_RESPONSE=$(curl -sS -X POST "https://api.extruct.ai/v1/tables" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}" \
  -d '{
    "name": "Enrichment Pipeline",
    "kind": "company",
    "column_configs": [
      {
        "kind": "input",
        "name": "Company",
        "key": "input"
      }
    ]
  }')

TABLE_ID=$(echo "${TABLE_RESPONSE}" | jq -r '.id')
echo "${TABLE_ID}"
Requires jq. If unavailable, copy id manually from response.

2) Add enrichment columns

Use Column Guide for minimum working shapes, agent-type guidance, output formats, and prompt rules. Use Column Library when you want fuller reusable templates and scoring patterns.
curl -X POST "https://api.extruct.ai/v1/tables/${TABLE_ID}/columns" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}" \
  -d '{
    "column_configs": [
      {
        "kind": "agent",
        "name": "Short Description",
        "key": "short_description",
        "value": {
          "agent_type": "research_pro",
          "prompt": "Summarize what the company does in 2 sentences.",
          "output_format": "text"
        }
      },
      {
        "kind": "agent",
        "name": "Target Audience",
        "key": "target_audience",
        "value": {
          "agent_type": "research_pro",
          "prompt": "Describe the company's core buyer or user.",
          "output_format": "text"
        }
      }
    ]
  }'

3) Add company rows and run

curl -X POST "https://api.extruct.ai/v1/tables/${TABLE_ID}/rows" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}" \
  -d '{
    "rows": [
      {"data": {"input": "https://stripe.com"}},
      {"data": {"input": "https://openai.com"}},
      {"data": {"input": "https://anthropic.com"}}
    ],
    "run": true
  }'

4) Check run status

curl --get "https://api.extruct.ai/v1/tables/${TABLE_ID}" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}"
When to proceed: continue when run_status is idle and num_cells_in_progress is 0.

5) Read enriched output

curl --get "https://api.extruct.ai/v1/tables/${TABLE_ID}/data" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}" \
  --data-urlencode "offset=0" \
  --data-urlencode "limit=100"

Troubleshooting

401 Unauthorized

The token is missing or invalid. Check that EXTRUCT_API_TOKEN is set and the header is exactly Authorization: Bearer ${EXTRUCT_API_TOKEN}.

422 Unprocessable Entity

Common causes:
  • Invalid column config shape for agent columns.
  • Missing required data in row payloads.
  • Invalid JSON body.
Validate your payload JSON before sending: echo '<json-body>' | jq empty.