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.
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:
Important: Keep your API keys secure! Never share them publicly or commit them to version control. Use environment variables in your applications.
/render
Renders a webpage as a Googlebot would see it and returns a full-page screenshot.
Request Body
| Parameter | Type | Description |
|---|---|---|
| url | string | The full URL of the webpage to render (e.g., https://example.com). |
Response
Returns a JSON object containing the Base64 encoded image data.
{
"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
| Status | Description |
|---|---|
| 200 OK | Request successful. The response body contains the base64 encoded image. |
| 400 Bad Request | Invalid request parameters (e.g., missing URL). |
| 401 Unauthorized | Invalid or missing API Key. |
| 402 Payment Required | Insufficient credits to perform the render. |
| 500 Internal Error | Server failed to process the request. |
Example Request
cURL
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)
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
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}")