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

Getting Started with Reports

This guide will walk you through working with reports using the Extruct API. Reports are a powerful feature of the Extruct platform, allowing you to generate detailed, AI-powered insights about specific companies.

Authentication

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

Create a Report

You can create a company report using the Create Report endpoint:

curl -X POST "https://api.extruct.ai/v1/reports" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "name": "Basic Company Report",
    "inputs": {
      "company_name": "Extruct AI",
      "company_website": "https://extruct.ai"
    },
    "column_configs": [
      {
        "key": "description",
        "name": "Company Description",
        "value": {
          "agent_type": "research_pro",
          "prompt": "Provide a brief overview of {company_name} ({company_website})",
          "output_format": "text"
        }
      },
      {
        "key": "founded_year",
        "name": "Founded Year",
        "value": {
          "agent_type": "research_pro",
          "prompt": "In what year was {company_name} founded? Return just the number.",
          "output_format": "number"
        }
      }
    ]
  }'

The response will include the report ID, which you can use to check the status and retrieve the completed report:

{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "name": "Basic Company Report",
  "status": "created",
  "column_configs": [
    {
      "key": "description",
      "name": "Company Description",
      "value": {
        "agent_type": "research_pro",
        "prompt": "Provide a brief overview of {company_name} ({company_website})",
        "output_format": "text"
      }
    },
    {
      "key": "founded_year",
      "name": "Founded Year",
      "value": {
        "agent_type": "research_pro",
        "prompt": "In what year was {company_name} founded? Return just the number.",
        "output_format": "number"
      }
    }
  ],
  "inputs": {
    "company_name": "Extruct AI",
    "company_website": "https://extruct.ai"
  }
}

Check Report Status

You can check the status of the report using the GET /v1/reports/ endpoint:

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

Sample response:

{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:35:12Z",
  "name": "Basic Company Report",
  "status": "done",
  "column_configs": [...],
  "inputs": {
    "company_name": "Extruct AI",
    "company_website": "https://extruct.ai"
  },
  "results": {
    "description": {
      "answer": "Extruct AI is a company that leverages artificial intelligence to provide advanced business intelligence and company research solutions. The platform helps users discover new companies, enrich existing data, and monitor market changes in real-time.",
      "sources": [
        "https://extruct.ai"
      ]
    },
    "founded_year": {
      "answer": 2022,
      "sources": [
        "https://www.linkedin.com/company/extruct-ai"
      ]
    }
  }
}

The status field indicates the current status of the report. It can be created (just created), in_progress (report generation in progress), or done (report generation completed).

Get Report Data

Once the report is complete (status = done), the results field in the response will contain the detailed report information with answers and sources for each data point.

You can list all your reports using the List Reports endpoint:

curl -X GET "https://api.extruct.ai/v1/reports" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Delete a Report

If you need to delete a report, use the Delete Report endpoint:

curl -X DELETE "https://api.extruct.ai/v1/reports/{report_id}" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Report vs Table: When to Use

Reports are ideal for deep, comprehensive research on individual companies, while Tables are better suited for analyzing and comparing multiple companies across specific criteria.

  • Use Reports when: You need detailed insights about specific companies
  • Use Tables when: You need to analyze patterns across multiple companies or rank companies based on custom criteria

For more information on using AI Reports for company enrichment, see our Single Company Enrichment guide.