NewIntroducing semantic snapshotsPair every capture with structured DOM data →

For teams with a performance budget

Catch the deploy that doubled the page weight

Get a page's resources with their sizes and lab load metrics from one capture, and compare them across deploys.

The problem

Nobody decided to make the home page twice as heavy. A hero video went in uncompressed, a new tag brought its own copy of a framework, and a font family arrived in nine weights. Each change was reasonable; together they make a slower page, and nobody can say which deploy did it.

How domscout handles it

diagnostics lists every resource the page loaded with its type and transfer size, and analysis.diagnostics.summary.transferBytes adds them up. Browsers report the size of a resource from another origin only when its server allows it, so treat the total as a floor. performanceOverlay measures first contentful paint, largest contentful paint, cumulative layout shift and time to first byte, returns them in performanceMetrics and draws them onto the screenshot. Record both on every deploy and a jump has a date and a list of suspects. These are lab numbers from one load in one place, good for spotting a change, not a substitute for what real visitors experience.

Where it shows up

  • A CI step that fails when a page's resources cross a budget.
  • A weekly record of the heaviest resources on key pages.
  • Before and after numbers for an image or font optimisation.

The request

POST /screenshot. performanceOverlay works on every plan at 1 credit. diagnostics, for the resource list, starts at Pro and brings the request to 2 credits.

cURL
curl -X POST https://api.domscout.io/screenshot \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.example.com/",
    "performanceOverlay": true,
    "diagnostics": {
      "console": false,
      "pageErrors": false,
      "network": false,
      "resources": true,
      "timing": false,
      "maxEntries": 250
    },
    "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({
    url: "https://www.example.com/",
    performanceOverlay: true,
    diagnostics: {
      console: false,
      pageErrors: false,
      network: false,
      resources: true,
      timing: false,
      maxEntries: 250
    },
    responseType: "json"
  }),
});
const result = await response.json();
console.log(result.performanceMetrics);
Python
import requests

response = requests.post(
    "https://api.domscout.io/screenshot",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "url": "https://www.example.com/",
        "performanceOverlay": True,
        "diagnostics": {
            "console": False,
            "pageErrors": False,
            "network": False,
            "resources": True,
            "timing": False,
            "maxEntries": 250
        },
        "responseType": "json"
    },
)
print(response.json()["performanceMetrics"])
Go
package main

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

func main() {
	body, _ := json.Marshal(map[string]any{
		"url": "https://www.example.com/",
		"performanceOverlay": true,
		"diagnostics": map[string]any{
			"console": false,
			"pageErrors": false,
			"network": false,
			"resources": true,
			"timing": false,
			"maxEntries": 250,
		},
		"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()

	var result map[string]any
	json.NewDecoder(res.Body).Decode(&result)
	fmt.Println(result["performanceMetrics"])
}
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([
        'url' => 'https://www.example.com/',
        'performanceOverlay' => true,
        'diagnostics' => [
            'console' => false,
            'pageErrors' => false,
            'network' => false,
            'resources' => true,
            'timing' => false,
            'maxEntries' => 250
        ],
        'responseType' => 'json'
    ]),
]);
$response = curl_exec($ch);
if ($response === false) {
    throw new RuntimeException(curl_error($ch));
}
$result = json_decode($response, true);
print_r($result['performanceMetrics']);
Ruby
require "json"
require "net/http"

response = Net::HTTP.post(
  URI("https://api.domscout.io/screenshot"),
  {
    url: "https://www.example.com/",
    performanceOverlay: true,
    diagnostics: {
      console: false,
      pageErrors: false,
      network: false,
      resources: true,
      timing: false,
      maxEntries: 250
    },
    responseType: "json"
  }.to_json,
  "Content-Type" => "application/json",
  "x-api-key" => "YOUR_API_KEY"
)
puts JSON.parse(response.body)["performanceMetrics"]
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 = """
            {
                "url": "https://www.example.com/",
                "performanceOverlay": true,
                "diagnostics": {
                    "console": false,
                    "pageErrors": false,
                    "network": false,
                    "resources": true,
                    "timing": false,
                    "maxEntries": 250
                },
                "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 System.Text.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 {
    url = "https://www.example.com/",
    performanceOverlay = true,
    diagnostics = new {
        console = false,
        pageErrors = false,
        network = false,
        resources = true,
        timing = false,
        maxEntries = 250
    },
    responseType = "json"
});
var result = await response.Content.ReadFromJsonAsync<JsonElement>();
Console.WriteLine(result.GetProperty("performanceMetrics"));

Go further

More in SEO and site health: SEO regression checks · Link preview checks · Find every page on a site · Website migration checks · JavaScript SEO checks · Backlink checks · JSON-LD structured data checks · hreflang checks · Website audits for prospects · All use cases

Give your product a browser.

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