Skip to content
Python

Python Screenshot API — Capture Websites, PDFs, and Authenticated Pages

Add web capture to any Python application — Django, Flask, FastAPI, scripts, or data pipelines. Take screenshots, generate PDFs, record videos, and extract HTML with a single API call. No headless browser to manage.

What you can build

SEO & monitoring

Capture visual snapshots of your pages across 80+ countries to verify localized content, OG images, and layout regressions.

Authenticated dashboards

Use automation steps to log in, navigate, and screenshot SaaS dashboards, client portals, and internal tools.

PDF generation

Convert any URL or HTML page to a formatted PDF with paper size, margin, and landscape controls.

Batch & data pipelines

Submit thousands of URLs for parallel capture. Integrate into ETL pipelines, scheduled cron jobs, or Airflow DAGs.

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
pip install screenshotcenter
Available on PyPIpypi.org/project/screenshotcenter

Quick start

main.py
from screenshotcenter import ScreenshotCenterClient

client = ScreenshotCenterClient(api_key="your_api_key")

shot = client.screenshot.create(url="https://example.com", country="us")
result = client.wait_for(shot["id"])

print(result["status"])   # finished
client.screenshot.save_image(result["id"], "homepage.png")

More examples

Ciblage géographique
# Capture from France
shot = client.screenshot.create(
    url="https://example.com",
    country="fr",
    language="fr-FR",
    timezone="Europe/Paris",
)
result = client.wait_for(shot["id"])
client.screenshot.save_image(result["id"], "fr.png")
Génération de PDF
shot = client.screenshot.create(url="https://example.com", pdf=True)
result = client.wait_for(shot["id"])
assert result["has_pdf"] is True
client.screenshot.save_pdf(result["id"], "page.pdf")
Gestion des erreurs
from screenshotcenter import ApiError, ScreenshotFailedError, TimeoutError

try:
    shot = client.screenshot.create(url="https://example.com")
    result = client.wait_for(shot["id"], timeout=60)
except ScreenshotFailedError as e:
    print(f"Screenshot {e.screenshot_id} failed: {e.error}")
except TimeoutError as e:
    print(f"Timed out after {e.timeout_ms}ms")
except ApiError as e:
    print(f"API error {e.status}: {e}")
Crawl de site web
crawl = client.crawl.create("https://example.com", "example.com", 100)
result = client.crawl.wait_for(crawl["id"])
print(result["total_discovered"])  # pages found

Resources

Frequently asked questions

Do I need Puppeteer or Playwright for Python screenshots?

No. ScreenshotCenter handles browser infrastructure for you. Install the Python SDK, pass a URL, and get the result — no headless browser setup required.

Can I generate PDFs from Python?

Yes. Set pdf=true in the API request to render any web page as a PDF with configurable paper size, margins, and orientation.

How do I screenshot a page behind a login?

Use automation steps to type credentials, click the submit button, wait for the redirect, and then capture the authenticated page.

Does the SDK support async/await?

The SDK uses synchronous HTTP calls by default. You can wrap calls in asyncio or use httpx for async workflows.

Related

Start capturing with Python today

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