GoScreenAPI
Ruby — GoScreenAPI

Website Screenshots in Ruby — Works with Rails Out of the Box

Capture any website screenshot from Ruby with Faraday, HTTParty, or Net::HTTP. No headless browser setup, no Capybara, no Watir — just an HTTP call.

250 free screenshots/month No credit card required REST API · JSON
ruby
require 'faraday'
require 'json'

# Using Faraday (recommended for Rails)
conn = Faraday.new('https://goscreenapi.com') do |f|
  f.request :json
  f.response :json
end

response = conn.post('/api/v1/screenshot') do |req|
  req.headers['X-API-Key'] = ENV['GOSCREENAPI_KEY']
  req.body = {
    url: 'https://shopify.com',
    full_page: true,
    format: 'png',
    block_ads: true,
    device: 'desktop'
  }
end

image_url = response.body['image_url']
# => 'https://cdn.goscreenapi.com/screenshots/abc123.png'

# Save to Active Storage
uri = URI.parse(image_url)
file_data = Net::HTTP.get(uri)
blob = ActiveStorage::Blob.create_and_upload!(
  io: StringIO.new(file_data),
  filename: 'screenshot.png',
  content_type: 'image/png'
)
Features

Everything you need.
Nothing you don't.

Faraday & HTTParty

Works with Faraday, HTTParty, RestClient, or plain Net::HTTP — your choice.

Rails Active Storage

Download the screenshot URL and upload directly to Active Storage or S3.

Sidekiq Background Jobs

Call the API from Sidekiq workers for async screenshot processing.

Full-Page & PDF

full_page: true for scrollable pages, format: "pdf" for PDF output.

No Capybara/Watir

No browser automation library, no chromedriver, no system dependencies.

Webhook Callbacks

Use async: true with webhook_url for long-running screenshot jobs.

Use Cases

Built for real workflows

From solo developers to enterprise teams — GoScreenAPI fits into any stack.

Rails SaaS Apps

Add screenshot features to Ruby on Rails applications with minimal code.

Sidekiq Workers

Queue screenshot jobs in Sidekiq — async=true with webhook_url for callbacks.

PDF Invoice Generation

Render HTML invoice pages to PDF from Rails without wicked_pdf or prawn.

Link Preview Generation

Generate OG images and link thumbnails for user-submitted URLs.

API Reference

Key Parameters

Full reference at goscreenapi.com/docs

Parameter Type Description
url string Target URL to capture (required)
full_page boolean Capture entire scrollable page
format string png | jpeg | webp | pdf
selector string CSS selector — capture one element
block_ads boolean Remove ads and cookie banners
device string desktop | mobile | tablet
async boolean Background processing with webhook
webhook_url string POST callback URL for async results
Why GoScreenAPI

Speed. Scale. Simplicity.

< 3s
Avg. response time

Sync mode results in under 3 seconds for most pages.

99.9%
Uptime SLA

Production-grade reliability with redundant infrastructure.

150 req/min
Rate limit (Pro)

Handle high-volume workloads without throttling.

FAQ

Common questions

Use Faraday or HTTParty to POST to /api/v1/screenshot with your X-API-Key header. The response body contains image_url.
Yes. Use Faraday (already in most Rails apps) or add HTTParty. Works with Rails 6, 7, and 8.
Yes. Call the API from a Sidekiq worker. For long pages, use async: true with a webhook_url to avoid job timeouts.
No. GoScreenAPI handles the browser on our servers. You just make an HTTP POST from Ruby.
Yes. Download the image_url response and upload to Active Storage using ActiveStorage::Blob.create_and_upload!.
Yes. Set format: "pdf" to get a PDF URL back. No wicked_pdf, prawn, or wkhtmltopdf needed.

Start building with GoScreenAPI

250 free screenshots every month. No credit card required. Production-ready in minutes.

Fast Screenshot API Overview

The screenshot API offers a powerful means for developers to capture any URL as an image format like PNG, JPEG, or WebP via a REST interface. Remarkably, the response time is typically under three seconds. With this tool, you can specify custom viewport dimensions, full-page capture, retina 2x resolution, and even enable dark mode effortlessly.

Interested in trying it out? The API provides 250 free credits each month, perfect for testing and integration. With over 2000 developers relying on it, this free screenshot tool is rapidly becoming a developer favorite.

Features and Customization

Our screenshot API enables extensive customization options for your website screenshot needs. You can capture full pages or specific sections by setting your preferred viewport size. Additionally, our full page capture capability ensures you do not miss any vital content on the target page.

Besides capturing the standard view, you can opt for retina 2x resolution for higher clarity or transform the page display with dark mode. These features make the API versatile for capturing various display scenarios programmatically.

Efficient REST API Usage

Using the REST API screenshot capability, developers can convert any URL to an image with simple HTTP requests. The API is designed for ease of use, providing rapid responses in less than three seconds and supporting multiple image formats.

You can perform HTML to image conversion efficiently, thanks to our streamlined endpoint architecture. The HTML to image conversion page offers further insights into the API's functionality.

Getting Started with 250 Free Credits

New users can leverage 250 free credits each month to test and integrate the screenshot API into their workflows. This allocation empowers developers to explore different API features without initial costs, facilitating seamless incorporation into projects.

The simple setup process and comprehensive documentation make it easy to get started. Join the community of over 2000 developers who are already reaping the benefits of this programmatic screenshot solution.

FAQ

What image formats are supported?

The screenshot API supports PNG, JPEG, and WebP formats, allowing flexibility in choosing the best format for your use case.

How do I enable dark mode?

Dark mode can be activated by setting a specific parameter in your API request, allowing you to capture a website in an alternate color scheme.

What is the maximum capture resolution supported?

The API supports retina 2x resolution, ensuring high-quality images that are suitable for detailed analysis and presentations.

How quickly can I expect a response?

The API typically delivers responses in under three seconds, making it one of the fastest options available for capturing website screenshots via REST.

Ready to capture your first website screenshot? Start using the screenshot API today and transform the way you work with web images.