GET /screenshot

Scheduled Monitoring Snapshot — Periodic Visual Checks

Capture regular screenshots of important pages on a schedule for visual monitoring, uptime verification, and change detection workflows.

Parameters

NameValueDescription
urlhttps://example.comThe page to monitor visually
width1280Consistent viewport for comparison
height720Consistent viewport for comparison
formatpngPNG for pixel-perfect comparisons

cURL Example

cURL
curl -H "X-KEY: your-api-key" "https://api.scrnpix.com/screenshot?url=https://example.com&width=1280&height=720&format=png" -o "snapshot-$(date +%Y%m%d-%H%M%S).png"

SDK Example

Python
import requests
from datetime import datetime

response = requests.get(
    "https://api.scrnpix.com/screenshot",
    headers={"X-KEY": "your-api-key"},
    params={"url": "https://example.com", "width": 1280, "height": 720, "format": "png"}
)

timestamp = datetime.now().strftime("%Y%m%d-%H%M%S")
with open(f"snapshot-{timestamp}.png", "wb") as f:
    f.write(response.content)

Expected Output

Content-Typeimage/png
Credit Cost1 credit

Failure Modes

Dynamic content causes false-positive changes

Symptom: Every screenshot looks different due to ads or timestamps

Fix: Use image comparison with a threshold tolerance, or mask known dynamic regions before comparing.

Rate limit exceeded on frequent monitoring

Symptom: HTTP 429 Too Many Requests

Fix: Space out monitoring intervals. The free tier allows 20 requests per minute. Upgrade to a higher plan for more frequent monitoring.

Frequently Asked Questions

How often should I schedule monitoring snapshots?

It depends on how critical the page is. Hourly checks work for most monitoring. For critical pages, every 15 minutes is reasonable within rate limits.

How do I compare screenshots automatically?

Use image diff libraries like pixelmatch (Node.js) or Pillow (Python) to compare consecutive snapshots pixel-by-pixel and flag significant changes.

Related Recipes

Ready to try this recipe?

Get your API key and run this recipe in seconds. Free tier includes 50 credits per month.

Get API Key