AI API · Page Information

Page Information

POST /get_page_info

https://ai.sneakypeekai.com

Open a public page and get a full capture: page title, final address after redirects, language, description, canonical link, favicon, social preview tags, headings, up to 50 outbound links, full HTML, visible text, a short human-readable summary paragraph, and a full-page screenshot. The screenshot is still returned when the page shows a login screen or cookie banner. Missing fields come back empty rather than null. Query parameters take precedence over body fields when both are set. Send a JSON body (e.g. {}) on POST requests.

Uses 1 credit plus 1 request from your per-minute and daily caps.

Authentication

Authenticate requests by sending your API key in the X-API-Key HTTP request header.

Mint and manage API keys in your Sneaky Peek AI Account → API Keys.

X-API-Key: $API_KEY

Parameters

Name In Type Required Notes
X-API-Key header string yes Your API key. Missing or wrong key returns 401.
url query string yes Public web page address (http or https). Also accepted in the JSON body. Query parameter takes precedence over body field.
proxy body string no Optional proxy URL for this request. Also accepted as a query parameter.
user_agent body string no Optional browser user agent for this request. userAgent is also accepted. Also accepted as a query parameter. Leave out to use the current desktop browser user agent.
viewport body object or string no Optional size as {"width":1920,"height":1080} in the body, or 1920x1080 as a query parameter.

Request Example (curl)

curl -X POST "https://ai.sneakypeekai.com/get_page_info?url=https://example.com" \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Success Response Example (200 OK)

{
  "status": 200,
  "page_info": {
    "title": "Example Domain",
    "url": "https://example.com",
    "final_url": "https://example.com/",
    "language": "",
    "description": "",
    "canonical": "",
    "favicon": "",
    "og": {
      "title": "",
      "description": "",
      "image": ""
    },
    "headings": {
      "h1": ["Example Domain"],
      "h2": []
    },
    "links": ["https://www.iana.org/domains/example"],
    "content": "<html>...</html>",
    "text_content": "Example Domain\\nThis domain is for use in illustrative examples...",
    "summary": "Example Domain. This domain is for use in illustrative examples in documents.",
    "screenshot_base64": "iVBORw0KGgoAAAANSUhEUgAA..."
  }
}

Common Error Status Codes

Status Code When / Description
400 The page address is missing or is not a public http or https site.
401 The API key is missing or invalid.
402 Insufficient credits for this call.
413 The captured page is larger than the allowed size.
411 The HTTP Content-Length header is completely missing from the request.
429 You hit a rate or daily limit. Wait for the retry time in the response headers.