81trust / 100

Dev Pdf To Text

by AgentTools in Documents & files

x402 APIPassing, checked 1 h ago

Fetch a PDF (by URL, SSRF-guarded) or accept it as base64 and extract all readable text with page count. Deterministic parsing — no language model, so nothing is invented. Text-based PDFs only; scanned images need OCR (not included). Use this when an agent needs to extract readable text from any PDF — agents can't read PDFs.

GET https://agenttools-hub.vercel.app/api/v1/dev/pdf-to-text

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
143 ms typical, 143 ms slowest 5%
Last check
1 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://agenttools-hub.vercel.app/api/v1/dev/pdf-to-text?url=https%3A%2F%2Fwww.w3.org%2FWAI%2FER%2Ftests%2Fxhtml%2Ftestfiles%2Fresources%2Fpdf%2Fdummy.pdf"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagenttools-hub.vercel.app%2Fapi%2Fv1%2Fdev%2Fpdf-to-text
const res = await pay("https://agenttools-hub.vercel.app/api/v1/dev/pdf-to-text?url=https%3A%2F%2Fwww.w3.org%2FWAI%2FER%2Ftests%2Fxhtml%2Ftestfiles%2Fresources%2Fpdf%2Fdummy.pdf");
console.log(await res.json());

Example input

{
  "url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
}

Example output

{
  "result": {
    "answer": "live data — call the API",
    "value": null
  },
  "tool": "pdf-to-text"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402154 ms$0.01
6 h agoPassed402143 ms$0.01