Pdf Extract
by Nero Labs Agent Tools in Search & web
Extracts the text (plain or Markdown) and tables from up to 10 PDF links, with page count, title, author and dates, and flags PDFs that are scans with no text layer (use /ocr for those). Choose a page range and a length limit. $0.01 per PDF. Runs nerolabs/dataset-pdf-extract.
https://x402-agent-tools.nerolabs.workers.dev/pdf-extract- Price
- $0.01
- per call in USDC
- Uptime
- 98.0%
- last 30 days
- Response time
- 245 ms
- 1.1 s slowest 5%
- Last check
- Passed
- 5 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://x402-agent-tools.nerolabs.workers.dev/pdf-extract
Each call costs $0.01 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://x402-agent-tools.nerolabs.workers.dev/pdf-extract
content-type: application/json
{
"lastPage": 1,
"maxCharsPerPdf": 2000,
"pdfUrls": [
"https://www.irs.gov/pub/irs-pdf/fw9.pdf"
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
extractTables | boolean | No | Reconstruct tables from the position of the text on the page and return them as rows of cells. Plain text extraction loses table structure completely, so this is where most of the value is for invoices, statements and reports. Default: true. |
firstPage | integer | No | Start reading at this page (1 is the first). Leave empty to read from the beginning. |
includePageText | boolean | No | Add a 'pages' array with each page's text separately, on top of the combined text. Useful for citing a page number, and it makes rows considerably larger. Default: false. |
lastPage | integer | No | Stop reading after this page. Leave empty to read to the end. Handy for taking only the first few pages of long reports. |
maxCharsPerPdf | integer | No | Cuts the returned text at this many characters so one very long document cannot produce an unusable dataset row. The row records whether it was cut. Default: 200000. |
minTableRows | integer | No | Minimum rows before a grid counts as a table. The default of 3 is a deliberate noise floor, because printed forms are built from aligned two-line boxes and report dozens of meaningless two-row 'tables'. Lower it to 2 for invoices whose line items are one header plus one row. Default: 3. |
pdfUrls | array | Yes | A plain list of PDF links, for a quick one-off run with no spreadsheet. Use the dataset, file or Google Sheet inputs above to keep your own columns alongside the results. |
textFormat | string | No | 'Plain text' returns the reading-order text. 'Markdown' appends any detected tables as Markdown tables after the text, which is the friendliest shape for feeding an LLM. 'None' skips the text entirely, for runs that only want page counts, metadata or tables. One of: plain, markdown, none. Default: "plain". |
Example response
The provider's example. We can't check it without paying.
{
"_example_note": "Real output, trimmed: long lists cut to their first items, fields and text shortened.",
"count": 1,
"rows": [
{
"charCount": 5659,
"extractStatus": "ok",
"fileSizeKb": 138,
"hasTextLayer": true,
"ocrRequired": false,
"pageCount": 6,
"pdfAuthor": "SE:W:CAR:MP",
"pdfTitle": "Form W-9 (Rev. March 2024)",
"pdfUrl": "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
"resolvedUrl": "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
"statusDetail": null,
"tableCount": 3,
"textTruncated": true,
"wordCount": 933
}
]
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.01.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://x402-agent-tools.nerolabs.workers.dev/pdf-extract' \
-H 'content-type: application/json' \
--data-raw '{"lastPage":1,"maxCharsPerPdf":2000,"pdfUrls":["https://www.irs.gov/pub/irs-pdf/fw9.pdf"]}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://x402-agent-tools.nerolabs.workers.dev/pdf-extract' \
-H 'content-type: application/json' \
--data-raw '{"lastPage":1,"maxCharsPerPdf":2000,"pdfUrls":["https://www.irs.gov/pub/irs-pdf/fw9.pdf"]}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.01 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.01" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.01 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402-agent-tools.nerolabs.workers.dev%2Fpdf-extract&method=POST
const res = await pay("https://x402-agent-tools.nerolabs.workers.dev/pdf-extract", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"lastPage": 1,
"maxCharsPerPdf": 2000,
"pdfUrls": [
"https://www.irs.gov/pub/irs-pdf/fw9.pdf"
]
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.01 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.01"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://x402-agent-tools.nerolabs.workers.dev/pdf-extract",
json={
"lastPage": 1,
"maxCharsPerPdf": 2000,
"pdfUrls": [
"https://www.irs.gov/pub/irs-pdf/fw9.pdf",
],
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 5 h ago | Passed | 402 | 77 ms | $0.01 |
| 37 h ago | Timed out | - | - | - |
| 3 days ago | Timed out | - | - | - |
| 4 days ago | Passed | 402 | 451 ms | $0.01 |
| 4 days ago | Passed | 402 | 153 ms | $0.01 |
Show 10 older checks
| 5 days ago | Passed | 402 | 683 ms | $0.01 |
| 5 days ago | Passed | 402 | 706 ms | $0.01 |
| 6 days ago | Passed | 402 | 647 ms | $0.01 |
| 6 days ago | Passed | 402 | 133 ms | $0.01 |
| 6 days ago | Passed | 402 | 225 ms | $0.01 |
| 7 days ago | Passed | 402 | 91 ms | $0.01 |
| 7 days ago | Passed | 402 | 519 ms | $0.01 |
| 7 days ago | Passed | 402 | 126 ms | $0.01 |
| 7 days ago | Passed | 402 | 1.1 s | $0.01 |
| 8 days ago | Passed | 402 | 663 ms | $0.01 |
History
| 22 Oct 2026 | Payment address changed from 0xbe3942b2519520Ae4F3963273F7D7f0440D67292 to 0xA969a3127DcC74B2989a4b4e45Ae61B81093164A |