Capture screenshots in Go
Add screenshot and scrolling GIF capabilities to your Go applications with the standard net/http library. No external dependencies, no headless browsers to manage.
Installation
- 1No external dependencies required — uses Go standard library
- 2Get your API key from the dashboard
- 3Set the X-KEY header in your HTTP requests
Authentication
Include your API key in the X-KEY header with every request:
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("X-KEY", "your-api-key")Go Screenshot Example
Capture a screenshot or create a scrolling GIF animation with a simple GET request:
curl "https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com&width=1280&height=720&format=png" \ -H "X-KEY: your-api-key" \ -o screenshot.png
curl "https://api.scrnpix.com/animate?url=https%3A%2F%2Fexample.com&scroll_duration=3000&scroll_easing=ease-in-out" \ -H "X-KEY: your-api-key" \ -o animation.gif
Response Format
On success, the API returns the image binary data directly in the response body.
| Status Code | 200 OK |
| Content-Type | image/png, image/jpeg, or image/gif |
| Body | Binary image data (io.Reader) |
| Error Response | Error message with 4xx/5xx status |
Key Features
Zero Setup
No need to install chromedp or manage headless Chrome. Just use the standard net/http library included with Go.
Production Ready
Built on Cloudflare Workers with global edge network. Handles concurrency and browser lifecycle automatically.
Go Integration
Simple HTTP client pattern. Integrates seamlessly with Gin, Echo, Fiber, or any Go framework. Perfect for concurrent requests.
Rich Features
Custom viewport sizes, full page capture, PNG/JPEG formats, scrolling GIFs with 15 easing functions.
Frequently Asked Questions
Do I need to install any browser dependencies for Go?
No. Scrnpix runs browsers on our infrastructure. You only need the Go standard library net/http package to make HTTP calls.
Can I use this with Gin or Echo?
Yes. Scrnpix works with any Go framework — Gin, Echo, Fiber, or plain Go applications.
How do I handle errors in Go?
Check the response status code. A 200 status means success with image bytes in the body. 4xx errors indicate invalid params or auth issues, 5xx errors are server-side.
What Go version is required?
Any modern Go version (1.16+) with standard library support. The API is a simple HTTP GET request.
Ready to capture screenshots in Go?
Get your API key and start rendering screenshots in seconds. Free tier includes 50 screenshots per month.
Start Free