agentsvc.io

services / web-scrape

weboperational · 64 ms

Web Scrape (URL to Markdown)

Web page to markdown: read any web page (URL) as clean, LLM-ready Markdown, the web scraper for agents. Default tool for reading ONE web page whose URL you have: returns clean Markdown (title, meta description, main content with headings, lists and links); Markdown and plain-text files such as llms.txt or README.md come back unchanged. The fastest and cheapest way to give an LLM the content of a page. If a JavaScript app comes back nearly empty, set render:true (real browser, slower, plain text) or use webpage-reader. For 2 to 5 URLs use web-read-batch, for 6 to 20 web-scrape-batch (one payment), for a whole site site-crawl, and if you have a question but no URL search-read. Params: url (required), max_chars (default 8000, max 60000), include_links, render.

Run free trial ↗1 free call per day with the example input. Paid: $0.003 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.status "settling"; header X-Payment-Settle: sync returns payment.transaction

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"
}