Want a guided walkthrough? Schedule a 15-min call.

Getting Started with Tables

This guide will walk you through working with tables using the Extruct API. Tables are a core component of the Extruct platform, allowing you to organize company data and run AI research agents at scale across multiple companies.

Authentication

Before working with tables, ensure you have an API token. Follow steps in the Authentication.

Create a Table

While it’s easiest to create a table via the Extruct AI Dashboard, you can also create tables programmatically:

curl -X POST "https://api.extruct.ai/v1/tables" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "name": "Company Research Table",
    "description": "Research data on tech companies",
    "kind": "company",
    "column_configs": [
      {
        "kind": "input",
        "name": "Company Input",
        "key": "input"
      },
      {
        "kind": "agent",
        "name": "Company Description",
        "key": "description",
        "value": {
          "agent_type": "research_pro",
          "prompt": "Provide a brief description of the company {input}",
          "output_format": "text"
        }
      }
    ]
  }'

For most use cases, we recommend using the Dashboard to create tables with a user-friendly interface. You can create tables from scratch, from templates, or by using the “Suggest with AI” feature.

Add Companies to a Table

All tables have an input column, which is the “company identifier” column you must provide. It can be a company website, name, a mix of both, or any other unique identifier.

Here is a sample request to add companies to a table:

curl -X POST "https://api.extruct.ai/v1/tables/{table_id}/rows" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "rows": [
      {
        "data": {
          "input": "Extruct AI (https://extruct.ai)"
        }
      },
      {
        "data": {
          "input": "OpenAI (https://openai.com)"
        }
      }
    ],
    "run": true
  }'

The run parameter is optional and defaults to false. If set to true, it will trigger AI research agents to enrich the data in the table.

Alternatively, you can trigger the enrichment process later using the Run Table endpoint:

curl -X POST "https://api.extruct.ai/v1/tables/{table_id}/run" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Check Table Status

You can check the status of the table using the GET /v1/tables/ endpoint:

curl -X GET "https://api.extruct.ai/v1/tables/{table_id}" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Sample response:

{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "name": "Company Research Table",
  "description": "Research data on tech companies",
  "tags": ["research", "tech"],
  "kind": "company",
  "columns": [
    {
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "config": {
        "kind": "input",
        "name": "Company Input",
        "key": "input"
      }
    },
    {
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "config": {
        "kind": "agent",
        "name": "Company Description",
        "key": "description",
        "value": {
          "agent_type": "research_pro",
          "prompt": "Provide a brief description of the company {input}",
          "output_format": "text"
        }
      }
    }
  ],
  "owner": {
    "id": "<string>",
    "email": "<string>"
  },
  "status": {
    "num_rows": 2,
    "num_output_columns": 1,
    "num_input_columns": 1,
    "num_cells_completed": 1,
    "num_cells_in_progress": 1,
    "num_columns": 2,
    "run_status": "running"
  }
}

The field run_status indicates the current status of the table. It can be running (enrichment in progress) or idle (enrichment completed).

Get Table Data

Once the table enrichment is complete, you can access the data using the Get Table Data endpoint:

curl -X GET "https://api.extruct.ai/v1/tables/{table_id}/data" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Sample response:

{
  "rows": [
    {
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "data": {
        "input": "Extruct AI (https://extruct.ai)",
        "description": "Extruct AI is a platform that leverages artificial intelligence to provide advanced business intelligence and company research solutions."
      }
    },
    {
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "data": {
        "input": "OpenAI (https://openai.com)",
        "description": "OpenAI is an artificial intelligence research lab consisting of the for-profit corporation OpenAI LP and its parent company, the non-profit OpenAI Inc."
      }
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 50,
    "total": 2
  }
}

Table vs Report: When to Use

Tables are ideal for analyzing multiple companies at once and comparing them across consistent criteria, while Reports provide deep, comprehensive research on individual companies.

  • Use Tables when: You need to process many companies at once, rank companies based on criteria, or need standardized data points across multiple companies
  • Use Reports when: You need detailed, in-depth research on specific companies

For more advanced table usage, see our guides on Company Enrichment at Scale and Custom Criteria Ranking.