NewIntroducing semantic snapshotsPair every capture with structured DOM data →

For pages people print

See your print stylesheet without printing anything

Render the page with its print styles applied, as an image or a PDF, and review it without a printer.

The problem

Recipes, boarding passes, invoices, articles: people still print them. The print stylesheet was written once and nobody checks it, so the printed page carries the navigation, the cookie banner and half a page of adverts.

How domscout handles it

render.media: print applies the page's print stylesheet to an ordinary capture, and fullPage turns it into one long image of the printed layout to review or compare between releases. format: pdf uses the print styles by default and paginates at the paper size you choose, which shows where the page breaks fall.

Where it shows up

  • A review of print styles on recipe, ticket or invoice pages.
  • An image of the print layout to compare across releases.
  • A check that navigation and adverts are hidden on paper.

The request

POST /screenshot. render and fullPage start at Pro. This capture costs 2 credits, and a PDF of the same page 2.

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/recipes/42",
    "render": {"media": "print"},
    "fullPage": true,
    "format": "png",
    "responseType": "binary"
  }' \
  -o print.png
Node.js
import { writeFile } from "node:fs/promises";

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/recipes/42",
    render: { media: "print" },
    fullPage: true,
    format: "png",
    responseType: "binary"
  }),
});
await writeFile("print.png", Buffer.from(await response.arrayBuffer()));
Python
import requests

response = requests.post(
    "https://api.domscout.io/screenshot",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "url": "https://www.example.com/recipes/42",
        "render": {"media": "print"},
        "fullPage": True,
        "format": "png",
        "responseType": "binary"
    },
)
with open("print.png", "wb") as f:
    f.write(response.content)
Go
package main

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

func main() {
	body, _ := json.Marshal(map[string]any{
		"url": "https://www.example.com/recipes/42",
		"render": map[string]any{"media": "print"},
		"fullPage": true,
		"format": "png",
		"responseType": "binary",
	})
	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()

	out, _ := os.Create("print.png")
	defer out.Close()
	io.Copy(out, res.Body)
}
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/recipes/42',
        'render' => ['media' => 'print'],
        'fullPage' => true,
        'format' => 'png',
        'responseType' => 'binary'
    ]),
]);
$response = curl_exec($ch);
if ($response === false) {
    throw new RuntimeException(curl_error($ch));
}
file_put_contents('print.png', $response);
Ruby
require "json"
require "net/http"

response = Net::HTTP.post(
  URI("https://api.domscout.io/screenshot"),
  {
    url: "https://www.example.com/recipes/42",
    render: { media: "print" },
    fullPage: true,
    format: "png",
    responseType: "binary"
  }.to_json,
  "Content-Type" => "application/json",
  "x-api-key" => "YOUR_API_KEY"
)
File.binwrite("print.png", response.body)
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Path;

public class Capture {
    public static void main(String[] args) throws Exception {
        String body = """
            {
                "url": "https://www.example.com/recipes/42",
                "render": {"media": "print"},
                "fullPage": true,
                "format": "png",
                "responseType": "binary"
            }
            """;
        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<Path> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofFile(Path.of("print.png")));
        System.out.println("Saved " + 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 {
    url = "https://www.example.com/recipes/42",
    render = new { media = "print" },
    fullPage = true,
    format = "png",
    responseType = "binary"
});
await File.WriteAllBytesAsync("print.png", await response.Content.ReadAsByteArrayAsync());

Go further

More in Testing and QA: Responsive layout checks · Visual regression testing · JavaScript error checks · Signup and checkout flow checks · Hover, focus and dark mode screenshots · Localization screenshots · Unlabelled control checks · A screenshot of every step · Embedded widget checks · Screenshots for support tickets · Ad landing page checks · Before and after hydration · Selectors for test automation · All use cases

Give your product a browser.

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