Transaction Explainer

Decode an on-chain transaction and explain it in plain English. $0.02 per request.

What it does

Send a transaction hash. Get back the decoded on-chain facts (sender, recipient, native value, status, gas fee, and any ERC-20 token transfers detected in the logs) plus a short plain-English explanation grounded strictly in those facts.

Endpoint

MethodPOST
Path/explain
Content-Typeapplication/json

Fields

fieldrequireddescription
tx_hashyesThe transaction hash, 0x-prefixed
chainnoOne of ethereum (default), base, polygon, arbitrum, optimism, bnb

Example

curl -X POST https://transaction-explainer.pdfextractapi.workers.dev/explain \
  -H "Content-Type: application/json" \
  -d '{"tx_hash": "0x...", "chain": "ethereum"}'

Example response

{
  "decoded": {
    "chain": "ethereum",
    "tx_hash": "0x...",
    "found": true,
    "from": "0x...",
    "to": "0x...",
    "value_native": "0.5",
    "native_symbol": "ETH",
    "status": "success",
    "is_contract_interaction": true,
    "gas_used": "65000",
    "tx_fee_native": "0.0009",
    "token_transfers": [
      { "token_address": "0x...", "token_symbol": "USDC", "from": "0x...", "to": "0x...", "amount": "50000000" }
    ]
  },
  "explanation": "This transaction transferred 50 USDC from one wallet to another and succeeded, paying about 0.0009 ETH in gas."
}

Errors

Errors return a non-200 status with { "error": { "code": "...", "message": "..." } }. Common codes: invalid_tx_hash, unknown_chain. A hash that doesn't exist on the given chain returns 200 with decoded.found: false.

Payment

This endpoint is paid per-request via the x402 protocol (HTTP 402 + USDC). Unpaid requests receive a 402 response with payment instructions.

Try it in your browser