x402-extract / x402-fields
LIVE · eip155:8453 · x402 Bazaar indexed

Pay-per-call extraction for AI agents.

Two endpoints. No API keys, no accounts, no subscriptions. Your agent signs a USDC payment on Base and gets data back. That's the whole integration.

It returns null instead of hallucinating.

Every field you request comes back — found, with a confidence score, or null and listed in missing. No silent failures. No invented text. Boring infrastructure that does what it says.

Endpoints

Unpaid requests return 402 with payment instructions. Pay with any x402 v2 client and retry — the client handles the handshake.

POST/extract$0.01

URL in, clean markdown out. Readable article text from any public web page.

Input

{"url": "https://example.com/article",
  "format": "markdown" | "text"}

Output

{ "title": "...", "final_url": "...",
  "content": "...", "word_count": 842,
  "fetched_at": "2026-09-28T..." }

curl

curl -X POST https://x402-extract-wg5z.onrender.com/extract \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com/article",
       "format":"markdown"}'
# unpaid -> 402 + payment instructions
# paid   -> 200 + the article as markdown
POST/extract-fields$0.02

Text in, structured JSON out. Deterministic regex across 15 fields. No LLM, no model in the loop.

Input

{"text": "Invoice #INV-42 from Acme Ltd...",
  "fields": ["invoice_no","company","amount"]}

Output

{ "extracted": { "invoice_no": "INV-42",
    "company": "Acme Ltd",
    "amount": "1234.50", "phone": null },
  "found": 3, "total": 4,
  "missing": ["phone"],
  "confidence": { "invoice_no": 0.8, ... } }

Fields

email · phone · url · date · amount · currency · invoice_no · order_id · name · company · address · zip · country · percentage · quantity

Why regex, not an LLM

Calling it from an agent

Official x402 Python package. The 402 → sign → retry loop is handled for you.

import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

client = x402ClientSync()
register_exact_evm_client(client,
    EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as s:
    r = s.post("https://x402-extract-wg5z.onrender.com/extract-fields", json={
        "text": "Invoice #INV-42 from Acme Ltd. Total: $1,234.50.",
        "fields": ["invoice_no", "company", "amount"]})
    print(r.json()["extracted"])
    # {'invoice_no': 'INV-42', 'company': 'Acme Ltd', 'amount': '1234.50'}

Try before you pay

Two free pre-checks. Validate the input before spending the cent.

GET/validatefree

Checks whether a URL will extract cleanly — before you pay $0.01.

https://x402-extract-wg5z.onrender.com/validate?url=https://example.com
GET/validate-fieldsfree

Dry-runs field extraction on your text — before you pay $0.02.

https://x402-extract-wg5z.onrender.com/validate-fields?fields=email,phone&text=...

Machine-readable listing

Both endpoints are indexed in the x402 Bazaar (Coinbase CDP). This is the same JSON agents query to discover us — prices, schemas, and example payloads included.

https://api.cdp.coinbase.com/platform/v2/x402/discovery/merchant?payTo=0xea6c6d0361a758e51004fc5b0c31a3c6b2408858