Skip to content
SCREENSHOT API · RUBY

Website Screenshot API in Ruby

Capture any URL as a PNG, JPEG, or WebP from Ruby with one HTTP call. Full-page or element capture, ads and cookie banners stripped, and a signed CDN URL back — no Chromium process for you to keep alive.

The self-hosted version of this in Ruby is a headless Chromium pool: a browser per worker, memory that climbs until something restarts it, and a queue that falls over the first time twenty requests arrive together. RenderKit's /v1/screenshot endpoint is the managed version — you POST a JSON spec and get a signed image URL back.

Ruby example

screenshot.ruby
res = Net::HTTP.post(
  URI("https://api.renderkit.tech/v1/screenshot"),
  { url: "https://example.com", full_page: true }.to_json,
  "x-api-key" => key, "content-type" => "application/json")
shot = JSON.parse(res.body)

Capture options worth knowing

  • full_page: true scrolls and stitches the whole document; omit it for a viewport-sized shot
  • selector: "#pricing" captures one element instead of the page
  • block_ads and block_cookie_banners strip the chrome that ruins marketing captures
  • device_scale: 2 for retina output; format: "webp" to cut file size
  • wait_until and wait_for_selector so you never capture a half-rendered page

Why this ends up cheaper than self-hosting

A browser fleet is not a one-time cost. It is memory ceilings, zombie processes, fonts missing from the container, and a concurrency limit you discover in production. RenderKit meters *renders*, not browser-hours, so idle capacity costs nothing — and the same API key also does PDFs and markdown extraction.

More

Read the screenshot API reference, see why Puppeteer eats RAM, or compare RenderKit vs ScreenshotOne.

Common questions

POST the target URL to RenderKit's /v1/screenshot endpoint with your API key. The response contains a signed CDN URL for the rendered image — no headless browser to install or operate in Ruby.

No. RenderKit runs the browser fleet. Your app makes an HTTP request and receives a finished image, which removes the memory, font, and concurrency problems that come with hosting Chromium yourself.

Yes — pass a CSS selector and RenderKit captures just that element's bounding box, which is the usual way to generate component or pricing-table images.

Ship your first render in 60 seconds.

500 free renders to start. No card. Cancel by ignoring it.

Get your free key$npm i renderkit-sdk