---
title: AI Document Invoice Data Extraction API
slug: extract-invoice-data
url: https://apyhub.com/apyhub/service/extract-invoice-data
provider: ApyHub
categories: [Artificial Intelligence, Data Extraction, Finance]
auth: api_key
---

# AI Document Invoice Data Extraction API

Extract structured invoice data from a file or URL. Returns ApyHub or Azure invoice parsing output for accounts payable and ingestion workflows.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/ai/document/extract/invoice/file` | What it does Uploads an invoice file and returns parsed invoice data in a JSON object. The response… | 500 |
| POST | `/ai/document/extract/invoice/url` | What it does Extracts invoice data from a document available at a URL and returns parsed results in… | 500 |

## About

## What it does
Invoice Extraction pulls structured invoice data from a PDF or document URL and returns either ApyHub's parsed invoice output or raw Azure Document Intelligence output, depending on the service you request.

Send a file to `POST /file` or pass a document URL to `POST /url`. Both endpoints accept a `requested_service` value of `azure` or `apyhub`. The file endpoint also supports Azure credentials in the request body: `azure_key`, `azure_region`, `azure_endpoint`, `azure_account_id`, and `azure_access_token`. The URL endpoint accepts an `azure` object with `key`, `region`, `endpoint`, `account_id`, and `access_token`.

The response wraps the extraction result in `data.azure` or `data.apyhub`. Use the Azure branch when you need the raw parsing output from Document Intelligence. Use the ApyHub branch when you want the structured invoice extraction response for downstream automation, such as accounts payable workflows, expense ingestion, or invoice indexing.

Invoice Extraction fits into systems that need to turn invoices into machine-readable data without building your own document parser. It gives you a single interface for file uploads and remote documents, with output shaped for programmatic processing. 

| Provider (requested_service) | Atoms |
|------------------------------|------:|
| Azure                        |   500 |
| ApyHub                       |  2000 |

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/extract-invoice-data
