GoScreenAPI
Go — GoScreenAPI

Website Screenshots in Go — Zero Dependencies

Capture any website screenshot from Go using only the standard library. No external packages, no Chrome binary, goroutine-safe and Docker-friendly.

250 free screenshots/month No credit card required REST API · JSON
go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"os"
)

type ScreenshotRequest struct {
	URL      string `json:"url"`
	FullPage bool   `json:"full_page"`
	Format   string `json:"format"`
	BlockAds bool   `json:"block_ads"`
}

type ScreenshotResponse struct {
	ImageURL   string `json:"image_url"`
	DurationMs int    `json:"duration_ms"`
	Status     string `json:"status"`
}

func Capture(url string) (*ScreenshotResponse, error) {
	body, _ := json.Marshal(ScreenshotRequest{
		URL: url, FullPage: true, Format: "png", BlockAds: true,
	})
	req, _ := http.NewRequest("POST",
		"https://goscreenapi.com/api/v1/screenshot",
		bytes.NewBuffer(body))
	req.Header.Set("X-API-Key", os.Getenv("GOSCREENAPI_KEY"))
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil { return nil, err }
	defer resp.Body.Close()

	var result ScreenshotResponse
	json.NewDecoder(resp.Body).Decode(&result)
	return &result, nil
}

func main() {
	shot, _ := Capture("https://vercel.com")
	fmt.Println(shot.ImageURL) // https://cdn.goscreenapi.com/...
}
Features

Everything you need.
Nothing you don't.

Zero Dependencies

Uses only net/http, encoding/json, bytes — no go get needed.

Goroutine Safe

http.DefaultClient is goroutine-safe. Run concurrent screenshot captures easily.

Typed Structs

Define request/response structs for clean, idiomatic Go code.

Docker Friendly

No Chrome binary in your container — tiny Docker images stay tiny.

Full-Page & PDF

FullPage: true for scrollable pages, Format: "pdf" for PDF output.

Context Support

Use http.NewRequestWithContext for timeout and cancellation control.

Use Cases

Built for real workflows

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

Go Microservices

Screenshot endpoint in a Go HTTP service — clean, fast, no dependencies.

CLI Tools

Build command-line screenshot tools in Go with a single binary output.

Concurrent Capture

Use goroutines to capture multiple URLs concurrently with a worker pool.

Lambda / Cloud Run

No Chrome binary means tiny deployment packages for serverless Go functions.

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 net/http to POST to /api/v1/screenshot with your X-API-Key header. Decode the JSON response to get image_url.
No. The standard library (net/http, encoding/json, bytes) is all you need. No go get required.
Yes. http.DefaultClient is goroutine-safe. Use a worker pool with goroutines and a channel to process multiple URLs concurrently.
Yes. No Chrome binary needed — your Go container stays small. Works in any Docker image that can make HTTPS requests.
Use http.NewRequestWithContext(ctx, ...) with a context.WithTimeout to control request timeouts.
Yes. Set Format: "pdf" in your request struct to get a PDF URL back.

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.