action dataflowkit_url_to_screenshot { label: "Capture web page Screenshots." description: "Automate URL to Screenshot Conversion right in your application.\n\nSpecify request parameters like URL, Proxy, and actions to convert web pages to screenshots using Headless Chrome.\n\nGet resulted pictures in JPG or PNG formats even from websites blocked in your area for some reason utilizing our worldwide pool of proxies.\n\nSimulate real-world human interaction with the page. For example, before capturing a web page, you may need to scroll it.\n\nGenerate ready-to-run code for your favorite language at [https://dataflowkit.com/url-to-screenshot](https://dataflowkit.com/url-to-screenshot)" provider: dataflowkit method: POST path: "/convert/url/screenshot" encoding: json input: { type: "object" required: ["url"] properties: { actions: { type: "array" description: "Use actions to automate manual workflows while rendering web pages. They simulate real-world human interaction with pages." items: { type: "object" } } clipSelector: { type: "string" description: "Captures a screenshot of specified CSS element on a web page." } format: { type: "string" description: "Sets the Format of output image" enum: ["png", "jpeg"] } fullPage: { type: "boolean" description: "takes a screenshot of a full web page. It ignores offsetX, offsety, width and height argument values." } height: { type: "integer" description: "Rectangle height in device independent pixels (dip)." } ignoreHTTPStatusErrCodes: { type: "boolean" description: "The HTTP 200 OK success status response code indicates that the request has succeeded. Sometimes a server returns normal HTML content even with an erroneous Non-200 HTTP response status code. The IgnoreHTTPStatusCode option is useful when you need to force the return of HTML content. Defaults to \"false.\"" } initialCookies: { type: "array" description: "The \"Initial Cookies\" option is useful for crawling websites that require a login. The simplest solution to get an array of cookies for specific websites is to use a web browser \"EditThisCookie\" extension. Copy a cookie array with \"EditThisCookie\" and paste it into the \"Initial cookie\" field." items: { type: "object" description: "InitialCookie structure keep cookies that optionally can be passed to the new fetcher crawl a website that requires a login. Generate Cookies array with EditThisCookie chrome extension." properties: { domain: { type: "string" } expirationDate: { type: "number" } hostOnly: { type: "boolean" } httpOnly: { type: "boolean" } id: { type: "number" } name: { type: "string" } path: { type: "string" } sameSite: { type: "string" enum: ["unspecified", "strict", "lax", "no_restriction"] } secure: { type: "boolean" } session: { type: "boolean" } storeID: { type: "string" } value: { type: "string" } } } } offsetx: { type: "integer" description: "X offset in device independent pixels (dip)." } offsety: { type: "integer" description: "Y offset in device independent pixels (dip)." } output: { type: "string" description: "If set to _file_, the resulted screenshot is uploaded to Dataflow Kit Storage first. Then the link to this file is returned. Overwise, web site screenshot is returned in the response body." enum: ["buffer", "file"] } printBackground: { type: "boolean" description: "Print background graphics in the PDF." } proxy: { type: "string" description: "Specify proxy by adding [country ISO code](https://en.wikipedia.org/wiki/ISO_3166-2) to `country-` value to send requests through a proxy in the specified country. Use `country-any` to use random geo-targets." } quality: { type: "integer" description: "Sets the Quality of output image. Compression quality from range [0..100] (jpeg only)." } scale: { type: "number" description: "Image scale factor. range [0.1 .. 3]" } url: { type: "string" description: "The full URL address (including HTTP/HTTPS) of a web page that you want to capture" } waitDelay: { type: "number" description: "Specify a wait delay (in seconds). This may be useful if certain elements of the web site need to be rendered after the initial page load." } width: { type: "integer" description: "Rectangle width in device independent pixels (dip)." } } } output: { type: "object" additionalProperties: true } }