webcap

Developer guide

Quick Start: Capture the web in 3 steps

No API keys. No accounts. Just HTTP calls. Pay $0.001/screenshot or $0.01/extract with crypto (USDC on Base, gasless). No wallet? Buy credits with email.

1 Try the free preview (no payment)

See what webcap extracts from any URL — completely free, no wallet needed:

terminal
# Free preview — no payment required
curl "https://webcap.shoutsid.fyi/v1/extract/preview?url=https://example.com/"
→ 200 {"preview":{"title":"Example Domain","headings":[...],"links":[...]},"truncated":true}
Tip: The preview is truncated — you get headings, links, and a markdown slice. The full extract (step 2) gives you everything including OG tags, full markdown, and batch support for up to 50 URLs.

See what a full extract gives you

Here's the actual output from a single $0.01 extract call — this is the real data you get, not a simulation:

extract output — Hacker News (real data)
Loading demo…
All headings (not truncated)
All links with text
Full markdown
Paragraphs
Images
Word count

2 Make a paid request (x402)

Call the paid endpoint. The server responds with HTTP 402 containing a payment challenge:

terminal — extract
# Step 2a: Send request, get 402 challenge
curl -si -X POST "https://webcap.shoutsid.fyi/v1/x402/extract" \
  -H 'content-type: application/json' \
  -d '{"urls":["https://example.com/"]}'
→ 402 Payment Required
   x-pay-providers-response: {"x402Version":2,"accepts":[{...}],...}

Now sign the payment with your wallet:

terminal — sign payment
# Step 2b: Sign the EIP-3009 transfer (gasless, no ETH needed)
# Your x402 client signs a transferWithAuthorization:
#   from: your wallet
#   to: merchant wallet
#   value: 10000 (= $0.01)
#   asset: USDC on Base

# Step 2c: Retry with payment header
curl -si -X POST "https://webcap.shoutsid.fyi/v1/x402/extract" \
  -H 'content-type: application/json' \
  -H 'PAYMENT-SIGNATURE: <your-signed-header>' \
  -d '{"urls":["https://example.com/"]}'
→ 200 {"results":[{"url":"https://example.com/","title":"Example Domain","markdown":"# Example Domain\n..."}]}

3 Use a client library (recommended)

Most developers don't sign x402 challenges manually. Use a client library that handles the flow automatically:

JavaScript / TypeScript
# Install the x402 client
npm install @x402/axios

# Use it with any HTTP client
import { wrapAxiosWithPayment } from '@x402/axios';
import { privateKeyToAccount } from 'viem/accounts';

const account = privateKeyToAccount('0x...');  // your private key
const client = wrapAxiosWithPayment(axios, { account });

# Now make requests — payment is automatic
const { data } = await client.post('https://webcap.shoutsid.fyi/v1/x402/extract', {
  urls: ['https://example.com/']
});
console.log(data.results[0].markdown);
What you need: A wallet with USDC on Base (even a few cents is enough for dozens of calls). No ETH gas needed — x402 uses gasless EIP-3009 transfers. Get test USDC on Base Sepolia from a faucet.

Set up your wallet

Quick wallet checklist

  • Any EOA wallet (MetaMask, Rabby, Frame, etc.)
  • USDC on Base network (chain ID 8453)
  • No ETH needed — x402 transfers are gasless
  • $0.01 per extract call (batch up to 50 URLs)
  • $0.001 per screenshot (PNG/JPEG/PDF)

Next steps