NewIntroducing semantic snapshotsPair every capture with structured DOM data →

For tools that generate interfaces

Let a model see the page it just wrote

Render the HTML a model generated at three screen sizes and hand the pictures back to it for review.

The problem

A model can write a landing page in seconds and has no idea what it looks like. Overlapping text, a button that wraps out of sight on a phone, white text on a white card: each is obvious in a picture and invisible in the source the model just produced.

How domscout handles it

Send the generated markup as html with captureMode: grid, and Chromium lays it out at phone, tablet and desktop size in one request, after the stylesheets, fonts and images it links to have loaded. Pass the three images to a vision model along with the original instructions and ask what is wrong, or show them to a person before anything is published. The HTML never has to be deployed anywhere to get the pictures.

Where it shows up

  • A review step in an AI website or email builder.
  • Automatic critique of generated layouts before a person sees them.
  • Thumbnails of generated variants to choose between.

The request

POST /screenshot. Available on every plan, including the free Hobby plan. A grid capture costs 3 credits and a single viewport 1. A request can carry up to 1,000,000 characters of HTML.

cURL
curl -X POST https://api.domscout.io/screenshot \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<!doctype html><html><body><main><h1>Plans for every team</h1><p>Start free and upgrade when you grow.</p><a href=\"/signup\">Start free</a></main></body></html>",
    "captureMode": "grid",
    "format": "webp",
    "responseType": "json"
  }'
Node.js
const response = await fetch("https://api.domscout.io/screenshot", {
  method: "POST",
  headers: { "Content-Type": "application/json", "x-api-key": "YOUR_API_KEY" },
  body: JSON.stringify({
    html: "<!doctype html><html><body><main><h1>Plans for every team</h1><p>Start free and upgrade when you grow.</p><a href=\"/signup\">Start free</a></main></body></html>",
    captureMode: "grid",
    format: "webp",
    responseType: "json"
  }),
});
console.log(await response.json());
Python
import requests

response = requests.post(
    "https://api.domscout.io/screenshot",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "html": "<!doctype html><html><body><main><h1>Plans for every team</h1><p>Start free and upgrade when you grow.</p><a href=\"/signup\">Start free</a></main></body></html>",
        "captureMode": "grid",
        "format": "webp",
        "responseType": "json"
    },
)
print(response.json())
Go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	body, _ := json.Marshal(map[string]any{
		"html": "<!doctype html><html><body><main><h1>Plans for every team</h1><p>Start free and upgrade when you grow.</p><a href=\"/signup\">Start free</a></main></body></html>",
		"captureMode": "grid",
		"format": "webp",
		"responseType": "json",
	})
	req, _ := http.NewRequest("POST", "https://api.domscout.io/screenshot", bytes.NewReader(body))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("x-api-key", "YOUR_API_KEY")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	raw, _ := io.ReadAll(res.Body)
	fmt.Println(string(raw))
}
PHP
<?php
$ch = curl_init('https://api.domscout.io/screenshot');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'x-api-key: YOUR_API_KEY'],
    CURLOPT_POSTFIELDS => json_encode([
        'html' => '<!doctype html><html><body><main><h1>Plans for every team</h1><p>Start free and upgrade when you grow.</p><a href="/signup">Start free</a></main></body></html>',
        'captureMode' => 'grid',
        'format' => 'webp',
        'responseType' => 'json'
    ]),
]);
$response = curl_exec($ch);
if ($response === false) {
    throw new RuntimeException(curl_error($ch));
}
echo $response;
Ruby
require "json"
require "net/http"

response = Net::HTTP.post(
  URI("https://api.domscout.io/screenshot"),
  {
    html: "<!doctype html><html><body><main><h1>Plans for every team</h1><p>Start free and upgrade when you grow.</p><a href=\"/signup\">Start free</a></main></body></html>",
    captureMode: "grid",
    format: "webp",
    responseType: "json"
  }.to_json,
  "Content-Type" => "application/json",
  "x-api-key" => "YOUR_API_KEY"
)
puts response.body
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Capture {
    public static void main(String[] args) throws Exception {
        String body = """
            {
                "html": "<!doctype html><html><body><main><h1>Plans for every team</h1><p>Start free and upgrade when you grow.</p><a href=\"/signup\">Start free</a></main></body></html>",
                "captureMode": "grid",
                "format": "webp",
                "responseType": "json"
            }
            """;
        HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.domscout.io/screenshot"))
            .header("Content-Type", "application/json")
            .header("x-api-key", "YOUR_API_KEY")
            .POST(HttpRequest.BodyPublishers.ofString(body))
            .build();
        HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
C#
using System.Net.Http.Json;

using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");

var response = await client.PostAsJsonAsync("https://api.domscout.io/screenshot", new {
    html = "<!doctype html><html><body><main><h1>Plans for every team</h1><p>Start free and upgrade when you grow.</p><a href=\"/signup\">Start free</a></main></body></html>",
    captureMode = "grid",
    format = "webp",
    responseType = "json"
});
Console.WriteLine(await response.Content.ReadAsStringAsync());

Go further

More in AI and agents: Web access for AI agents · llms.txt from your docs · Screenshots for vision models · Coding agents checking their work · Newsletter curation · FAQ drafts from documentation · All use cases

Give your product a browser.

Get clean web content and visual proof into your workflow in minutes.