80trust / 100

Pdf

by SiteCheck in Documents & files

x402 APIPassing, checked 4 h ago

PDF to text: send an https link or base64 (up to 15 MB) and get the text page by page plus title, author, page count and dates. Text PDFs only: a scanned PDF without a text layer answers 422 and is not charged.

POST https://api.sitecheck-api.workers.dev/api/pdf

Last 30 days

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

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.sitecheck-api.workers.dev/api/pdf" \
  -H "content-type: application/json" \
  -d '{"maxChars":20000,"url":"https://bitcoin.org/bitcoin.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%2Fapi.sitecheck-api.workers.dev%2Fapi%2Fpdf
const res = await pay("https://api.sitecheck-api.workers.dev/api/pdf", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"maxChars":20000,"url":"https://bitcoin.org/bitcoin.pdf"}),
});
console.log(await res.json());

Example input

{
  "maxChars": 20000,
  "url": "https://bitcoin.org/bitcoin.pdf"
}

Example output

{
  "author": null,
  "byPage": [
    {
      "page": 1,
      "text": "Bitcoin: A Peer-to-Peer Electronic Cash System..."
    }
  ],
  "chars": 21220,
  "createdAt": "2009-03-24T11:33:15Z",
  "creator": "Writer",
  "modifiedAt": null,
  "note": "Text layer only, no OCR.",
  "pages": 9,
  "pagesReturned": 9,
  "producer": "OpenOffice.org 2.4",
  "subject": null,
  "text": "Bitcoin: A Peer-to-Peer Electronic Cash System\nSatoshi Nakamoto...",
  "title": null,
  "truncated": true
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
4 h agoPassed40238 ms$0.003