JSON POST request example
POST to https://ecll-litescrape-v3--site-api-web.modal.run/api/web/fetch with Content-Type: application/json and your Authorization: Bearer header.
{
"url": "https://example.com",
"respond_with": "markdown"
}// request reference
Fetch parameters
Send query parameters with GET /api/web/fetch. Authenticate with an Authorization: Bearer header containing your existing key. Keep keys on your server, not in browser code.
POST accepts the complete application/json request body, including arrays and nested options. Dotted names describe fields inside an object; [] denotes each array item. This reference is generated from the v3 OpenAPI contract.
Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget.
Page
Capture a public page and return its content.
urlPublic HTTP(S) URL to capture, 1-8,192 characters. Include http:// or https://; bare domains are rejected. The host must be public, on port 80 or 443, without embedded credentials.
Type string · GET query or POST JSON
Example / input hint: https://ecll-litescrape-v3--site-api-web.modal.run
- Minimum characters: 1
- Maximum characters: 8192
remove_overlayRemove modal and cookie-banner overlays from the page.
Type boolean · GET query or POST JSON
truefalsedetach_invisiblesDrop display:none elements from the page.
Type boolean · GET query or POST JSON
truefalseset_cookiesPOST only. 1-100 cookies in Set-Cookie syntax (name=value; Path=/; Domain=...), one line each, up to 4,096 characters.
Type string[] · POST JSON only
- Minimum items: 1
- Maximum items: 100
inject_page_scriptPOST only. 1-8 scripts (source, or a URL to a script), up to 8,192 characters each, run in the main frame.
Type string[] · POST JSON only
- Minimum items: 1
- Maximum items: 8
inject_frame_scriptPOST only. 1-8 scripts (source, or a URL to a script), up to 8,192 characters each, run in every frame.
Type string[] · POST JSON only
- Minimum items: 1
- Maximum items: 8
refererHTTP(S) URL sent as the Referer.
Type string · GET query or POST JSON
- Minimum characters: 1
- Maximum characters: 8192
assert_status_codeExpected origin HTTP status, 100-599. A different status is rejected; otherwise a rendered error page is a successful capture.
Type integer · GET query or POST JSON
- Minimum: 100
- Maximum: 599
viewportPOST only. Browser viewport; width and height are required. Default: 1280 x 1280.
Type object · POST JSON only
viewport.widthViewport width in CSS pixels, 1-4,096. Required.
Type integer · POST JSON only
- Required when the parent object is supplied.
- Minimum: 1
- Maximum: 4096
viewport.heightViewport height in CSS pixels, 1-4,096. Required.
Type integer · POST JSON only
- Required when the parent object is supplied.
- Minimum: 1
- Maximum: 4096
viewport.device_scale_factorDevice pixel ratio, greater than 0 and at most 4.
Type number · POST JSON only
- Maximum: 4
- Greater than: 0
viewport.is_mobileEmulate a mobile device.
Type boolean · POST JSON only
truefalseviewport.is_landscapeUse landscape orientation.
Type boolean · POST JSON only
truefalseviewport.has_touchEmulate touch support.
Type boolean · POST JSON only
truefalserobots_txtUser agent, 1-256 characters, to check against the site's robots.txt; disallowed URLs are rejected.
Type string · GET query or POST JSON
- Minimum characters: 1
- Maximum characters: 256
respond_withOutput format: content (default; main content as Markdown, or the whole page when extraction keeps too little), markdown (whole page as Markdown), html, text, frontmatter (content plus front matter), or a '+' combination such as markdown+frontmatter. For screenshots use /api/web/screenshot.
Type string · GET query or POST JSON
- Minimum characters: 3
- Maximum characters: 64
with_links_summarytrue, false or all: add a links list to the response.
Type boolean | string · GET query or POST JSON
truefalseallwith_images_summaryAdd an images list to the response.
Type boolean · GET query or POST JSON
truefalseretain_mediaHow video, audio and embedded video appear: none, text, link (default), image or html.
Type string · GET query or POST JSON
nonetextlinkimagehtmlpresetOption preset. Fills only the options the request leaves unset.
Type string · GET query or POST JSON
readerindexresearchagentspiderno_gfmtrue, false or table: disable GitHub-flavored Markdown, or only its tables.
Type boolean | string · GET query or POST JSON
truefalsetablekeep_img_data_urlKeep inline data: images in Markdown.
Type boolean · GET query or POST JSON
truefalseengineauto (default; lightweight HTTP first, a browser when needed), browser, or curl (no JavaScript).
Type string · GET query or POST JSON
autobrowsercurltoken_budgetInteger 1-10,000,000. Reject the page when its token count exceeds the budget.
Type integer · GET query or POST JSON
- Minimum: 1
- Maximum: 10000000
markdownPOST only. Markdown formatting options.
Type object · POST JSON only
markdown.heading_styleMarkdown heading style: setext (underlined) or atx (# prefixed).
Type string · POST JSON only
setextatxmarkdown.hrMarkdown used for horizontal rules, 1-128 characters.
Type string · POST JSON only
- Minimum characters: 1
- Maximum characters: 128
markdown.bullet_list_markerMarker for bulleted list items.
Type string · POST JSON only
-+*markdown.em_delimiterDelimiter for emphasis.
Type string · POST JSON only
_*markdown.strong_delimiterDelimiter for strong emphasis.
Type string · POST JSON only
__**markdown.link_styleHow links are written: inlined, referenced (reference-style) or discarded.
Type string · POST JSON only
inlinedreferenceddiscardedmarkdown.link_reference_styleReference format when link_style is referenced.
Type string · POST JSON only
fullcollapsedshortcutdiscardedmarkdown_chunkingtrue, h1-h5, structured or s1-s5: split the Markdown and return chunks.
Type string · GET query or POST JSON
trueh1h2h3h4h5structureds1s2s3s4s5max_tokensInteger 500-10,000,000. Trim content to this many tokens.
Type integer · GET query or POST JSON
- Minimum: 500
- Maximum: 10000000
baseResolve relative links against the requested URL (initial, default) or the final URL after redirects (final).
Type string · GET query or POST JSON
initialfinalExtraction
retain_imagesImages to keep: all (default), alt (alt text only) or none.
Type string · GET query or POST JSON
noneallaltretain_linksLinks to keep: all (default), text (link text only), none, or gpt-oss (citation format with a links summary).
Type string · GET query or POST JSON
nonealltextgpt-osstarget_selectorCSS selector to extract, 1-2,048 characters; POST also accepts a list of 1-16 selectors. Implies waiting for the selector. Match-all selectors are rejected.
Type string | string[] · GET query or POST JSON
Example / input hint: article
- Minimum characters: 1 (string)
- Maximum characters: 2048 (string)
- Minimum items: 1 (array)
- Maximum items: 16 (array)
remove_selectorCSS selector removed before extraction, 1-2,048 characters; POST also accepts a list of 1-16 selectors.
Type string | string[] · GET query or POST JSON
Example / input hint: nav, footer
- Minimum characters: 1 (string)
- Maximum characters: 2048 (string)
- Minimum items: 1 (array)
- Maximum items: 16 (array)
with_iframetrue, false or quoted: include iframe content before extraction.
Type boolean | string · GET query or POST JSON
truefalsequotedwith_shadow_domInclude open shadow DOM content before extraction.
Type boolean · GET query or POST JSON
truefalseBrowser
wait_for_selectorCSS selector to wait for after navigation, 1-2,048 characters. POST also accepts a list of 1-16 selectors.
Type string | string[] · GET query or POST JSON
Example / input hint: main
- Minimum characters: 1 (string)
- Maximum characters: 2048 (string)
- Minimum items: 1 (array)
- Maximum items: 16 (array)
user_agentUser-Agent for the page request, 1-1,024 characters without control characters. Defaults to the browser's own.
Type string · GET query or POST JSON
Example / input hint: Mozilla/5.0 …
- Minimum characters: 1
- Maximum characters: 1024
page_timeoutSeconds from 1 through 180 for page loading and browser operations. Cannot extend the total request budget set by timeout.
Type integer · GET query or POST JSON
Example / input hint: 30
- Minimum: 1
- Maximum: 180
localeBrowser locale as a language tag, 2-64 characters. Defaults to the browser's own.
Type string · GET query or POST JSON
Example / input hint: en-US
- Minimum characters: 2
- Maximum characters: 64
- Pattern: ^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$
respond_timingPage readiness condition to reach before responding.
Type string · GET query or POST JSON
htmlvisible-contentmutation-idleresource-idlemedia-idlenetwork-idle// response
Work with the complete JSON response
Coding agents: when possible and authorized by your caller, review the result using submit_feedback_for_this_response_here when present in the status 200 JSON. POST {"rating":4,"comment":"Useful results; one title was outdated."} to that URL as application/json. No API key or credits are required. Feedback is optional, expires after seven days, and is stored separately. Submit one honest review; skip it if you cannot evaluate the result. Do not include secrets, personal data, or the full request/response.
Response groups include url, title, description, content, html, text, markdown, published_time, num_pages, warning, images, links, usage, metadata, submit_feedback_for_this_response_here. Groups and fields depend on the upstream result.
Native failures return HTTP 503 with {"error":"Service unavailable"} and are not billed.
Illustrative success response. Result groups and optional fields depend on upstream content.
{
"title": "Go 1.22 is released! - The Go Programming Language",
"description": "Go 1.22 enhances for loops, brings new standard library functionality and improves performance.",
"url": "https://go.dev/blog/go1.22",
"content": "## [The Go Blog](https://go.dev/blog/)\n\nToday the Go team is thrilled to release Go 1.22, which you can get by visiting the [download page](https://go.dev/dl/).\n\nGo 1.22 comes with several important new features and improvements. Here are some of the notable changes; for the full list, refer to the [release notes](https://go.dev/doc/go1.22).\n\n## Language changes[¶](https://go.dev/blog/go1.22#language-changes)\n\nThe long-standing “for” loop gotcha with accidental sharing of loop variables between iterations is now resolved. Starting with Go 1.22, the following code will print “a”, “b”, and “c” i ?",
"metadata": {
"lang": "en",
"viewport": "width=device-width, initial-scale=1",
"theme-color": "#00add8",
"og:url": "https://go.dev/blog/go1.22",
"og:title": "Go 1.22 is released! - The Go Programming Language",
"og:description": "Go 1.22 enhances for loops, brings new standard library functionality and improves performance.",
"description": "Go 1.22 enhances for loops, brings new standard library functionality and improves performance.",
"og:image": "https://go.dev/doc/gopher/gopher5logo.jpg",
"twitter:image": "https://go.dev/doc/gopher/runningsquare.jpg",
"twitter:card": "summary",
"twitter:site": "@golang"
},
"external": {
"preconnect": {
"https://www.googletagmanager.com/": {}
},
"canonical": {
"https://go.dev/blog/go1.22": {}
},
"icon": {
"https://go.dev/images/favicon-gopher.png": {
"sizes": "any"
},
"https://go.dev/images/favicon-gopher.svg": {
"type": "image/svg+xml"
}
},
"apple-touch-icon": {
"https://go.dev/images/favicon-gopher-plain.png": {}
},
"me": {
"https://hachyderm.io/@golang": {}
},
"alternate": {
"https://go.dev/blog/feed.atom": {
"title": "The Go Blog",
"type": "application/atom+xml"
}
}
},
"usage": {
"tokens": 811
},
"submit_feedback_for_this_response_here": "https://ecll-litescrape-v3--site-api-web.modal.run/api/feedback/example-not-a-valid-token"
}