apyhub
ARTIFICIAL INTELLIGENCE · DATA EXTRACTION

AI Document Table Data Extraction API

Hosted on ApyHub

What it does

Table Extraction helps you pull tabular data out of a file or a URL. Send a binary file to POST /file or a document URL to POST /url, and choose whether you want ApyHub's structured table extraction output or Azure Document Intelligence output by setting requested_service.

Use it when you need to turn PDFs or other table-bearing documents into machine-readable data for downstream processing. The file-based endpoint accepts file uploads and optional Azure credentials such as azure_key, azure_region, azure_endpoint, azure_account_id, and azure_access_token. The URL-based endpoint accepts url plus optional Azure credentials in an azure object. Both endpoints return a data object with azure and apyhub results, so you can compare the raw Azure parsing output with the structured ApyHub extraction output.

That makes Table Extraction useful for invoice capture, report ingestion, and spreadsheet-like data collection from documents that are not already structured. Build workflows that move table rows into your database, validate extracted line items, or feed document data into analytics pipelines.

If you already have documents stored remotely, use the URL endpoint. If you're processing uploads directly in your app, use the file endpoint.

Provider (requested_service)Atoms
Azure500
ApyHub2000
▣ ENDPOINT 01 / 02
POST
Extract table data (file upload)
http://localhost:8080/apyhub/extract-table-data/file
QUICKSTARTGUIDE

Quickstart

Upload a table image or document for extraction with the required file field.

curl -X POST "http://localhost:8080/apyhub/extract-table-data/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file" \
  -F "requested_service=apyhub"

What you'll get back

Returns a JSON object with a data object field. Inside data, the response may include azure for raw Azure Document Intelligence parsing output and/or apyhub for structured ApyHub table extraction 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

Extracts table data from a document at the provided URL and returns parsed results in a JSON object. You can optionally supply Azure credentials and choose whether to request Azure or ApyHub processing through requested_service.

Request Body

ParameterTypeMandatoryDescription
urlStringYesDocument URL to extract table data from. Must be a valid URI.
azureObjectNoCustom credentials for Azure services. Contains optional fields: key, region, endpoint, account_id, 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_serviceENUMNoService to use. Allowed values: azure, apyhub. Default: apyhub.

Response

Returns a JSON object with a data object field. The data object may contain azure and/or apyhub fields, each of which is an object holding the corresponding table extraction output.

ParameterTypeMandatoryDescription
dataObjectNoResponse wrapper containing extraction results. May include azure and apyhub objects.
data.azureObjectNoRaw Azure Document Intelligence parsing output.
data.apyhubObjectNoStructured ApyHub Table Extraction 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.

▣ ENDPOINT 02 / 02
POST
Extract table data (URL input)
http://localhost:8080/apyhub/extract-table-data/url
QUICKSTARTGUIDE

Quickstart

Extract table data from a PDF or web page by sending its URL.

curl -X POST "http://localhost:8080/apyhub/extract-table-data/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.pdf", "requested_service":"apyhub"}'

What you'll get back

Returns a JSON object with a data object. Inside data, the response may include an apyhub object for structured table extraction output and/or an azure object for raw Azure Document Intelligence parsing output.

{
  "data": {
    "apyhub": {},
    "azure": {}
  }
}
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 table data from a document or webpage referenced by a URL and returns parsed output in a JSON object. You can request the result from either Azure or ApyHub by setting requested_service; if omitted, it defaults to apyhub.

Request Body

ParameterTypeMandatoryDescription
urlStringYesSource URL to the table document. Must be a valid URI.
azureObjectNoCustom credentials for Azure services. See schema for nested fields.
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_serviceENUMNoService to use for extraction. Allowed values: azure, apyhub. Default: apyhub.

Response

Returns a JSON object with a data object field. Inside data, the response may include an azure object with raw Azure Document Intelligence parsing output and/or an apyhub object with structured ApyHub Table Extraction parsing output.

ParameterTypeMandatoryDescription
dataObjectNoResponse wrapper. May contain azure and/or apyhub objects.
data.azureObjectNoRaw Azure Document Intelligence parsing output.
data.apyhubObjectNoStructured ApyHub Table Extraction parsing output.

Body

Name
Type
Description
bodyREQUIRED
object
▣ 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.