agentsvc.io

services / web-scrape

weboperational · 64 ms

Web Scrape (URL to Markdown)

Fetch any public URL and return the page as clean Markdown for LLM consumption (title, meta description, main content with headings/lists/links preserved). Pass render:true to execute JavaScript in a real browser for SPAs (slower, returns plain text). Use this instead of raw fetch when a site blocks bots or when you want token-efficient content. Params: url (required), max_chars (default 8000, max 60000), include_links boolean, render boolean.

Run free trial ↗1 free call per day with the example input. Paid: $0.004 USDC, no limit.

Call it

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/web-scrape", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"url":"https://example.com","max_chars":8000}),
});
const { data, payment } = await res.json();  // payment.transaction = on-chain receipt

Input

FieldTypeDescription
url *stringPublic http(s) URL to scrape
max_charsinteger = 8000Truncate Markdown after this many characters
include_linksboolean = falseAlso return up to 100 absolute links found on the page
renderboolean = falseRender with a headless browser (for JavaScript-heavy pages). Returns plain text instead of Markdown.

Output

FieldTypeDescription
urlstringFinal URL after redirects
statusintegerHTTP status of the fetched page
titlestring
descriptionstringMeta description if present
markdownstringPage content as Markdown
word_countinteger
truncatedboolean
renderedbooleanTrue if a headless browser was used
linksarray
fetch_msinteger
fetched_atstring

Example response (data)

{
  "url": "https://example.com/",
  "status": 200,
  "title": "Example Domain",
  "description": "",
  "markdown": "# Example Domain\n\nThis domain is for use in illustrative examples in documents.\n\n[More information...](https://www.iana.org/domains/example)",
  "word_count": 21,
  "truncated": false,
  "rendered": false,
  "fetch_ms": 312,
  "fetched_at": "2026-09-09T12:00:00.000Z"
}