Analyze a Page with AI
Send a URL to the CaptureKit AI analysis endpoint and receive structured insights about the page's content, design, technology stack, and SEO metadata.
Overview
The CaptureKit AI analysis endpoint combines screenshot capture with LLM-powered analysis. Pass any URL and a custom prompt — the API returns a structured JSON answer grounded in what the page actually looks like. Use it for competitor audits, UX reviews, or automated content QA.
Prerequisites
- A CaptureKit API key — get one at app.capturekit.dev
- Install dependencies for your language:
pip install requestsSteps
Submit an analysis request
Call GET /v1/analyze with the url and prompt parameters. The prompt shapes the AI's response.
import requests
API_KEY = "YOUR_API_KEY"
PROMPT = "Summarize the main value proposition of this page in 2 sentences. Then list the top 3 CTAs visible above the fold."
response = requests.get(
"https://api.capturekit.dev/v1/analyze",
headers={"x-api-key": API_KEY},
params={"url": "https://stripe.com", "prompt": PROMPT},
)
data = response.json()
print(data)Read the AI analysis
The response includes analysis (the AI's answer to your prompt), screenshot_url, and metadata like title and description.
print(f"Page : {data.get('title')}")
print(f"Preview : {data.get('screenshot_url')}")
print()
print("=== AI Analysis ===")
print(data.get("analysis", ""))Run a competitor audit across multiple pages
Analyze several competitor landing pages with a consistent prompt and save the results as a structured report.
import json, time, requests
API_KEY = "YOUR_API_KEY"
PROMPT = """Analyze this landing page and return a JSON object with these keys:
- value_proposition (string)
- primary_cta (string)
- target_audience (string)
- pricing_visible (boolean)
- social_proof_types (array of strings: "testimonials", "logos", "stats", etc.)"""
COMPETITORS = [
{"name": "Stripe", "url": "https://stripe.com"},
{"name": "Paddle", "url": "https://paddle.com"},
{"name": "Lemonsqueezy", "url": "https://lemonsqueezy.com"},
]
report = []
for comp in COMPETITORS:
r = requests.get("https://api.capturekit.dev/v1/analyze",
headers={"x-api-key": API_KEY},
params={"url": comp["url"], "prompt": PROMPT})
data = r.json()
analysis_text = data.get("analysis", "{}")
try:
# AI may return the JSON wrapped in markdown fences
raw = analysis_text.strip().removeprefix("```json").removesuffix("```").strip()
analysis = json.loads(raw)
except json.JSONDecodeError:
analysis = {"raw": analysis_text}
report.append({"competitor": comp["name"], "url": comp["url"], **analysis})
print(f"✓ {comp['name']} analyzed")
time.sleep(2)
with open("competitor_audit.json", "w") as f:
json.dump(report, f, indent=2)
print("\nReport saved to competitor_audit.json")Instruct the AI to return structured JSON in your prompt — the model will format its output accordingly, making it easy to parse and store results in a database or spreadsheet without additional post-processing.