Skip to main content

Overview

This guide walks through a repeatable company-table workflow: create a table, add rows, run enrichment, and read the results. You can start with companies discovered in Extruct or with your own list of company domains or URLs.

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 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": "Company Research",
    "kind": "company",
    "column_configs": [
      {
        "kind": "input",
        "name": "Company",
        "key": "input"
      },
      {
        "kind": "agent",
        "name": "Description",
        "key": "description",
        "value": {
          "agent_type": "research_pro",
          "prompt": "Describe what the company does in 2 short sentences.",
          "output_format": "text"
        }
      }
    ]
  }')

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

2) Add rows

These rows can come from Extruct search results, Deep Search output, or your own company list. For company tables, the most reliable input value is the company’s official website domain or URL.
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://extruct.ai"}},
      {"data": {"input": "https://openai.com"}}
    ],
    "run": false
  }'
After rows are added, Extruct can populate built-in company fields such as company_profile, company_name, and company_website. Use Column Guide for minimum working shapes, column-selection rules, and prompt guidance. Use Column Library when you want fuller reusable templates and common chains.

3) Run the table

curl -X POST "https://api.extruct.ai/v1/tables/${TABLE_ID}/run" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}" \
  -d '{"mode": "new"}'

4) Check 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 rows

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

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

The payload shape is invalid. Common issues:
  • rows must be an array of row objects with data.
  • column_configs entries must include required fields by column type.
  • run must be boolean when provided.
Validate your payload JSON before sending: echo '<json-body>' | jq empty.