WhatGoogleSees

API Documentation

Complete guide to integrate WhatBotSees rendering engine into your applications.

Getting Started

To use the WhatBotSees API, you need to be authenticated. All API requests require token-based authentication via API Keys.

Base URL:https://whatbotsees.com/api/v1

Authentication

All API endpoints require authentication via API Key. You must create an API key from your dashboard to use the API.

How to Authenticate

Include your API key in the request headers using one of these methods:

Method 1: Authorization Header (Recommended)
Authorization: Bearer sk_live_XXXXXXXXXX
Method 2: X-API-Key Header
X-API-Key: sk_live_XXXXXXXXXX

Important: Keep your API keys secure! Never share them publicly or commit them to version control. Use environment variables in your applications.

POST

/render

Renders a webpage as a Googlebot would see it and returns a full-page screenshot.

Request Body

ParameterTypeDescription
urlstringThe full URL of the webpage to render (e.g., https://example.com).

Response

Returns a JSON object containing the Base64 encoded image data.

Content-Type: application/json200 OK
json
{
  "success": true,
  "data": {
    "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJ...",
    "format": "png"
  }
}

Rate Limits

To ensure fair usage and system stability, the API is rate-limited.

100 Requests / Minute

Per API Key

Error Codes

StatusDescription
200 OKRequest successful. The response body contains the base64 encoded image.
400 Bad RequestInvalid request parameters (e.g., missing URL).
401 UnauthorizedInvalid or missing API Key.
402 Payment RequiredInsufficient credits to perform the render.
500 Internal ErrorServer failed to process the request.

Example Request

cURL

bash
curl -X POST https://whatbotsees.com/api/v1/render \
  -H "Authorization: Bearer sk_live_123456789" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

Node.js (Axios)

javascript
const axios = require('axios');
const fs = require('fs');

async function takeScreenshot() {
  try {
    const response = await axios.post(
      'https://whatbotsees.com/api/v1/render',
      { url: 'https://example.com' },
      {
        headers: {
          'Authorization': 'Bearer sk_live_123456789',
          'Content-Type': 'application/json'
        }
      }
    );

    if (response.data.success) {
      const base64Data = response.data.data.image.replace(/^data:image\/png;base64,/, "");
      fs.writeFileSync("screenshot.png", base64Data, 'base64');
      console.log('Screenshot saved!');
    }
  } catch (error) {
    console.error('Error:', error.response?.data || error.message);
  }
}

takeScreenshot();

Python

python
import requests
import base64

url = "https://whatbotsees.com/api/v1/render"
headers = {
    "Authorization": "Bearer sk_live_123456789",
    "Content-Type": "application/json"
}
data = {"url": "https://example.com"}

response = requests.post(url, json=data, headers=headers)

if response.status_code == 200:
    result = response.json()
    if result.get("success"):
        image_data = result["data"]["image"].split(",")[1]
        with open("screenshot.png", "wb") as f:
            f.write(base64.b64decode(image_data))
        print("Screenshot saved!")
    else:
        print(f"API Error: {result.get('error')}")
    print(f"HTTP Error: {response.status_code} - {response.text}")