Tools / Web
Web page to markdown
Fetches a public URL and converts it to clean markdown, dropping navigation, scripts and styling. Works for HTML pages, PDFs, Word, Excel and CSV files. Returns the page title, final URL after redirects and the markdown text.
- Price per call
- $0.003 USDC
- Endpoint
- GET https://x402-tools.com/v1/markdown
- Also accepts
- POST with a JSON body
- Payment
- x402, exact scheme, USDC on Base
- Returns
- application/json
Parameters
| Name | Type | Description |
|---|---|---|
| url required | string | Public URL to convert. |
| max_chars | number | Truncate the markdown to this many characters (default 100000, max 500000). |
Call it from an agent
import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY);
const paidFetch = wrapFetchWithPayment(fetch, account);
const res = await paidFetch("https://x402-tools.com/v1/markdown?url=https%3A%2F%2Fexample.com&max_chars=20000");
// costs $0.003 in USDC on Base
Without a payment the endpoint answers 402 with the price, so you can inspect it first:
curl -i "https://x402-tools.com/v1/markdown?url=https%3A%2F%2Fexample.com&max_chars=20000"
Example response
{
"url": "https://example.com/",
"final_url": "https://example.com/",
"title": "Example Domain",
"content_type": "text/html",
"markdown": "# Example Domain\n\nThis domain is for use in illustrative examples…",
"characters": 182,
"truncated": false
}
If the tool fails or your input is invalid, the payment is not settled.
Other tools
Website screenshot$0.01
A PNG screenshot of any web page, rendered in a real browser.
Summarize text or a URL$0.005
A faithful short, medium or long summary of any text or web page.
Extract structured data$0.01
Pull JSON fields out of any text or web page, matching your schema.
Translate text$0.003
Translate text into any language, keeping formatting and tone.
Generate an image$0.02
Text-to-image with FLUX.1 schnell, returned in seconds.
Base wallet lookup$0.002
ETH, USDC and any ERC-20 balances for an address on Base, live from the chain.