Purpose-built for AI agent workflows

The Screenshot & Scraping API
for AI Agents

Give your LLM agents eyes and reading ability. Screenshot any URL for vision models, extract clean text for context windows, or scrape structured data — all from a single REST API.

Start Free — 200 calls/mo View Docs →

Three APIs, Every Agent Use Case Covered

Your agents need to see the web, read the web, and extract structured data from the web. SnapAPI does all three — one API key, one pricing plan, one integration.

📸

/v1/screenshot

Returns a full-page PNG. Feed directly to GPT-4o, Claude, or Gemini vision endpoints. Agents can "see" any website.

GET ?url=https://example.com&format=png
📖

/v1/extract

Returns clean Markdown text stripped of ads, nav, and boilerplate. Perfect for stuffing into LLM context windows.

GET ?url=https://example.com&format=markdown
🔍

/v1/scrape

Returns full rendered HTML after JS execution. Use CSS selectors to extract structured data, prices, tables, and lists.

GET ?url=https://example.com&selector=.price

Vision Agent: See Any Website

Feed a screenshot directly to GPT-4o or Claude Sonnet. Your agent can analyze layouts, read UI text, detect changes, and reason about visual content.

import anthropic
import requests
import base64

def agent_see_website(url: str, question: str) -> str:
    # Step 1: Get screenshot from SnapAPI
    response = requests.get(
        "https://api.snapapi.pics/v1/screenshot",
        headers={"X-API-Key": "YOUR_SNAPAPI_KEY"},
        params={"url": url, "format": "png", "full_page": True, "width": 1280}
    )
    image_data = base64.standard_b64encode(response.content).decode("utf-8")

    # Step 2: Send to Claude vision
    client = anthropic.Anthropic(api_key="YOUR_ANTHROPIC_KEY")
    message = client.messages.create(
        model="claude-opus-4-6",
        max_tokens=1024,
        messages=[{
            "role": "user",
            "content": [
                {"type": "image", "source": {"type": "base64", "media_type": "image/png", "data": image_data}},
                {"type": "text", "text": question}
            ]
        }]
    )
    return message.content[0].text

# Usage
result = agent_see_website(
    "https://competitor.com/pricing",
    "What are their pricing tiers and monthly costs? List all plans."
)
print(result)

Web Research Agent: Read + Reason Loop

Build an autonomous research agent that browses the web, extracts content, and synthesizes answers — all with clean Python.

import anthropic
import requests

SNAPAPI_KEY = "YOUR_SNAPAPI_KEY"
ANTHROPIC_KEY = "YOUR_ANTHROPIC_KEY"

def extract_page(url: str) -> str:
    """Extract clean markdown text from any URL."""
    r = requests.get(
        "https://api.snapapi.pics/v1/extract",
        headers={"X-API-Key": SNAPAPI_KEY},
        params={"url": url, "format": "markdown"}
    )
    return r.text[:8000]  # Trim to fit context window

