Pay-per-call extraction primitives for autonomous agents.

Four small endpoints. Three monetization channels off one auth dependency. No signup required for x402.

Endpoints

All endpoints accept JSON and return JSON. Auth via Bearer key, RapidAPI proxy header, or x402 payment.

Endpoint What it does Cost / call
POST /api/v1/extract/markdown URL → clean Markdown. No JS render; SSRF-guarded. $0.003
POST /api/v1/extract/url-to-text URL → plain readable text. $0.002
POST /api/v1/extract/structured URL + JSON Schema → structured JSON. $0.020
POST /api/v1/search/web Brave-backed web search; normalized JSON results. $0.005

Markdown extraction

curl -X POST https://api-saas.vercel.app/api/v1/extract/markdown \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

Plain text extraction

curl -X POST https://api-saas.vercel.app/api/v1/extract/url-to-text \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

Structured extraction

curl -X POST https://api-saas.vercel.app/api/v1/extract/structured \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "json_schema": {"type":"object","properties":{"title":{"type":"string"}}}
  }'

Web search

curl -X POST https://api-saas.vercel.app/api/v1/search/web \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"agentic AI","count":5}'

Three payment channels

The same auth dependency walks three channels per request. Use whichever fits your agent.

RapidAPI marketplace

Sign up, paste your key, get billed by RapidAPI. Free distribution; ~20% take.

Coming soon

Bearer key

Authorization: Bearer <token>. SHA-256 hashed against the api_keys table.

-H "Authorization: Bearer $API_KEY"

x402 (USDC on Base)

Autonomous agents pay per-call without signing up. Sign an EIP-3009 transfer authorization and retry with X-Payment.

x402 — first response

402 Payment Required
Content-Type: application/json

{
  "x402Version": 1,
  "error": "X-Payment header required",
  "accepts": [
    {
      "scheme": "exact",
      "network": "base-sepolia",
      "maxAmountRequired": "3000",
      "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
      "extra": { "name": "USDC", "version": "2" },
      "payTo": "0x...",
      "resource": "https://api.your-domain/api/v1/extract/markdown"
    }
  ]
}

Get started

  1. Sign up on RapidAPI Coming soon

    Marketplace listing is in review. Use a Bearer key in the meantime.

  2. Or request a Bearer key

    See the README's local-development section for the seed script and api_keys table.

  3. curl it
    curl -X POST https://api-saas.vercel.app/api/v1/extract/markdown \
      -H "Authorization: Bearer $API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"url":"https://example.com"}'