Scraper APIWeb
web.document
Read a public PDF: its text page by page in reading order, Markdown, tables as rows and columns, and its metadata.
- Id
web.document- Version
- 1
- Billed per
- request — 1 unit for a charged run
- Runs
- within one request
Start it with POST /v1/scrapers/web.document/runs. How runs work is in Running a scraper; what a run costs is in Usage and units.
Inputs
The fields of input. A field that is not listed here is refused.
| Field | Type | Description |
|---|---|---|
urlrequired | string | The PDF's address: http or https, on a public host name.Limit: at most 2048 characters. |
max_pages | integer | Read the first this many pages. A longer document is read that far and truncated says so.Limit: 1 to 500. Default: 100. |
ocr | boolean | Read scanned pages that have no text layer with OCR (English; the first ten such pages of the document). False lists them in unread_scans without reading them, which is faster.Default: true. |
timeout_s | number | Seconds for the whole run: fetching the file and reading it.Limit: 15 to 120. Default: 60. |
Record fields
Every record of a run has these fields. A value that is not known is null — never an empty string and never 0.
| Field | Type | Notes |
|---|---|---|
url | string | The address that was asked for. |
final_url | string | The address that answered, after redirects. |
status | integer | The HTTP status of the answer. |
content_type | string or null | The media type the server named, e.g. application/pdf; servers also send PDFs as application/octet-stream. |
bytes | integer | The file's size in bytes. |
sha256 | string | The SHA-256 of the file, to tell whether it changed since a previous read. |
title | string or null | The title in the file's metadata. |
author | string or null | The author in the file's metadata. |
subject | string or null | The subject in the file's metadata. |
keywords | string or null | The keywords in the file's metadata, as written. |
creator | string or null | The program the document was made with, from the metadata (e.g. Microsoft Word). |
producer | string or null | The program that wrote the PDF, from the metadata. |
created_at | string (date-time) or null | When the file says it was created. |
modified_at | string (date-time) or null | When the file says it was last changed. |
pdf_version | string or null | The PDF version the file declares, e.g. 1.7. |
page_count | integer | Pages in the document. |
pages_read | integer | Pages read: all of them, or the first max_pages. |
encrypted | boolean | True when the file is encrypted but opens without a password (an owner password that restricts printing or copying). A file that needs a password to open is not read.Default: false. |
tagged | boolean | True when the file declares itself tagged (structured for screen readers).Default: false. |
restrictions | array of string | What the file's owner does not allow, as its permission flags say: print, modify, copy_text, annotate, fill_forms, accessibility, assemble, print_high_quality. Empty when everything is allowed (a file that is not encrypted). Reported, not acted on: the file is read either way. |
markdown | string | The pages read, as Markdown: headings, paragraphs, lists and tables. |
text_length | integer | Characters of text in the pages read (each page has its own word_count). |
pages | array of object | Each page read, with its text in reading order. |
number (in pages[]) | integer | The page number, from 1. |
width (in pages[]) | number | The page's width in points (1/72 inch). |
height (in pages[]) | number | The page's height in points. |
text (in pages[]) | string | The page's text in reading order, one line of the page per line. |
text_source (in pages[]) | "text" | "ocr_layer" | "ocr" | "none" | Where the text comes from. text: the page's own text (on a scan that was not read, only what is printed over it, such as a stamp). ocr_layer: a scanned page whose file carries a hidden text layer made by OCR, read as it is. ocr: a scanned page we read with OCR. none: no text (a blank page, or a scan that was not read). |
scanned (in pages[]) | boolean | True when the page is an image of a page (a scan): images cover at least half of it and it shows almost no text of its own, or its text is a hidden OCR layer. |
ocr_confidence (in pages[]) | number or null | For a page we read with OCR: the engine's mean confidence in its words, 0 to 100. |
image_cover (in pages[]) | number | The share of the page covered by images, 0 to 1. |
word_count (in pages[]) | integer | Words in text. |
tables | array of object | The tables read from the pages, in page order, each with its confidence (high only when every label, heading and figure was placed without a guess) and its issues. |
page (in tables[]) | integer | The page it is on, from 1. |
header (in tables[]) | array of string or null | The column headings, one per column (null for a column without one); null when the table shows none. Headings written on several lines are joined. |
rows (in tables[]) | array of array of string | The rows, top to bottom, one cell per column as the page writes it ("$ 36,034", "(1,984)", "—"); null for an empty cell. A row with only its first cell is a section label, such as "Assets:". |
bbox (in tables[]) | array of number | Its box on the page in points, [x0, y0, x1, y1], measured from the bottom left corner. |
confidence (in tables[]) | "high" | "low" | high when every row's label, every heading and every figure was placed without a guess. low when one was not, or when no heading was found (issues says which): check a low table against the page before using its numbers.Default: "high". |
issues (in tables[]) | array of string | What could not be placed with certainty, each making the table low: figures_joined (two figures in one cell), signs_apart (signs not joined to their figures), figures_in_labels, words_in_figures (words among the figures, such as a form's lines read across its boxes), labels_missing (no column of labels was found), labels_uncertain (a label alone on its line could head the rows below or go on in the next), heading_unplaced (which columns a heading stands over could not be told, or two columns came out under one heading), header_incomplete and no_header (no column headings were found). And one that is only said: heading_spans_columns (a heading over several columns, written over each). |
outline | array of object | The document's outline (its bookmarks), when it has one; the first 500 entries. |
level (in outline[]) | integer | Its depth in the outline, from 1. |
title (in outline[]) | string | The entry's title. |
page (in outline[]) | integer or null | The page it leads to, from 1; null when it leads nowhere in the file. |
unread_scans | array of integer | Scanned pages without a text layer that were not read: OCR was not asked for, the limit of pages read with OCR was reached, or OCR found no text. |
unreadable_pages | array of integer | Pages the document lists but that cannot be loaded (a damaged page tree); they have no entry in pages. |
truncated | boolean | True when not every page was read (max_pages, or the text limit).Default: false. |
fetched_at | string (date-time) | When the file was fetched, in UTC. |
Example request
# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/web.document/runs?wait=60" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"url":"https://www.federalreserve.gov/releases/h41/current/h41.pdf","max_pages":1}}'
# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY"from enrichednow import EnrichedNow
client = EnrichedNow() # reads ENRICHEDNOW_API_KEY
# Start a run, wait for it to end, and get its records
result = client.scrape("web.document", {
"url": "https://www.federalreserve.gov/releases/h41/current/h41.pdf",
"max_pages": 1,
})
print(result.run.id, result.run.status, result.run.record_count)
# Read its records: pages are fetched as you go
for record in result.records:
print(record)Install it with pip install enrichednow, then save as run.py and run python3 run.py
import EnrichedNow from "enrichednow";
const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("web.document", {
url: "https://www.federalreserve.gov/releases/h41/current/h41.pdf",
max_pages: 1,
});
console.log(run.id, run.status, run.record_count);
// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);Install it with npm install enrichednow, then save as run.mjs and run node run.mjs
package main
import (
"context"
"fmt"
"log"
"time"
enrichednow "github.com/enrichednow/enrichednow-go"
)
func main() {
client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
if err != nil {
log.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
// Start a run, wait for it to end, and get its records
run, records, err := client.Scrape(ctx, "web.document", map[string]any{"url": "https://www.federalreserve.gov/releases/h41/current/h41.pdf", "max_pages": 1})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Status, run.RecordCount)
// Read its records: pages are fetched as you go
for records.Next() {
fmt.Println(string(records.Current()))
}
if err := records.Err(); err != nil {
log.Fatal(err)
}
}Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go
import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;
public class Run {
public static void main(String[] args) {
EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
ScrapeResult result = client.scrape("web.document", Map.of("url", "https://www.federalreserve.gov/releases/h41/current/h41.pdf", "max_pages", 1));
System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
// Read its records: pages are fetched as you go
for (Map<String, Object> record : result.records()) {
System.out.println(record);
}
}
}Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java
enrichednow run web.document --input url=https://www.federalreserve.gov/releases/h41/current/h41.pdf --input max_pages=1Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh
It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.
The body on its own:
{
"input": {
"url": "https://www.federalreserve.gov/releases/h41/current/h41.pdf",
"max_pages": 1
}
}Example response
The run, once it has ended. A run that has not ended within wait comes back with 202 and the status queued or running.
{
"id": "run_841742f37553189ff9c27ba1",
"scraper_id": "web.document",
"scraper_version": 1,
"status": "ok",
"reason": null,
"input": {
"url": "https://www.federalreserve.gov/releases/h41/current/h41.pdf",
"max_pages": 1
},
"record_count": 1,
"units": 1,
"units_per_request": 1,
"units_per_record": null,
"units_per_page": null,
"diagnostics": {
"requests": 1,
"bytes": 259214,
"wall_ms": 885,
"facts": {}
},
"created_at": "2026-11-16T22:37:50.170950Z",
"started_at": "2026-11-16T22:37:50.178331Z",
"finished_at": "2026-11-16T22:37:51.066313Z"
}Its records, from GET /v1/runs/{id}/records. The record is a real one: this scraper's own parser read it from a page recorded from the site.
{
"records": [
{
"url": "https://www.federalreserve.gov/releases/h41/current/h41.pdf",
"final_url": "https://www.federalreserve.gov/releases/h41/current/h41.pdf",
"status": 200,
"content_type": "application/pdf",
"bytes": 190004,
"sha256": "02b69213c7e62b96d49913bb7372da7b23de10e427eaabb5118652781226b439",
"title": null,
"author": null,
"subject": null,
"keywords": null,
"creator": "Microsoft Office Word",
"producer": "Aspose.Words for .NET 21.3.0",
"created_at": "2023-03-16T13:38:00Z",
"modified_at": "2026-10-21T16:04:00Z",
"pdf_version": "1.7",
"page_count": 11,
"pages_read": 1,
"encrypted": false,
"tagged": false,
"restrictions": [],
"markdown": "# FEDERAL RESERVE statistical release\n\nH.4.1\n\n## Factors Affecting Reserve Balances of Depository Institutions and Condition Statement of Federal Reserve Banks November 19, 2026\n\n1. Factors Affecting Reserve Balances of Depository … [truncated]",
"text_length": 2085,
"pages": [
{
"number": 1,
"width": 612,
"height": 792,
"text": "FEDERAL RESERVE statistical release\nH.4.1\nFactors Affecting Reserve Balances of Depository Institutions and\nCondition Statement of Federal Reserve Banks November 19, 2026\n1. Factors Affecting Reserve Balances of Depository Institutions … [truncated]",
"text_source": "text",
"scanned": false,
"ocr_confidence": null,
"image_cover": 0.012,
"word_count": 344
}
],
"tables": [
{
"page": 1,
"header": [
"Reserve Bank credit, related items, and reserve balances of depository institutions at Federal Reserve Banks",
"Averages of daily figures Week ended Nov 18, 2026",
"Averages of daily figures Change from week ended Nov 11, 2026"
],
"rows": [
[
"Reserve Bank credit",
"6,705,670",
"-1,792"
],
[
"Securities held outright1",
"6,472,783",
"+3,620"
],
[
"U.S. Treasury securities",
"4,586,939",
"+3,645"
]
],
"bbox": [
35.2,
273.9,
571.7,
618.1
],
"confidence": "high",
"issues": [
"heading_spans_columns"
]
}
],
"outline": [],
"unread_scans": [],
"unreadable_pages": [],
"truncated": true,
"fetched_at": "2026-11-25T06:04:10.365601Z"
}
],
"next_cursor": null
}What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with … [truncated].
- Shortened:
markdown: 2,513 characters, the first 230 shown. - Shortened:
pages[0].text: 2,085 characters, the first 235 shown. - Shortened:
tables[0].header: 5 items, the first 3 shown. - Shortened:
tables[0].rows: 29 items, the first 3 shown. - Shortened:
tables[0].rows[0]: 5 items, the first 3 shown. - Shortened:
tables[0].rows[1]: 5 items, the first 3 shown. - Shortened:
tables[0].rows[2]: 5 items, the first 3 shown.
A run does not always end ok. Results and statuses lists every status and the reasons every scraper shares; the reasons of the Web scrapers are in their own section there.