# Batch-extract fields from several IRS tax form PDFs

**Use case:** 

Processes three IRS form PDFs (W-9, W-4 and 1040) in one run and writes one JSON object per document with the form title, number, revision date, issuer and numbered fields, plus per-field confidence and the list of fields not found. Shows how to point the extractor at a list of PDF URLs with the free rules mode.

## Input

```json
{
  "urls": [
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
    "https://www.irs.gov/pub/irs-pdf/fw4.pdf",
    "https://www.irs.gov/pub/irs-pdf/f1040.pdf"
  ],
  "schema": {
    "type": "object",
    "properties": {
      "title": {
        "type": "string",
        "description": "Title of the form"
      },
      "formNumber": {
        "type": "string",
        "description": "The form number, e.g. W-9 or 1040"
      },
      "revisionDate": {
        "type": "string",
        "format": "date",
        "description": "Revision date of the form"
      },
      "issuer": {
        "type": "string",
        "description": "Agency or organization that issues the form"
      },
      "fields": {
        "type": "array",
        "description": "The numbered fields a filer completes",
        "items": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            },
            "description": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "extractor": "rules",
  "modelTier": "fast",
  "maxInputTokens": 40000,
  "maxConcurrency": 2,
  "includeMarkdown": false,
  "maxFileSizeMb": 25,
  "downloadTimeoutSecs": 20
}
```

## Output

```json
{
  "filename": {
    "label": "File",
    "format": "text"
  },
  "title": {
    "label": "Title",
    "format": "text"
  },
  "pages": {
    "label": "Pages",
    "format": "number"
  },
  "extractionMethod": {
    "label": "Method",
    "format": "text"
  },
  "modelTier": {
    "label": "Tier",
    "format": "text"
  },
  "filledFields": {
    "label": "Filled",
    "format": "number"
  },
  "totalFields": {
    "label": "Fields",
    "format": "number"
  },
  "overallConfidence": {
    "label": "Confidence",
    "format": "number"
  },
  "data": {
    "label": "Extracted JSON",
    "format": "object"
  },
  "modelCostUsdEstimate": {
    "label": "Model cost (USD)",
    "format": "number"
  },
  "error": {
    "label": "Error",
    "format": "text"
  }
}
```

## How it works

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

The PDF & Document to JSON Extractor (AI) — Invoices, Forms Actor is ready to run with the inputs already set for "Batch-extract fields from several IRS tax form PDFs". [Sign up or log in](https://console.apify.com/create-task-from-example/FAwOhfCdx4D95OmYf) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Batch-extract fields from several IRS tax form PDFs" task

The PDF & Document to JSON Extractor (AI) — Invoices, Forms Actor will start running based on the input automatically. You can also change all the input fields, like document urls, JSON Schema of the object to extract, and more, to match your specific use case.

### 3. Receive the "Batch-extract fields from several IRS tax form PDFs" 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, title, pages, 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 "Batch-extract fields from several IRS tax form PDFs" task via API](https://apify.com/owlabee/document-to-json-extractor.md).

## About this Actor

This example demonstrates how to use [PDF & Document to JSON Extractor (AI) — Invoices, Forms](https://apify.com/owlabee/document-to-json-extractor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/owlabee/document-to-json-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/owlabee/document-to-json-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`).
