Tutorial

How to Extract Page Metadata and Structure

Use /v1/analyze to get page type, primary CTA, technologies, headings, links, word count, and an optional visual snapshot — all from one browser session.

Steps

  1. Call /v1/analyzeSend a GET request to /v1/analyze with your URL. Returns rich structured JSON: page_type, primary_cta (text + href), nav_items, forms_count, technologies, word_count, og tags, and more.
  2. Add screenshot=true for the visualInclude screenshot=true to also receive a base64 PNG snapshot alongside the structured data — one browser session, zero extra cost.
  3. Use /v1/metadata for lightweight extractionFor just title, description, OG tags, favicon, headings, and links without full analysis, use /v1/metadata — faster and cheaper.
  4. Feed to AI agentsPass the structured JSON to your LLM. The model can understand page intent, CTA, and technology stack without needing to see the screenshot.

Code Examples

curl "https://snapapi.tech/v1/analyze?url=https://example.com" \
  -H "x-api-key: YOUR_KEY" | jq '{page_type, primary_cta, technologies, word_count}'
import requests

response = requests.get(
    "https://snapapi.tech/v1/analyze",
    params={"url": "https://example.com"},
    headers={"x-api-key": "YOUR_KEY"}
).json()

print(response["page_type"])           # "landing"
print(response["primary_cta"]["text"]) # "Get started"
print(response["technologies"])         # ["react", "stripe"]
print(response["word_count"])           # 1200
const res = await fetch(
  "https://snapapi.tech/v1/analyze?url=https://example.com",
  { headers: { "x-api-key": "YOUR_KEY" } }
);
const data = await res.json();
console.log(data.page_type);           // "landing"
console.log(data.primary_cta.text);    // "Get started"
console.log(data.technologies);         // ["react", "stripe"]
console.log(data.word_count);           // 1200
Get Free API KeyFull API Docs