Web Monitoring API

Monitor websites for visual changes, content updates, and availability. Capture timestamped screenshots and detect changes automatically.

Get Free API Key

What Web Monitoring Can Detect

Web monitoring with screenshots detects a broader class of changes than simple uptime checks or keyword monitors. A traditional uptime monitor detects when a page returns a non-200 HTTP status code, but misses the page that loads successfully with an empty product catalog, the pricing page where a competitor quietly dropped their enterprise tier, the dashboard that renders correctly but shows incorrect data due to a backend bug, and the checkout flow that works technically but shows an error message on the payment step. Screenshot-based monitoring captures all of these cases because it captures what the page actually looks like, not just whether it responded. Pixel-level change detection flags any visual modification: a banner that appeared, a section that disappeared, a price that changed, a design update that broke layout on mobile, or a feature flag that accidentally rolled out to all users. For e-commerce, competitive intelligence, regulatory compliance, and internal application monitoring, screenshot-based monitoring provides a level of fidelity that status checks cannot match.

Building a Screenshot Monitoring System

A screenshot monitoring system has four components: a URL list with capture frequency settings, a scheduler that triggers screenshot capture at the configured frequency, a storage layer for screenshots and comparison results, and a change detection pipeline that compares each new screenshot against the previous one and triggers alerts on significant differences. SnapAPI provides the screenshot capture layer; your application provides the other three components. A minimal implementation can run on a single server with a cron job, a PostgreSQL database for metadata, and S3 for screenshot storage.

# Python: screenshot monitoring script (cron or scheduler)
import requests, psycopg2, boto3, hashlib
from datetime import datetime
from io import BytesIO
from PIL import Image, ImageChops

API_KEY = "YOUR_API_KEY"
DB_URL = "postgresql://user:pass@localhost/monitoring"
S3_BUCKET = "my-monitoring-bucket"

s3 = boto3.client("s3")
db = psycopg2.connect(DB_URL)

def capture(url):
    resp = requests.get(
        "https://api.snapapi.pics/screenshot",
        params={"url": url, "format": "png", "viewport_width": 1280, "full_page": "true"},
        headers={"Authorization": f"Bearer {API_KEY}"},
        timeout=60,
    )
    resp.raise_for_status()
    return resp.content

def get_last_screenshot(url_id):
    with db.cursor() as cur:
        cur.execute(
            "SELECT s3_key FROM screenshots WHERE url_id=%s ORDER BY captured_at DESC LIMIT 1",
            (url_id,)
        )
        row = cur.fetchone()
        if not row:
            return None
        obj = s3.get_object(Bucket=S3_BUCKET, Key=row[0])
        return obj["Body"].read()

def pixel_diff_percent(img1_bytes, img2_bytes):
    img1 = Image.open(BytesIO(img1_bytes)).convert("RGB")
    img2 = Image.open(BytesIO(img2_bytes)).convert("RGB")
    if img1.size != img2.size:
        img2 = img2.resize(img1.size)
    diff = ImageChops.difference(img1, img2)
    total = img1.width * img1.height * 3
    changed = sum(sum(row) for row in diff.getdata())
    return changed / (total * 255) * 100

def monitor(url_id, url, threshold=2.0):
    current = capture(url)
    ts = datetime.utcnow()
    s3_key = f"screenshots/{url_id}/{ts.strftime('%Y/%m/%d/%H%M%S')}.png"
    s3.put_object(Bucket=S3_BUCKET, Key=s3_key, Body=current)

    with db.cursor() as cur:
        cur.execute(
            "INSERT INTO screenshots (url_id, s3_key, captured_at) VALUES (%s, %s, %s)",
            (url_id, s3_key, ts)
        )
    db.commit()

    previous = get_last_screenshot(url_id)
    if previous is None:
        print(f"[BASELINE] {url}")
        return

    diff = pixel_diff_percent(previous, current)
    if diff > threshold:
        print(f"[CHANGED] {url}: {diff:.2f}% pixel change")
        # trigger_alert(url, diff, s3_key)
    else:
        print(f"[OK] {url}: {diff:.2f}% delta")

Content Change Monitoring with Scraping

For monitoring specific content changes rather than full visual diffs, combine SnapAPI's screenshot endpoint with the scraping endpoint. The scraping endpoint returns the page's text content, title, meta description, and links as structured JSON. Store the scraped content hash alongside each screenshot, and detect content changes by comparing hashes: if the hash changes, something on the page changed textually. This is more efficient than pixel comparison for text-heavy pages where minor rendering differences in anti-aliasing or font hinting would trigger false positives on pixel diff but do not represent meaningful content changes. Use screenshot comparison for layout and visual monitoring, and content hash comparison for text and data change detection, running both checks on each capture cycle for comprehensive coverage.

