{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Fetches rendered PDF from provided URL or HTML. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.","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>"]},"pdfOptions":{"description":"Check [options](https://pptr.dev/api/puppeteer.pdfoptions).","type":"object","default":{},"additionalProperties":false,"properties":{"displayHeaderFooter":{"description":"Whether to show the header and footer.","type":"boolean","default":false},"footerTemplate":{"description":"HTML template for the print footer.","type":"string"},"format":{"description":"Paper format. Takes priority over width and height if set.","type":"string","default":"letter","enum":["letter","legal","tabloid","ledger","a0","a1","a2","a3","a4","a5","a6"]},"headerTemplate":{"description":"HTML template for the print header.","type":"string"},"height":{"description":"Sets the height of paper. Can be a number or string with unit.","anyOf":[{"type":"string"},{"type":"number"}]},"landscape":{"description":"Whether to print in landscape orientation.","type":"boolean","default":false},"margin":{"description":"Set the PDF margins. Useful when setting header and footer.","type":"object","properties":{"bottom":{"anyOf":[{"type":"string"},{"type":"number"}]},"left":{"anyOf":[{"type":"string"},{"type":"number"}]},"right":{"anyOf":[{"type":"string"},{"type":"number"}]},"top":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"omitBackground":{"description":"Hides default white background and allows generating pdfs with transparency.","type":"boolean","default":false},"outline":{"description":"Generate document outline.","type":"boolean","default":false},"pageRanges":{"description":"Paper ranges to print, e.g. '1-5, 8, 11-13'.","type":"string"},"preferCSSPageSize":{"description":"Give CSS @page size priority over other size declarations.","type":"boolean","default":false},"printBackground":{"description":"Set to true to print background graphics.","type":"boolean","default":false},"scale":{"description":"Scales the rendering of the web page. Amount must be between 0.1 and 2.","type":"number","default":1,"maximum":2,"minimum":0.1},"tagged":{"description":"Generate tagged (accessible) PDF.","type":"boolean","default":true},"timeout":{"description":"Timeout in milliseconds.","type":"number","default":30000},"width":{"description":"Sets the width of paper. Can be a number or string with unit.","anyOf":[{"type":"string"},{"type":"number"}]}}},"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"}]}},"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 PDF.","id":"cloudflare.brapi-post_pdf","example":{"path":{"account_id":"example"},"body":{"url":"https://www.example.com/"}},"maxRequests":1,"summary":false}}