What it does
Pay-per-call web scraping via headless Playwright. Returns page content as text, HTML, or markdown. Enforces robots.txt before settling payment — if the page disallows crawling, you get a 451 and no charge. SSRF-hardened: private IP ranges and Hetzner metadata endpoints are blocked. Payment only settles on 2xx response with non-empty content.
When to use it
- Scraping a competitor's pricing page for a market intelligence agent
- Extracting the text of a news article before summarising it
- Fetching a live job posting before applying
- Getting fresh product specs from a manufacturer's site
Request schema
{
"url": "https://example.com/article",
"format": "markdown",
"selector": "article",
"timeout_ms": 10000
} Response schema
{
"success": true,
"url": "https://example.com/article",
"format": "markdown",
"content": "# Article Title\n\nContent here...",
"word_count": 412,
"scraped_at": "2026-05-07T09:12:44Z",
"cached": false,
"payment_hash": "0x..."
} Code example — TypeScript via MCP
Install the MCP server once; all 16 services become tool calls.
// Configure @melis-ai/x402-tools-mcp in your MCP client
// Then call the tool:
const result = await mcpClient.callTool("scrapepay", {
"url": "https://example.com/article",
"format": "markdown",
"selector": "article",
"timeout_ms": 10000
});
console.log(result);
// ["success","url","format","content","word_count","scraped_at... → MCP setup guide Code example — Python via direct HTTP
import requests
# x402 payment header must be set by your wallet client
# See x402.org for client libraries
headers = {
"Content-Type": "application/json",
"x-payment": "<signed-x402-payment-header>",
}
resp = requests.post(
"https://scrapepay.melis.ai/scrape",
json={
"url": "https://example.com/article",
"format": "markdown",
"selector": "article",
"timeout_ms": 10000
},
headers=headers,
)
print(resp.json()) Code example — curl with internal key bypass
For testing with an issued internal key (skips x402 payment flow):
curl -X POST https://scrapepay.melis.ai/scrape \
-H "Content-Type: application/json" \
-H "x-internal-key: YOUR_KEY" \
-d '{"url":"https://example.com/article","format":"markdown","selector":"article","timeout_ms":10000}' How is this different from alternatives?
ScrapePay vs Exa
Exa uses a pre-indexed web corpus. Great for broad research. ScrapePay hits the live page via Playwright — better for dynamic JS-rendered content, paywalled endpoints (with your own session), and when you need a fresh snapshot rather than a cached version. Exa charges ~$10 per 1,000 requests; ScrapePay charges $0.01 per call with no subscription.
ScrapePay vs StableEnrich (Firecrawl)
Firecrawl (available via StableEnrich) is fast and well-documented. ScrapePay adds robots.txt enforcement and charge-on-failure safety, which Firecrawl does not guarantee. If you're scraping at scale and need compliance guardrails, ScrapePay is safer.
ScrapePay vs Minifetch
Minifetch is lightweight and cheap. ScrapePay uses full Playwright, so it handles JS-rendered pages that Minifetch (which does HTTP fetch) cannot.
FAQ
Does it work without an account?
Yes. x402 is account-less. Your agent's wallet signs the payment and retries automatically. No registration, no API key, no subscription.
What happens on failure?
Returns HTTP 422 on timeout, HTTP error, JS crash, or empty content. Payment is not settled on failure. If robots.txt disallows the path, returns HTTP 451 before the payment attempt.
What is the rate limit?
None published. Contact sean@melis.ai for bulk arrangements.
Is this open-source?
The service code is closed-source for security reasons. The MCP wrapper that calls it is open-source and MIT-licensed: github.com/mizukaizen/x402-tools-mcp .
Who built this?
Part of the melis.ai agent infrastructure stack. Running on a dedicated Helsinki VPS since early 2026. Contact sean@melis.ai.