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

# AI Document Data Extraction API

Send a file or document URL and get extracted results in a structured response. Route through Azure or ApyHub for document parsing workflows.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/ai/document/extract/document/file` | What it does Uploads a document file and runs document extraction using the requested service. The… | 550 |
| POST | `/ai/document/extract/document/url` | What it does Submits a document URL for extraction and routes the request to the selected service.… | 550 |

## About

## What it does
Document Extraction lets you send a file or a document URL and receive extracted document data back in a structured response. Choose whether to route the request to `azure` or `apyhub` with `requested_service`, and the API returns a `data` object containing the corresponding result under `azure` or `apyhub`.

Use the `/file` endpoint when you already have the document bytes ready to upload. The request accepts `file`, `requested_service`, and optional Azure settings such as `azure_key` and `azure_endpoint`. Use `/url` when the document is already hosted remotely; send the `url`, `requested_service`, and optional Azure configuration inside the `azure` object, including `key`, `region`, `endpoint`, `account_id`, and `access_token`.

Document Extraction is useful when you need to pull text or document content into downstream systems without building your own ingestion layer. For example, you can ingest PDFs from a storage bucket, process invoices or forms from a download link, and hand the returned document payload to search, review, or workflow steps.

The response is intentionally flexible: it returns a top-level `data` object with either an `azure` payload or an `apyhub` payload depending on the service you request. That makes it suitable for integrating document parsing into systems that need a consistent interface while keeping the provider-specific output available. 

| 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/document-extraction
