Read these docs with AI
There are two agent-friendly entry points.llms.txt
A flat, machine-readable index of every page is at /llms.txt. Drop the URL into any assistant that supports doc ingestion and it can answer against the current docs.
One-click handoff
Every page has a context menu in the top right with handoff buttons for ChatGPT, Claude, Perplexity, Cursor, VSCode, and any MCP-aware client. Click Open in Cursor or Ask Claude and you start with the current page already in context.Use webscrape.ai inside your AI agent
webscrape.ai works as a tool in any agent runtime that supports HTTP function calls. The examples below show the minimum wiring you need.Anthropic tool use
OpenAI function calling
Tool descriptions that work
When you wire webscrape.ai into an agent, tell the model when to pick each endpoint. Vague descriptions like “scrape a webpage” lead to tool misroutes. Specific descriptions help the model choose.SmartScraper
“Extract structured JSON from a URL. user_prompt describes what to extract; output_schema (optional) constrains the result shape. Use when the user wants specific fields back, not the whole page.”
Scrape
“Fetch a webpage’s raw HTML or markdown. Use when the user wants to read or analyze the page content directly, not specific fields.”
SmartBrowse
“Run a saved recipe (clicks, typing, pagination) on a real Chrome session. Use when the data is behind a login or interaction.”
Cost-aware patterns
A few habits that keep agent loops from burning credits:- Try Scrape before SmartScraper. Scrape is 1 credit, SmartScraper is 5. If the agent only needs to read the page and reason over it, Scrape with
clean: trueis the cheaper call. - Cache reads with
max_age. On/scrapeand/smartscraper,max_agetells us to serve any fetch fresher than N seconds from cache. Omit it for no cache; either way, a failed call costs nothing.
Handling the envelope
Every webscrape.ai response is wrapped in the same envelope. Tell the agent to checkstatus first, then read data (success) or error (failure):
queued envelopes (SmartBrowse), set up a webhook so the agent isn’t stuck polling inside its tool loop.