ScreenshotAPI

SDKs & Libraries

Official ScreenshotAPI SDKs for JavaScript, Python, Go, Ruby, and PHP — plus a CLI and copy-paste HTTP examples for every other language.

ScreenshotAPI ships official, typed SDKs for five languages. Each one wraps the REST API with the same ergonomic surface: a screenshot() method for raw bytes, a save() helper that writes a file, typed errors, and every screenshot option as a first-class argument.

Official SDKs

LanguagePackageInstall
JavaScript / TypeScriptscreenshotapi-to (npm)npm install screenshotapi-to
Pythonscreenshotapi-to (PyPI)pip install screenshotapi-to
Goscreenshotapi-gogo get github.com/miketromba/screenshotapi-go
Rubyscreenshotapi_to (RubyGems)gem install screenshotapi_to
PHPscreenshotapi/sdk (Packagist)composer require screenshotapi/sdk

Each successful screenshot consumes 1 credit, and every account includes 200 free screenshots per month. See Credits for details.

Command line

Other languages

There isn't an official native package for these yet, but the API is a single HTTP call. These guides have copy-paste, idiomatic examples using each language's standard HTTP client.

Working in something else entirely? Any language that can make an HTTP request works — see the Screenshot API reference for the full endpoint contract.

What every SDK gives you

  • screenshot() — capture a URL (or rendered HTML) and get back the raw image/PDF bytes plus metadata (creditsRemaining, screenshotId, durationMs).
  • save() — capture and write the file to disk in one call.
  • Typed errors — distinct types for authentication, invalid keys, insufficient credits, and capture failures, so you can handle each case precisely.
  • Every option — full-page captures, dark mode, ad/cookie-banner removal, device mockups, geolocation, caching, HTML rendering, PDF export, and more. See each SDK's options table or the API reference.

On this page