Take Website Screenshots in Ruby

Capture screenshots from Ruby with Net::HTTP or any HTTP library. No Capybara, no PhantomJS — just a simple API call.

Code Examples

Ruby
require 'net/http'
require 'uri'

uri = URI("https://snapapi.tech/v1/screenshot?url=https://example.com&api_key=YOUR_KEY")
response = Net::HTTP.get_response(uri)

File.open("screenshot.png", "wb") { |f| f.write(response.body) }
puts "Screenshot saved!"
Get Your Free API Key Read the Docs

Try It Live

Capturing screenshot...

Why SnapAPI?

No Browser Setup

We run Chromium so you don't have to. No Puppeteer, no Selenium, no drivers.

PNG, JPEG, WebP

Choose your format. Set quality. Get optimized output.

Mobile Emulation

9 device presets — iPhone, Pixel, iPad, desktop. One parameter.

Full Page Capture

Scroll the entire page and stitch into one image. Automatic.

Element Selector

Capture a specific element by CSS selector instead of the whole page.

Dark Mode

Emulate prefers-color-scheme: dark to capture dark-themed pages.

Built For

How It Works

1. Sign up for a free API key — 100 screenshots/month, no credit card required.

2. Make a GET request to /v1/screenshot with your URL and API key.

3. Receive a pixel-perfect screenshot as a binary image, or JSON with metadata if meta=true.

That's it. No browser installation, no Chromium management, no headless infrastructure to maintain.