# Extract Invoice Data from PDFs to a Spreadsheet

**Use case:** 

Turn supplier invoice PDFs into one row each: vendor, invoice number, dates, subtotal, tax, total, currency and line items, with a confidence flag for anything to double-check.

## Input

```json
{
  "documentUrls": [
    {
      "url": "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/AzureInterior.pdf"
    },
    {
      "url": "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/QualityHosting.pdf"
    }
  ],
  "documentType": "invoice",
  "customFields": [],
  "models": [
    "google/gemini-2.5-flash"
  ],
  "useRefereeModel": false,
  "refereeModel": "deepseek/deepseek-v4.1-flash",
  "includeFullText": false,
  "cheaperFasterReading": false,
  "extractLineItems": true,
  "maxPagesPerDocument": 5,
  "concurrency": 4
}
```

## Output

```json
{
  "file": {
    "label": "File",
    "format": "string"
  },
  "document_type": {
    "label": "Document type",
    "format": "string"
  },
  "vendor_name": {
    "label": "Vendor",
    "format": "string"
  },
  "invoice_number": {
    "label": "Invoice number",
    "format": "string"
  },
  "invoice_date": {
    "label": "Invoice date",
    "format": "string"
  },
  "total_amount": {
    "label": "Total charges",
    "format": "number"
  },
  "currency": {
    "label": "Currency",
    "format": "string"
  },
  "confidence": {
    "label": "Confidence",
    "format": "string"
  },
  "needs_review": {
    "label": "Needs review",
    "format": "boolean"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Invoice & Utility Bill Data Extractor: Totals, kWh, Line Items Actor is ready to run with the inputs already set for "Extract Invoice Data from PDFs to a Spreadsheet". [Sign up or log in](https://console.apify.com/create-task-from-example/Eqw6hCp3fbZfLe516) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Extract Invoice Data from PDFs to a Spreadsheet" task

The Invoice & Utility Bill Data Extractor: Totals, kWh, Line Items Actor will start running based on the input automatically. You can also change all the input fields, like documents (links), what are you extracting from?, and more, to match your specific use case.

### 3. Receive the "Extract Invoice Data from PDFs to a Spreadsheet" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as file, document type, vendor, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Extract Invoice Data from PDFs to a Spreadsheet" task via API](https://apify.com/fayoussef/invoice-utility-bill-extractor.md).

## About this Actor

This example demonstrates how to use [Invoice & Utility Bill Data Extractor: Totals, kWh, Line Items](https://apify.com/fayoussef/invoice-utility-bill-extractor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/fayoussef/invoice-utility-bill-extractor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/fayoussef/invoice-utility-bill-extractor.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
