Scrape or crawl a web page to clean Markdown for LLMs
crawl4ai.web.scrapeScrape one URL, a web page or a PDF, into clean, LLM-ready Markdown text and/or HTML. Crawl4AI picks the cheapest engine that works (archive, plain fetch, real browser that renders JavaScript), with optional links, media, metadata and tables; proxies for sites that block datacenters.
- Price
- $0.00015/successAu prix du fournisseur
- Success rate
- 51,4 %Last 30 days · 1 410 303 calls
- Latency p50
- 1 sp95 15 s
- Last verified
- 5 oct. 2026Verified working
POSThttps://toolswitch.dev/v1/tools/crawl4ai.web.scrapePreview- Uses platform quota
- Synchronous response
- Reads public data
Paramètres
Most pages answer in 1-2 s; a page that needs a real browser takes 10-30 s, and a failed page ends within about 55 s. A PDF URL returns the PDF's text as Markdown. Images and other binary files answer 422 binary-body within about a second, free. Blocked (403), unreachable (502) and fleet-busy (503) answers are free; retry a 503 after a few seconds.
Cet outil n’a pas de paramètres. Voir la doc du fournisseur ↗ Provider docs
Exemples de code
Remplacez $TOOLSWITCH_KEY par la clé créée dans la console.
curl -X POST 'https://toolswitch.dev/v1/tools/crawl4ai.web.scrape' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"url":"https://example.com","format":"md"}'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/crawl4ai.web.scrape",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("{\"url\":\"https://example.com\",\"format\":\"md\"}"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/crawl4ai.web.scrape", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("{\"url\":\"https://example.com\",\"format\":\"md\"}")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Cette API de passerelle est en préversion ; son URL et son authentification peuvent changer. Les paramètres de l’exemple sont des données fictives. Les appels sont facturés à $0.00015/success, frais de service inclus.