Skip to content
document · documents · data · document · pdf · docx · text · extraction

Document extraction

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

$0.01 USDCBase + Solanax402 v2POST
Pay $0.01 USDC and run in your browserView free result sample

Endpoint

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

Send the JSON body below. An unpaid request returns HTTP 402 with a PAYMENT-REQUIRED header; an x402-compatible buyer signs the requirement and retries with PAYMENT-SIGNATURE.

Pay $0.01 USDC and run in your browser

Official Coinbase agent path

Coinbase Agentic Wallet can satisfy this x402 request in one command. Running it may pay automatically, so --max-amount is fixed to $0.01 USDC in atomic units. Copying the command does not install, authenticate, sign, or pay; review the request and use a separate low-value wallet before running it.

npx --yes awal@latest x402 pay https://apiacre.com/v1/document/extract \
  -X POST \
  -d '{"filename":"report.txt","content_base64":"SGVsbG8gd29ybGQ="}' \
  --max-amount 10000 \
  --json

Coinbase pay-for-service documentation · Buyer setup and wallet safety

Alternative third-party AgentCash commands

Run check first without payment. Its fetch command may automatically pay up to the exact listed price.

npx --yes agentcash@latest check https://apiacre.com/v1/document/extract
npx --yes agentcash@latest fetch https://apiacre.com/v1/document/extract \
  --method POST \
  --header 'content-type: application/json' \
  --body '{"filename":"report.txt","content_base64":"SGVsbG8gd29ybGQ="}' \
  --payment-protocol x402 \
  --payment-network base \
  --max-amount 0.010

AgentCash CLI documentation

Input example

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

Response shape

View free static sample JSON

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

Complete recipes using this API

These buyer-controlled recipes connect this service to compatible API Acre results. Every step has its own exact price and requires separate authorization.

Continue this workflow

These optional follow-ups use this result in a larger workflow. Each call shows a fresh x402 challenge and requires separate buyer authorization.

Try the payment challenge

curl -i -X POST 'https://apiacre.com/v1/document/extract' \
  -H 'content-type: application/json' \
  --data '{"filename":"report.txt","content_base64":"SGVsbG8gd29ybGQ="}'