JSON POST request example
POST to https://ecll-litescrape-v3--site-api-web.modal.run/api/web/screenshot with Content-Type: application/json and your Authorization: Bearer header.
{
"url": "https://example.com",
"full_page": false
}// request reference
Screenshot parameters
Send query parameters with GET /api/web/screenshot. 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.
Screenshot
Capture a PNG and receive its authenticated download URL.
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
set_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
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
truefalsefull_pageCapture the full page when true. The default, false, captures the viewport.
Type boolean · GET query or POST JSON · Default false
truefalseBrowser
For custom cookies, viewport dimensions and scripts, send a POST request with a JSON body. See the Screenshot API reference.
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
truefalsewait_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})*$
refererHTTP(S) URL sent as the Referer.
Type string · GET query or POST JSON
Example / input hint: https://example.com
- 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
Example / input hint: 200
- Minimum: 100
- Maximum: 599
robots_txtUser agent, 1-256 characters, to check against the site's robots.txt; disallowed URLs are rejected.
Type string · GET query or POST JSON
Example / input hint: MyBot
- Minimum characters: 1
- Maximum characters: 256
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, screenshot_base64, full_page, 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.