scrape
Fetch a URL to get clean markdown or AI-extracted structured JSON. Enable browser rendering for JavaScript-heavy pages and login-protected content.
Instructions
Fetch a single URL and return clean markdown by default. Set generateJson=true to also extract structured data with AI. Set useBrowser=true for SPAs and JS-heavy sites (slower and more expensive — only when needed). Returns markdown unless generateJson is true, in which case it returns the structured JSON.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to scrape. | |
| country | No | Two-letter country code for the proxy egress location (e.g. "us", "de", "in"). Defaults to "us". | us |
| sessionId | No | Optional saved-browser-session ID for login-protected pages. Pair with useBrowser=true. | |
| forceFresh | No | Skip the cache and refetch. Defaults to false; cached results are typically good for 24h. | |
| useBrowser | No | Render the page with a stealth headless browser. Required for SPAs and dynamic content; otherwise prefer the default (fetch-based) for speed and lower cost. | |
| sessionName | No | Optional saved-browser-session name (alternative to sessionId). | |
| generateJson | No | Have AI extract structured JSON from the page in addition to / instead of markdown. Use for product pages, listings, articles, anywhere the caller wants typed fields. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| cached | Yes | Whether this result was served from cache. | |
| markdown | Yes | Clean markdown of the page. | |
| durationMs | Yes | ||
| generatedJson | No | AI-extracted structured JSON — present only when generateJson was true. |