Fetch (Alpha)
Fetch a public HTTP(S) page and return LLM-ready content. respond_with selects content (default), markdown, html, text or frontmatter, or a '+' combination. For screenshots use /api/web/screenshot. Uses the existing Litescrape bearer key, call ledger and total timeout; page_timeout bounds page loading. Always fetches fresh. Cookies, scripts, viewport and markdown options are JSON-body-only; Alpha contract may change.
Request
- Base URL: https://api.litescrape.com
- URL: https://api.litescrape.com/api/web/fetch
- Auth: HTTP bearer
Query parameters
Optional budget for the entire request in seconds, measured from gateway receipt until the response is ready to send. Includes admission, queueing and settlement. Must be greater than 0 and at most 90. On expiry, the call is not billed and returns 503 request_deadline_exceeded with retryable=true and a request ID. Omit to retain the standard server deadline.
Request body
Example request
{
"url": "https://example.com",
"set_cookies": [
"session=YOUR_SESSION; Path=/; Secure; HttpOnly"
],
"page_timeout": 30,
"locale": "en-US",
"referer": "https://example.com",
"assert_status_code": 200,
"viewport": {
"height": 900,
"width": 1440
},
"robots_txt": "MyBot",
"respond_timing": "network-idle",
"respond_with": "markdown",
"retain_images": "alt",
"markdown": {
"link_style": "referenced"
}
}Response
Successful capture; one call consumed even for a rendered origin error page.
Changes
No recorded changes to this operation across all 1 revision of this API.