80trust / 100

Document Extract

by API Acre in Documents & files

x402 APIPassing, checked 48 min ago

Extract clean text and metadata from supplied PDF, DOCX, HTML, Markdown, CSV, JSON, YAML, or plain-text documents.

POST https://apiacre.com/v1/document/extract

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
78 ms typical, 78 ms slowest 5%
Last check
48 min ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://apiacre.com/v1/document/extract" \
  -H "content-type: application/json" \
  -d '{"content_base64":"SGVsbG8gd29ybGQ=","filename":"report.txt"}'
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%2Fapiacre.com%2Fv1%2Fdocument%2Fextract
const res = await pay("https://apiacre.com/v1/document/extract", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"content_base64":"SGVsbG8gd29ybGQ=","filename":"report.txt"}),
});
console.log(await res.json());

Example input

{
  "content_base64": "SGVsbG8gd29ybGQ=",
  "filename": "report.txt"
}

Example output

{
  "data": {
    "characters": 11,
    "metadata": {
      "bytes": 11,
      "filename": "report.txt",
      "sha256": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c"
    },
    "text": "Hello world",
    "words": 2
  },
  "meta": {
    "cached": false,
    "duration_ms": 42,
    "next_actions": [
      {
        "authorization_required": true,
        "checkout_path": "/try/document.redact",
        "executes_automatically": false,
        "handoff_path": "/catalog/document.redact",
        "handoff_payment_required": false,
        "input_template": {
          "text": "$result.data.text"
        },
        "maximum_atomic_usdc": "10000",
        "method": "POST",
        "path": "/v1/document/redact",
        "price": "$0.01",
        "reason": "Remove common personal-data patterns from the extracted text before reuse.",
        "sample_path": "/samples/document.redact",
        "service": "document.redact",
        "title": "PII and personal-data redaction",
        "use_output": "Use result.data.text as the redacted document and inspect the returned counts."
      }
    ],
    "sources": [],
    "warnings": []
  },
  "request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
  "service": "document.extract",
  "version": "1"
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
48 min agoPassed40278 ms$0.01
6 h agoPassed402116 ms$0.01