def research_agent(query: str, urls: list) -> str:
    """Agent that reads multiple pages and synthesizes an answer."""
    client = anthropic.Anthropic(api_key=ANTHROPIC_KEY)

    # Gather context from all URLs
    context_parts = []
    for url in urls:
        content = extract_page(url)
        context_parts.append(f"--- Source: {url} ---
{content}
")

    combined_context = "
".join(context_parts)

    response = client.messages.create(
        model="claude-sonnet-4-6",
        max_tokens=2048,
        messages=[{
            "role": "user",
            "content": f"Research question: {query}

Sources:
{combined_context}

Provide a detailed, accurate answer based only on the sources above."
        }]
    )
    return response.content[0].text

# Usage: competitive pricing research
answer = research_agent(
    "What are the pricing tiers and rate limits for screenshot APIs in 2026?",
    [
        "https://screenshotone.com/pricing",
        "https://urlbox.com/pricing",
        "https://apiflash.com/pricing"
    ]
)
print(answer)

OpenAI Tool Call Integration

Register SnapAPI as a tool in GPT-4o function calling. The model decides when to browse the web.

from openai import OpenAI
import requests, json

client = OpenAI(api_key="YOUR_OPENAI_KEY")
SNAPAPI_KEY = "YOUR_SNAPAPI_KEY"

tools = [{
    "type": "function",
    "function": {
        "name": "extract_webpage",
        "description": "Extract clean text content from a webpage URL for reading and analysis",
        "parameters": {
            "type": "object",
            "properties": {
                "url": {"type": "string", "description": "The URL to extract content from"}
            },
            "required": ["url"]
        }
    }
}]

def extract_webpage(url: str) -> str:
    r = requests.get("https://api.snapapi.pics/v1/extract",
        headers={"X-API-Key": SNAPAPI_KEY},
        params={"url": url, "format": "markdown"})
    return r.text[:6000]

messages = [{"role": "user", "content": "What does SnapAPI offer compared to ScreenshotOne? Check their websites."}]

# Agentic loop
while True:
    response = client.chat.completions.create(model="gpt-4o", tools=tools, messages=messages)
    msg = response.choices[0].message
    if msg.tool_calls:
        messages.append(msg)
        for tc in msg.tool_calls:
            result = extract_webpage(**json.loads(tc.function.arguments))
            messages.append({"role": "tool", "tool_call_id": tc.id, "content": result})
    else:
        print(msg.content)
        break

SnapAPI vs Other Agent Web Tools

Feature SnapAPI Firecrawl Jina AI ScrapingBee
Screenshot (vision input)
Clean text extraction
PDF generation
Price for 50K calls/mo $79 $83 $200+ $99
Free tier 200/mo 500/mo 200/mo 150/mo
JS-rendered pages Partial

Common Agent Patterns

🔍 Competitive Monitoring

Screenshot competitor pricing pages daily. Feed to vision model. Alert when prices or plans change. Zero scraping rules to maintain.

📰 Content Research Pipeline

Extract markdown from 10 sources. Summarize with an LLM. Generate a report. All in one Python script under 50 lines.

🤖 QA Visual Testing

Screenshot your own app pages after each deploy. Ask a vision model "does this look correct?". Catch visual regressions with AI instead of pixel-diff tools.

📊 Live Price Tracking

Scrape e-commerce pages for pricing data. Use CSS selectors to extract the exact price element. Feed into a time-series database for trend analysis.

FAQ for Agent Builders

Does it handle JavaScript-heavy SPAs?

Yes. SnapAPI uses real Chromium and waits for network idle before returning content. React, Vue, and Angular apps render fully.

What format does /v1/extract return?

Markdown by default — clean, LLM-friendly text with headings preserved. Also supports plain text and structured JSON for specific element extraction.

Can I run 100 screenshots in parallel for batch agents?

Yes. Use async HTTP calls (aiohttp in Python, Promise.all in Node.js). The Growth plan supports 50K calls/month with no per-minute throttle on the API side.

How do I handle cookie banners and GDPR popups?

Pass block_cookie_banners: true in the request. SnapAPI automatically dismisses common cookie consent dialogs before capturing.

Is there an official Python or Node SDK?

Yes — pip install snapapi-python and npm install snapapi-js. Both include typed wrappers for screenshot, scrape, extract, and PDF endpoints.

Give Your Agents Eyes and a Brain

Start building in minutes. 200 free API calls/month — no credit card required.

Start Free Read the Docs →

Continuous Monitoring Agent Pattern

import requests, anthropic, hashlib, json
from datetime import datetime

SNAPAPI_KEY = "YOUR_SNAPAPI_KEY"
ANTHROPIC_KEY = "YOUR_ANTHROPIC_KEY"

def extract_page(url):
    r = requests.get("https://api.snapapi.pics/v1/extract",
        headers={"X-API-Key": SNAPAPI_KEY}, params={"url": url, "format": "markdown"})
    return r.text

def analyze_change(old, new, url):
    client = anthropic.Anthropic(api_key=ANTHROPIC_KEY)
    resp = client.messages.create(model="claude-sonnet-4-6", max_tokens=512, messages=[{
        "role": "user",
        "content": f"Summarize what changed at {url}:

OLD:
{old[:2000]}

NEW:
{new[:2000]}"
    }])
    return resp.content[0].text

# Run on a cron/schedule
WATCH_URLS = ["https://competitor.com/pricing", "https://competitor.com/features"]
state = {}
for url in WATCH_URLS:
    new_text = extract_page(url)
    new_hash = hashlib.sha256(new_text.encode()).hexdigest()
    if url in state and state[url]["hash"] != new_hash:
        print(f"CHANGE: {analyze_change(state[url]['text'], new_text, url)}")
    state[url] = {"hash": new_hash, "text": new_text, "at": datetime.now().isoformat()}

Agent Reliability Patterns

Retry with Backoff

Wrap SnapAPI calls with 3-attempt exponential backoff (1s, 2s, 4s). Handles transient failures without agent loop crashes.

Limit Context Size

Truncate extracted text to 4K-6K tokens before LLM calls. Keeps costs predictable and avoids context window errors.

Cap Loop Depth

Set max_iterations guard on all agentic loops. An uncapped agent can exhaust quota and budget in a single runaway execution.

Log Everything

Store full extracted text and LLM reasoning per run. When an agent makes a wrong call, the audit trail is the only way to debug it.

Common Agent Questions

Can agents process 100+ URLs in a single run?

Yes. Use asyncio with a Semaphore(5) to run 5 parallel extractions. The Growth plan (50K/mo) supports sustained batch workloads without per-minute throttling.

Does /v1/extract work on JS-heavy SPAs?

Yes. SnapAPI runs real Chromium and waits for network idle before extracting. React, Vue, and Angular apps render fully — content is not empty.

Is there an official Python SDK?

Yes. pip install snapapi-python for typed wrappers around screenshot, scrape, extract, and PDF endpoints. Works with all major async frameworks.

Give Your AI Agents Eyes and a Brain

Screenshot, scrape, extract, and generate PDFs from one API. 200 free calls per month, no credit card.

Start Free Read Docs

Why SnapAPI is Purpose-Built for Agent Workloads

Most web scraping and screenshot APIs were built for human-driven workflows: a user clicks a button, a screenshot is taken. AI agent workflows are fundamentally different — they run at machine speed, in parallel, on arbitrary URLs, with no human in the loop.

No Rate Limits on Burst Traffic

When an agent processes a research task, it might make 20-50 API calls in a 30-second window. SnapAPI does not throttle at the per-minute level — only at the monthly quota level. This means agent batch operations run at full speed without hitting 429 errors every few seconds.

Markdown Output Optimized for LLM Token Budgets

The /v1/extract endpoint strips navigation, footers, ads, cookie notices, and boilerplate before returning text. For a typical news article or product page, this reduces the token count by 60-80% compared to passing raw HTML. At GPT-4o pricing of $10 per million input tokens, this token reduction directly translates to cost savings on every agent run.

Screenshot Format Optimized for Vision Models

Vision models like GPT-4o and Claude Sonnet work best with screenshots at 1280px width. SnapAPI defaults to this width and returns PNG by default — the format with the best quality-to-size ratio for vision model analysis. No resizing, no format conversion needed before sending to the LLM.

All Three Endpoints Under One Bill

Real agent workflows use all three modalities: screenshot a page for visual analysis, extract its text for context, scrape a specific data element for a structured record. Paying for three separate APIs (Firecrawl for text, ScrapingBee for scraping, a screenshot API for images) costs $250-400/mo at typical agent volumes. SnapAPI does all three for $79/mo at 50K calls.