Skip to content
Go

Go Screenshot API for Scalable Website Capture

Add web capture to any Go service — HTTP servers, CLI tools, or background workers. Capture screenshots, generate PDFs, record videos, and extract HTML with a single function call. No CGo, no browser binaries.

What you can build

Microservice pipelines

Embed screenshot capture in Go microservices that process URLs from queues, APIs, or event streams.

CLI & DevOps tools

Build command-line tools that capture visual evidence of deployments, staging environments, or monitoring dashboards.

PDF generation

Convert any web page to PDF with paper size and margin controls — ideal for invoice and report generation.

High-throughput batch

Leverage Go concurrency to submit thousands of capture requests in parallel with goroutines.

What the API handles for you

Every output format

PNG, JPEG, WebP, full-page PDF, raw HTML, and video screencasts from one endpoint.

Automation steps

Click, type, scroll, navigate, and wait before capture — handle logins, cookie banners, and dynamic content.

80+ country routing

Render geo-gated pages from real browsers in any target country.

14+ app integrations

Deliver results to S3, Google Drive, Dropbox, Slack, and more — no upload code needed.

Batch & crawl

Capture entire sitemaps or crawl domains with built-in retries and progress tracking.

On-premise browsers

Run browser clients inside your network for compliance or latency requirements.

Installation

terminal
go get github.com/juliensobrier/screenshotcenter-go
Available on pkg.go.devpkg.go.dev/github.com/juliensobrier/screenshotcenter-go

Quick start

main.go
import sc "github.com/juliensobrier/screenshotcenter-go"

client := sc.New("your_api_key")

shot, err := client.Screenshot.Create("https://example.com", nil)
if err != nil { log.Fatal(err) }

result, err := client.WaitFor(shot.ID, nil)
if err != nil { log.Fatal(err) }

fmt.Println(result.URL)     // final URL
fmt.Println(result.Status)  // "finished"

More examples

Ciblage géographique
shot, err := client.Screenshot.Create("https://example.com", &sc.CreateParams{
    Country: "fr",
    Lang:    "fr-FR",
})
if err != nil { log.Fatal(err) }
result, _ := client.WaitFor(shot.ID, nil)
client.Screenshot.SaveImage(result.ID, "/tmp/fr.png", nil)
Génération de PDF
t := true
shot, _ := client.Screenshot.Create("https://example.com", &sc.CreateParams{PDF: &t})
done, _  := client.WaitFor(shot.ID, nil)
client.Screenshot.SavePDF(done.ID, "/tmp/page.pdf")
Gestion des erreurs
result, err := client.WaitFor(shot.ID, &sc.WaitForOptions{Timeout: 60000})
switch e := err.(type) {
case *sc.ScreenshotFailedError:
    fmt.Printf("screenshot failed: %s\n", e.Reason)
case *sc.TimeoutError:
    fmt.Printf("timed out after %dms\n", e.TimeoutMs)
case *sc.ApiError:
    fmt.Printf("API error %d: %s\n", e.Status, e.Message)
}
Crawl de site web
crawl, _ := client.Crawl.Create("https://example.com", "example.com", 100, nil)
result, _ := client.Crawl.WaitFor(crawl.ID, nil)
fmt.Println(result.TotalDiscovered)  // pages found

Resources

Frequently asked questions

Does the Go SDK use CGo?

No. The SDK is pure Go with no CGo dependencies. It makes HTTP calls to the ScreenshotCenter API — no browser binaries or system libraries needed.

Is it concurrent-safe?

Yes. The client is safe to use from multiple goroutines. Each request is independent and stateless.

Can I generate PDFs from Go?

Yes. Set the PDF parameter in the request and configure paper size, margins, and orientation.

How does this compare to chromedp?

chromedp requires a local Chrome installation and process management. ScreenshotCenter handles all of that — you get an API call instead of browser lifecycle code.

Related

Start capturing with Go today

Get 500 captures on the free trial — no credit card required. Install the SDK and take your first screenshot in minutes.