> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tableflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Extractions

> Process files and extract data

## What are Extractions?

Extractions are automated processes that use AI to pull structured data from your documents based on defined **[Templates](/templates)**. They analyze document content, identify relevant information, and convert unstructured documents into structured data.

## Supported Document Types

* **Spreadsheets** - Excel files (.xlsx, .xls), CSV files (.csv), TSV files (.tsv), and other tabular formats
* **PDFs** - Forms, invoices, statements, reports, and more
* **Images** - Scanned documents, receipts, business cards, and photos (.jpg, .png, .webp, .tiff)

## Create an Extraction in the Dashboard

1. Navigate to the **Extractions** page.
2. Click **New Extraction**.
3. Upload your document or provide a file URL.
4. Select an existing **[Template](/templates)** or create a new one.
5. Click **Upload** to start the process.

## Create an Extraction via API

1. **Upload a file** with the `/v2/extractions/upload` endpoint
2. **Specify a template ID** to determine how data is extracted

The API will return an extraction ID you can use to check the status and retrieve results:

```json Response theme={null}
{
  "id": "ext_abcdef123456",
  "template_id": "tmpl_987654321",
  "file_name": "document.pdf",
  "status": "processing",
  "created_at": 1682366228
}
```

For more detailed API documentation, see the [API Reference](/api-reference).

## Retrieve Extraction Results

Once an Extraction has completed, you can access the data in several ways:

* **View in Dashboard** - See extracted fields and tables in the TableFlow dashboard
* **Download Results** - Export the data as JSON, CSV, or Excel files
* **API / Webhooks** - Retrieve results programmatically using the TableFlow API

## How Extractions Work

TableFlow's AI extraction process involves several key steps:

1. **Document Analysis** - AI analyzes the structure, layout, and content of your document
2. **Template Mapping** - AI matches document content to your template fields and tables
3. **Data Extraction** - AI extracts the relevant data based on context and positioning
4. **Validation** - AI validates extracted data against rules in your template

## Next Steps

After creating extractions, you can use TableFlow's [API](/api-reference) to integrate the extracted data into your applications.

<RequestExample>
  ```json Completed Extraction Example theme={null}
  {
    "id": "ext_123456789",
    "template_id": "tmpl_987654321",
    "status": "completed",
    "confidence": 0.92,  // Overall confidence score
    "created_at": "2023-05-15T14:30:00Z",
    "fields": {
      "invoice_number": {
        "value": "INV-2023-0042",
        "confidence": 0.98  // Per-field confidence
      },
      "invoice_date": {
        "value": "2023-05-10",
        "confidence": 0.95
      },
      "due_date": {
        "value": "2023-06-09",
        "confidence": 0.94
      },
      "total_amount": {
        "value": 1250.00,
        "confidence": 0.97
      }
    },
    "tables": {
      "line_items": {
        "rows": [
          {
            "description": {
              "value": "Professional Services - Web Development",
              "confidence": 0.96
            },
            "quantity": {
              "value": 10,
              "confidence": 0.99
            },
            "unit_price": {
              "value": 125.00,
              "confidence": 0.98
            },
            "amount": {
              "value": 1250.00,
              "confidence": 0.97
            }
          }
        ]
      }
    }
  }
  ```
</RequestExample>
