Dashboard
API Reference
Programmatically generate high-fidelity PNGs, PDFs, and WebP artifacts at scale bypassing our UI Rate Limits using the WebsitetoImage headless API.
Pro Authentication
By default, all requests are bounded by a strict 5 req/minute IP limit. Upgrading to the Pro tier yields a permanent secret token. Attach this token to the Authorization header to seamlessly bypass rate limits.
Authorization: Bearer snap_live_XXXXXXXXXXXXXXXXXXXXXXXXHTTP REST Architecture
WebsitetoImage utilizes asynchronous Server-Sent Events (SSE) to track complex Chromium rendering metrics in real-time. Once the remote extraction is finalized, you ping the secondary physical buffer router to stream the final binary payload.
GET
/api/download?url=YOUR_URLQuery Parameters
urlRequired. The fully qualified URI target (e.g. https://google.com).formatDefaults to png. Available:png, webp, pdf.darkmodeDefaults to false. Injects prefers-color-scheme logic.fullPageDefaults to false. Stitches massive vertical scrolls into single artifacts.
Implementation Snippets
Node.jsPythoncURL
// 1. Initiate Request & Await JSON Parse Event
const eventSource = new EventSource(
'https://websitetoimage.io/api/download?url=https://apple.com&format=png&darkmode=true'
);
eventSource.onmessage = (event) => {
const data = JSON.parse(event.data);
// 2. Physical File Stream Location Trigger
if (data.type === 'success') {
eventSource.close();
console.log("Extraction successful. Target buffer:", data.filename);
// Download the physical artifact
window.open(`https://websitetoimage.io/api/file?filename=${data.filename}`);
}
};