apyhub
ARTIFICIAL INTELLIGENCE · DATA EXTRACTION

OCR Document Data Extraction API

What it does

Read Data Extraction pulls structured read data from a document URL or uploaded file and returns parsing output you can work with in your app. Send a PDF or other supported file input, choose apyhub or azure, and get the extracted result back in the data object.

Use POST /url when your source is a file at a public URL, or POST /file when you want to upload the document directly. Both endpoints accept an optional Azure configuration: key, region, endpoint, account_id, and access_token. You can also set requested_service to select the parser, with apyhub as the default.

The response keeps the service output separated under data.azure and data.apyhub. That makes it easier to compare the raw Azure Document Intelligence output with ApyHub's structured Read Layout Transcription output, or to route the result into your own extraction pipeline.

Use Read Data Extraction for document ingestion workflows, OCR-backed content capture, or internal tools that need to turn read-heavy files into machine-readable data without building the parsing layer yourself.

▣ ENDPOINT 01 / 02
POST
Extract read data (URL input)
https://api.eu.apyverse.com/apyhub/ocr-data-extraction/url

QUICKSTART

GUIDE

Quickstart

Send a PDF URL to extract read data from the page or document.

curl -X POST "https://api.eu.apyverse.com/apyhub/ocr-data-extraction/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/read.pdf"
  }'

What you'll get back

Returns a JSON object with a data object field. That data object may contain an azure object with raw Azure Document Intelligence parsing output, and/or an apyhub object with structured ApyHub Read Layout Transcription parsing output.

{
  "data": {
    "azure": {},
    "apyhub": {}
  }
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
azure
Custom credentials for Azure services.
Azure subscription key.
Azure service region.
Azure endpoint URL.
Azure account ID.
OAuth access token for Azure service.

About this endpoint

What it does

Extracts read data from a document at the provided URL and returns a JSON object with parsing results for azure and apyhub under data.

Request Body

ParameterTypeMandatoryDescription
urlStringYesDocument URL to process. Must be a URI.
azureObjectNoCustom credentials for Azure services. Nested fields: azure.key, azure.region, azure.endpoint, azure.account_id, azure.access_token.
azure.keyStringNoAzure subscription key.
azure.regionStringNoAzure service region.
azure.endpointStringNoAzure endpoint URL.
azure.account_idStringNoAzure account ID.
azure.access_tokenStringNoOAuth access token for Azure service.
requested_serviceENUMNoWhich service to use. Allowed values: azure, apyhub. Default: apyhub.

Response

Returns a JSON object with a data object field. data may include azure and apyhub object fields containing the corresponding parsing outputs.

ParameterTypeMandatoryDescription
dataObjectNoResult wrapper containing parsing output fields.
data.azureObjectNoRaw Azure Document Intelligence parsing output.
data.apyhubObjectNoStructured ApyHub Read Layout Transcription parsing output.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
POST
Extract read data (file upload)
https://api.eu.apyverse.com/apyhub/ocr-data-extraction/file

QUICKSTART

GUIDE

Quickstart

Upload a file to extract read data with ApyHub, using the default apyhub service.

curl -X POST "https://api.eu.apyverse.com/apyhub/ocr-data-extraction/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/document.pdf"

What you'll get back

Returns a JSON object with a data object. That data object may contain azure with the raw Azure Document Intelligence parsing output, and/or apyhub with the structured ApyHub Read Layout Transcription parsing output.

{
  "data": {
    "azure": {},
    "apyhub": {}
  }
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*

About this endpoint

What it does

Uploads a file for read-data extraction and returns parsing output in a JSON response. You can optionally provide Azure-related configuration and choose whether to request the azure or apyhub parsing service.

Request Body

ParameterTypeMandatoryDescription
fileStringYesBinary file upload.
azure_keyStringNoAzure key.
azure_regionStringNoAzure region.
azure_endpointStringNoAzure endpoint URL.
azure_account_idStringNoAzure account ID.
requested_serviceENUMNoService to use. Allowed values: azure, apyhub. Default: apyhub.
azure_access_tokenStringNoAzure access token.

Response

Returns a JSON object with a data object field. The data object may contain azure and/or apyhub object fields with the corresponding parsing output.

ParameterTypeMandatoryDescription
dataObjectNoResponse wrapper for parsing results.
data.azureObjectNoRaw Azure Document Intelligence parsing output.
data.apyhubObjectNoStructured ApyHub Read Layout Transcription parsing output.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.