Alert Routing and Notification

A monitoring system without reliable alerting provides no value. When change detection identifies a significant difference, route the alert to the appropriate channel based on the monitored URL's configuration. Slack alerts with a screenshot attachment work well for internal dashboard monitoring and visual regression notifications. Email alerts work well for compliance monitoring workflows where the alert needs to be recorded. PagerDuty or Opsgenie integration is appropriate for production website monitoring where downtime or content errors require immediate response. Webhook notifications allow custom integrations with any downstream system. Structure alerts to include the URL that changed, the percentage change, direct links to the new and previous screenshots stored in S3, and a thumbnail of the diff image showing exactly what changed visually. This context allows the on-call engineer to assess the severity and nature of the change without logging into a separate monitoring dashboard.

Pricing and Capacity for Monitoring

Screenshot monitoring API usage depends on the number of monitored URLs and capture frequency. A monitoring system watching 50 URLs every 30 minutes generates 50 times 48 equals 2,400 screenshots per day or roughly 72,000 per month, which exceeds the Growth plan and requires a custom enterprise plan. For most teams starting out, monitoring 20 to 30 URLs hourly generates 480 to 720 screenshots per day or 14,400 to 21,600 per month, fitting comfortably within the Growth plan at 50,000 requests per month. Reduce API consumption by implementing adaptive frequency: decrease capture frequency for URLs that rarely change and increase it for URLs that show high change rates. URLs with low historical change rates can be monitored daily rather than hourly without losing meaningful monitoring coverage. The free tier at 200 requests per month supports monitoring 6 URLs once per day, which is sufficient to evaluate the monitoring pattern before choosing a paid plan.

Monitoring Competitor Pages and Pricing

Competitive monitoring is one of the highest-value use cases for screenshot-based web monitoring. Set up screenshot captures of competitor pricing pages, feature comparison pages, and product announcement pages on a daily or hourly schedule. When change detection identifies a significant visual difference on a competitor's pricing page, you receive an alert with a screenshot showing exactly what changed: a new tier was added, a price was reduced, a feature was moved or removed, or a promotional offer appeared. This gives your team an immediate competitive signal without manually checking competitor sites or relying on social media announcements. Combined with SnapAPI's scraping endpoint, you can also monitor the text content of competitor pages, detecting changes in marketing copy, feature descriptions, and job postings that signal product direction changes. A competitive monitoring dashboard showing weekly screenshots of key competitor pages across your category provides a searchable visual history of how the competitive landscape evolved, which is valuable for product strategy and board presentations.

Monitoring Internal Dashboards and Admin Pages

Internal dashboard monitoring is a powerful use case that most teams overlook. Production dashboards, analytics reports, and admin pages show the real operational state of your product, but they are not typically covered by end-to-end tests or synthetic monitoring. A screenshot monitoring system that captures your key internal dashboards on a regular schedule provides a visual history of your product's operational metrics, alerts you when a dashboard breaks or shows anomalous data, and creates an audit trail of what your dashboards showed at each point in time. For compliance and financial services applications, maintaining timestamped screenshots of key operational dashboards is often a regulatory requirement. SnapAPI's cookie parameter allows the monitoring system to authenticate as a service account before capturing authenticated dashboard pages, enabling full-fidelity screenshots of pages behind login without maintaining a separate browser automation infrastructure.

Integration with Existing Monitoring Stacks

Screenshot monitoring integrates naturally with existing observability stacks. Emit change detection results as structured log events or metrics to your existing logging and metrics infrastructure: write a log line with the monitored URL, change percentage, and S3 key on every capture, and configure your log aggregator to alert when change percentage exceeds threshold. In Datadog, create a custom metric for screenshot change percentage and set up a monitor that alerts when it exceeds the configured threshold for any monitored URL. In Grafana, store change detection results in Prometheus or InfluxDB and create a dashboard showing the change history for each monitored URL as a time series. These integrations mean screenshot monitoring alerts route through the same channels and runbooks as your other operational alerts, rather than requiring a separate monitoring interface. The screenshot evidence stored in S3 enriches incident investigations by providing visual context for when and how a page changed, complementing the metric and log data already available in your observability stack.