{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Takes a screenshot of a webpage from provided URL or HTML. Control page loading with `gotoOptions` and `waitFor*` options. Customize screenshots with `viewport`, `fullPage`, `clip` and others.","properties":{"path":{"type":"object","properties":{"account_id":{"description":"Account ID.","type":"string"}},"required":["account_id"],"additionalProperties":false},"query":{"type":"object","properties":{"cacheTTL":{"description":"Cache TTL default is 5s. Set to 0 to disable.","type":"number","default":5,"maximum":86400,"minimum":0},"browser":{"description":"Rendering backend. Set to `kitesurf` to use Kitesurf (beta).","type":"string","enum":["kitesurf"]}},"required":[],"additionalProperties":false},"body":{"type":"object","properties":{"actionTimeout":{"description":"The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.","type":"number","maximum":120000},"addScriptTag":{"description":"Adds a script element into the page with the desired URL or content.","type":"array","items":{"additionalProperties":false,"properties":{"content":{"type":"string"},"id":{"type":"string"},"type":{"type":"string"},"url":{"type":"string","format":"uri"}},"type":"object"}},"addStyleTag":{"description":"Adds a `<link rel=\"stylesheet\">` tag into the page with the desired URL or a `<style type=\"text/css\">` tag with the content.","type":"array","items":{"properties":{"content":{"type":"string"},"url":{"type":"string","format":"uri"}},"type":"object"}},"allowRequestPattern":{"description":"Only allow requests that match the provided regex patterns, eg. '/^.*\\.(css)'. Reject rules are applied first.","type":"array","items":{"type":"string"}},"allowResourceTypes":{"description":"Only allow requests that match the provided resource types, eg. 'image' or 'script'. Reject rules are applied first.","type":"array","items":{"anyOf":[{"enum":["document"],"type":"string"},{"enum":["stylesheet"],"type":"string"},{"enum":["image"],"type":"string"},{"enum":["media"],"type":"string"},{"enum":["font"],"type":"string"},{"enum":["script"],"type":"string"},{"enum":["texttrack"],"type":"string"},{"enum":["xhr"],"type":"string"},{"enum":["fetch"],"type":"string"},{"enum":["prefetch"],"type":"string"},{"enum":["eventsource"],"type":"string"},{"enum":["websocket"],"type":"string"},{"enum":["manifest"],"type":"string"},{"enum":["signedexchange"],"type":"string"},{"enum":["ping"],"type":"string"},{"enum":["cspviolationreport"],"type":"string"},{"enum":["preflight"],"type":"string"},{"enum":["other"],"type":"string"}]}},"authenticate":{"description":"Provide credentials for HTTP authentication.","type":"object","properties":{"password":{"type":"string","minLength":1},"username":{"type":"string","minLength":1}},"required":["username","password"]},"bestAttempt":{"description":"Attempt to proceed when 'awaited' events fail or timeout.","type":"boolean"},"cookies":{"description":"Check [options](https://pptr.dev/api/puppeteer.page.setcookie).","type":"array","items":{"properties":{"domain":{"type":"string"},"expires":{"type":"number"},"httpOnly":{"type":"boolean"},"name":{"description":"Cookie name.","type":"string"},"partitionKey":{"type":"string"},"path":{"type":"string"},"priority":{"anyOf":[{"enum":["Low"],"type":"string"},{"enum":["Medium"],"type":"string"},{"enum":["High"],"type":"string"}]},"sameParty":{"type":"boolean"},"sameSite":{"anyOf":[{"enum":["Strict"],"type":"string"},{"enum":["Lax"],"type":"string"},{"enum":["None"],"type":"string"}]},"secure":{"type":"boolean"},"sourcePort":{"type":"number"},"sourceScheme":{"anyOf":[{"enum":["Unset"],"type":"string"},{"enum":["NonSecure"],"type":"string"},{"enum":["Secure"],"type":"string"}]},"url":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"type":"object"}},"emulateMediaType":{"type":"string"},"gotoOptions":{"description":"Check [options](https://pptr.dev/api/puppeteer.gotooptions).","type":"object","default":{},"properties":{"referer":{"type":"string"},"referrerPolicy":{"type":"string"},"timeout":{"type":"number","default":30000,"maximum":60000},"waitUntil":{"default":"domcontentloaded","anyOf":[{"enum":["load"],"type":"string"},{"enum":["domcontentloaded"],"type":"string"},{"enum":["networkidle0"],"type":"string"},{"enum":["networkidle2"],"type":"string"},{"items":{"anyOf":[{"enum":["load"],"type":"string"},{"enum":["domcontentloaded"],"type":"string"},{"enum":["networkidle0"],"type":"string"},{"enum":["networkidle2"],"type":"string"}]},"type":"array"}]}}},"html":{"description":"Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set.","type":"string","minLength":1,"examples":["<h1>Hello World!</h1>"]},"rejectRequestPattern":{"description":"Block undesired requests that match the provided regex patterns, eg. '/^.*\\.(css)'.","type":"array","items":{"type":"string"}},"rejectResourceTypes":{"description":"Block undesired requests that match the provided resource types, eg. 'image' or 'script'.","type":"array","items":{"anyOf":[{"enum":["document"],"type":"string"},{"enum":["stylesheet"],"type":"string"},{"enum":["image"],"type":"string"},{"enum":["media"],"type":"string"},{"enum":["font"],"type":"string"},{"enum":["script"],"type":"string"},{"enum":["texttrack"],"type":"string"},{"enum":["xhr"],"type":"string"},{"enum":["fetch"],"type":"string"},{"enum":["prefetch"],"type":"string"},{"enum":["eventsource"],"type":"string"},{"enum":["websocket"],"type":"string"},{"enum":["manifest"],"type":"string"},{"enum":["signedexchange"],"type":"string"},{"enum":["ping"],"type":"string"},{"enum":["cspviolationreport"],"type":"string"},{"enum":["preflight"],"type":"string"},{"enum":["other"],"type":"string"}]}},"screenshotOptions":{"description":"Check [options](https://pptr.dev/api/puppeteer.screenshotoptions).","type":"object","default":{},"additionalProperties":false,"properties":{"captureBeyondViewport":{"type":"boolean"},"clip":{"type":"object","properties":{"height":{"type":"number"},"scale":{"type":"number"},"width":{"type":"number"},"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y","width","height"]},"encoding":{"default":"binary","anyOf":[{"enum":["binary"],"type":"string"},{"enum":["base64"],"type":"string"}]},"fromSurface":{"type":"boolean"},"fullPage":{"type":"boolean"},"omitBackground":{"type":"boolean"},"optimizeForSpeed":{"type":"boolean"},"quality":{"type":"number"},"type":{"default":"png","anyOf":[{"enum":["png"],"type":"string"},{"enum":["jpeg"],"type":"string"},{"enum":["webp"],"type":"string"}]}}},"scrollPage":{"type":"boolean"},"selector":{"type":"string"},"setExtraHTTPHeaders":{"type":"object","additionalProperties":{"type":"string"}},"setJavaScriptEnabled":{"type":"boolean"},"url":{"description":"URL to navigate to, eg. `https://example.com`.","type":"string","format":"uri","examples":["https://example.com/"]},"userAgent":{"type":"string","default":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36"},"viewport":{"description":"Check [options](https://pptr.dev/api/puppeteer.page.setviewport).","type":"object","default":{"height":1080,"width":1920},"properties":{"deviceScaleFactor":{"type":"number"},"hasTouch":{"type":"boolean"},"height":{"type":"number"},"isLandscape":{"type":"boolean"},"isMobile":{"type":"boolean"},"width":{"type":"number"}},"required":["width","height"]},"waitForSelector":{"description":"Wait for the selector to appear in page. Check [options](https://pptr.dev/api/puppeteer.page.waitforselector).","type":"object","properties":{"hidden":{"type":"boolean","enum":[true]},"selector":{"type":"string"},"timeout":{"type":"number","maximum":120000},"visible":{"type":"boolean","enum":[true]}},"required":["selector"]},"waitForTimeout":{"description":"Waits for a specified timeout before continuing.","type":"number","maximum":120000}},"additionalProperties":false,"oneOf":[{"not":{"properties":{"html":{"type":"string"}},"required":["html"],"type":"object"},"properties":{"html":{"type":"string"},"url":{"type":"string"}},"required":["url"],"type":"object"},{"not":{"properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"properties":{"html":{"type":"string"},"url":{"type":"string"}},"required":["html"],"type":"object"}],"examples":[{"url":"https://www.example.com/"}]}},"required":["path","body"],"additionalProperties":false},"name":"Get screenshot.","id":"cloudflare.brapi-post_screenshot","example":{"path":{"account_id":"example"},"body":{"url":"https://www.example.com/"}},"maxRequests":1,"summary":false}}