screenshotty

v1.1.0
io.github.nihey/screenshotty Checked 1 day ago Published 2 months ago

Capture web pages as screenshots (returned inline) or PDFs via the Screenshotty API.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

screenshot_url Screenshot a web page

Capture a screenshot of a web page. Returns the hosted image URL and, for images up to 2 MB, the image itself so you can see the page.

ParameterTypeDescription
url *stringPage to capture (http:// or https://)
adblockbooleanBlock ads
block_cookie_bannerbooleanHide cookie consent banners
device_scale_factorinteger1 = standard, 2 = retina, 3 = high-dpi
formatstringImage format. Default png
full_pagebooleanCapture the whole scrollable page. Default true
light_modestringForce light or dark color scheme
selectorstringCSS selector of a single element to capture
viewport_heightintegerViewport height in pixels. Default 1080
viewport_widthintegerViewport width in pixels. Default 1920
wait_msintegerExtra wait before capturing, in ms

screenshot_html Render HTML to an image

Render an HTML document (inline CSS/JS allowed, public http(s) assets only) to an image — e.g. social cards, charts, email previews. Returns the hosted image URL and the image itself when it is 2 MB or smaller.

ParameterTypeDescription
html *stringComplete HTML document or fragment to render
adblockbooleanBlock ads
block_cookie_bannerbooleanHide cookie consent banners
device_scale_factorinteger1 = standard, 2 = retina, 3 = high-dpi
formatstringImage format. Default png
full_pagebooleanCapture the whole scrollable page. Default true
light_modestringForce light or dark color scheme
selectorstringCSS selector of a single element to capture
transparent_backgroundbooleanTransparent background (PNG/WebP only)
viewport_heightintegerViewport height in pixels. Default 1080
viewport_widthintegerViewport width in pixels. Default 1920
wait_msintegerExtra wait before capturing, in ms

generate_pdf Convert a web page or HTML to PDF

Render a web page (url) or an HTML document (html) to a PDF. Returns the hosted PDF URL.

ParameterTypeDescription
adblockbooleanBlock ads
block_cookie_bannerbooleanHide cookie consent banners
htmlstringHTML document to render instead of a URL
light_modestringForce light or dark color scheme
printedbooleanUse the print stylesheet. Default true
urlstringPage to capture (http:// or https://)
viewport_heightintegerViewport height in pixels. Default 1080
viewport_widthintegerViewport width in pixels. Default 1920
wait_msintegerExtra wait before capturing, in ms