---
title: Document Extraction
slug: document-extraction
url: https://apyverse.com/apyhub/service/document-extraction
provider: ApyHub
categories: [Artificial Intelligence, Data Extraction, Image Processing]
auth: api_key
---

# Document Extraction

Extract document data from a URL or uploaded file. Returns Azure or ApyHub output for invoices, forms, reports, and other documents.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `ai/document/extract/document/url` | What it does Extracts document data from a file available at a URL. You choose the extraction servi… | 500 |
| POST | `ai/document/extract/document/file` | What it does Uploads a document file and runs document extraction using the requested service. The… | 500 |

## About

## What it does
Document Extraction lets you send a PDF or other document by URL or file upload and get extracted document data back. Choose the extraction backend with `requested_service`, either `azure` or `apyhub`.

Use `POST /url` when the document is already hosted online. Send `url` and `requested_service`, and include the optional `azure` object when you need Azure-specific settings such as `key`, `region`, `endpoint`, `account_id`, or `access_token`. Use `POST /file` when you want to upload the document directly as binary data. That endpoint accepts `file`, `requested_service`, and the optional Azure fields `azure_key` and `azure_endpoint`.

The response is consistent across both endpoints: a `data` object containing an `azure` object when `requested_service` is `azure`, or an `apyhub` object when `requested_service` is `apyhub`. The service returns the extraction result in whichever backend object you requested.

Use Document Extraction when you need to turn invoices, forms, statements, or scanned reports into machine-readable data without writing your own document parsing pipeline. It fits ingestion workflows, records processing, and any app that needs document content pulled from a URL or upload.

## Usage

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