# Extract supplier quote PDF line items to JSON

**Use case:** 

Turns a supplier quote into JSON for estimate reconciliation: supplier, branch, quote number, date, valid-until, customer, job, terms, subtotal, tax, freight, total, and every line item with SKU, description, quantity, unit, unit price and extended amount. The example runs on an inline synthetic roofing-supply quote (a data: URL); swap in your own quote PDFs. Rules extractor, no key.

## Input

```json
{
  "urls": [
    "data:text/markdown;base64,IyBRVU9URQoKTm9ydGhnYXRlIFJvb2ZpbmcgU3VwcGx5IENvLgpCcmFuY2g6IFRhbXBhIEVhc3QgKEJyYW5jaCAxMTQpCjQ0MTAgSW5kdXN0cmlhbCBQYXJrIERyaXZlLCBUYW1wYSwgRkwgMzM2MTkKcXVvdGVzQG5vcnRoZ2F0ZS1yb29maW5nLXN1cHBseS5leGFtcGxlLmNvbQoKUXVvdGUgbnVtYmVyOiBRLTIwMjYtNDg4MTIKUXVvdGUgZGF0ZTogMjAyNi0xMC0xNApWYWxpZCB1bnRpbDogMjAyNi0xMS0xMwpTYWxlcyByZXA6IE0uIEFsdmFyZXoKUGF5bWVudCB0ZXJtczogTmV0IDMwClNoaXAgdmlhOiBCcmFuY2ggdHJ1Y2ssIHJvb2Z0b3AgZGVsaXZlcnkKCkN1c3RvbWVyOiBFeGFtcGxlIFJvb2ZpbmcgQ29udHJhY3RvcnMgTExDLCAyMjAwIFBhbG0gQXZlbnVlLCBCcmFuZG9uLCBGTCAzMzUxMQpKb2IgbmFtZTogSGFyYm9yIFZpZXcgQXBhcnRtZW50cywgQnVpbGRpbmdzIDEtNCByZS1yb29mCgp8IFNLVSB8IERlc2NyaXB0aW9uIHwgUXR5IHwgVW5pdCB8IFVuaXQgcHJpY2UgfCBFeHRlbmRlZCB8CnwtLS18LS0tfC0tLXwtLS18LS0tfC0tLXwKfCBTSEctQVJDLVdHIHwgQXJjaGl0ZWN0dXJhbCBzaGluZ2xlcywgd2VhdGhlcmVkIGdyYXksIDMgYnVuZGxlcyBwZXIgc3F1YXJlIHwgMTg2IHwgQkRMIHwgJDM4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sOiAkMTIsOTIyLjAwClNhbGVzIHRheCAoNy41JSk6ICQ5NjkuMTUKRnJlaWdodCBhbmQgcm9vZnRvcCBkZWxpdmVyeTogJDM1MC4wMApRdW90ZSB0b3RhbDogJDE0LDI0MS4xNQpDdXJyZW5jeTogVVNECgpQcmljZXMgZmlybSBmb3IgMzAgZGF5cyBmcm9tIHRoZSBxdW90ZSBkYXRlLiBSZXR1cm5zIG9uIGZ1bGwgdW5vcGVuZWQgYnVuZGxlcyBvbmx5LCAxNSUgcmVzdG9ja2luZyBmZWUuCg=="
  ],
  "schema": {
    "type": "object",
    "properties": {
      "supplierName": {
        "type": "string",
        "description": "Name of the supplier or distributor issuing the quote"
      },
      "branch": {
        "type": "string",
        "description": "Supplier branch or location that issued the quote"
      },
      "quoteNumber": {
        "type": "string",
        "description": "The quote number"
      },
      "quoteDate": {
        "type": "string",
        "format": "date",
        "description": "Date the quote was issued"
      },
      "validUntil": {
        "type": "string",
        "format": "date",
        "description": "Date the quoted prices expire (valid until)"
      },
      "customer": {
        "type": "string",
        "description": "The customer the quote is addressed to"
      },
      "jobName": {
        "type": "string",
        "description": "Job or project name the materials are for"
      },
      "paymentTerms": {
        "type": "string",
        "description": "Payment terms, e.g. Net 30"
      },
      "subtotal": {
        "type": "number",
        "description": "Subtotal of all line items before tax and freight"
      },
      "tax": {
        "type": "number",
        "description": "Sales tax amount"
      },
      "freight": {
        "type": "number",
        "description": "Freight or delivery charge"
      },
      "total": {
        "type": "number",
        "description": "Quote total including tax and freight"
      },
      "currency": {
        "type": "string",
        "description": "Currency code, e.g. USD"
      },
      "lineItems": {
        "type": "array",
        "description": "The quoted line items",
        "items": {
          "type": "object",
          "properties": {
            "sku": {
              "type": "string",
              "description": "Supplier SKU or item number"
            },
            "description": {
              "type": "string",
              "description": "Item description"
            },
            "quantity": {
              "type": "number",
              "description": "Quantity quoted"
            },
            "unit": {
              "type": "string",
              "description": "Unit of measure, e.g. BDL, RL, EA, SQ"
            },
            "unitPrice": {
              "type": "number",
              "description": "Unit price"
            },
            "extended": {
              "type": "number",
              "description": "Extended line amount (quantity times unit price)"
            }
          }
        }
      }
    }
  },
  "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 "Extract supplier quote PDF line items to JSON". [Sign up or log in](https://console.apify.com/create-task-from-example/koaUIcCosEGTGGjzm) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Extract supplier quote PDF line items to JSON" 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 "Extract supplier quote PDF line items to JSON" 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 "Extract supplier quote PDF line items to JSON" 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`).
