Skip to content
shotsmith
Features Docs Guides Pricing Changelog Sign inStart free

Archive web pages for compliance and evidence

Keep a dated, full-page record of what a web page said, with its HTTP status and headers, stored in your own bucket.

8 min read

Sometimes you need proof of what a web page said on a given day: an advertised price, terms and conditions, a partner’s claims, your own disclosures, or content that might be taken down. A screenshot on someone’s laptop is weak evidence. A dated, full-page capture, made automatically and stored with the page’s HTTP status and headers, is much stronger.

Capture the whole page, with its context

This request captures a full-page PDF, plus the page title, HTTP status and response headers, and uploads the file to your own bucket under a dated path:

import { Shotsmith } from '@shotsmith/sdk';

const shotsmith = new Shotsmith({ accessKey: 'YOUR_ACCESS_KEY' });

const result = await shotsmith.takeJson({
  url: 'https://example.com/terms',
  format: 'pdf',
  pdf_print_background: true,
  block_cookie_banners: true,
  metadata_page_title: true,
  metadata_http_response_status_code: true,
  metadata_http_response_headers: true,
  store: true,
  storage_path: 'archive/{host}/{date}/{id}',
  external_identifier: 'terms-of-service',
});

console.log(result.store);
<?php

require 'vendor/autoload.php';

use Shotsmith\Client;

$shotsmith = new Client('YOUR_ACCESS_KEY');

$result = $shotsmith->takeJson([
    'url' => 'https://example.com/terms',
    'format' => 'pdf',
    'pdf_print_background' => true,
    'block_cookie_banners' => true,
    'metadata_page_title' => true,
    'metadata_http_response_status_code' => true,
    'metadata_http_response_headers' => true,
    'store' => true,
    'storage_path' => 'archive/{host}/{date}/{id}',
    'external_identifier' => 'terms-of-service',
]);

echo $result['store'];
curl -X POST "https://shotsmith.dev/v1/take" \
  -H "X-Access-Key: YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/terms",
    "format": "pdf",
    "pdf_print_background": true,
    "block_cookie_banners": true,
    "metadata_page_title": true,
    "metadata_http_response_status_code": true,
    "metadata_http_response_headers": true,
    "store": true,
    "storage_path": "archive/{host}/{date}/{id}",
    "external_identifier": "terms-of-service",
    "response_type": "json"
  }'
const res = await fetch('https://shotsmith.dev/v1/take', {
  method: 'POST',
  headers: {
    'X-Access-Key': 'YOUR_ACCESS_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    url: 'https://example.com/terms',
    format: 'pdf',
    pdf_print_background: true,
    block_cookie_banners: true,
    metadata_page_title: true,
    metadata_http_response_status_code: true,
    metadata_http_response_headers: true,
    store: true,
    storage_path: 'archive/{host}/{date}/{id}',
    external_identifier: 'terms-of-service',
    response_type: 'json',
  }),
});
if (!res.ok) throw new Error((await res.json()).error_message);

console.log(await res.json());
import json
import urllib.request

body = {
    "url": "https://example.com/terms",
    "format": "pdf",
    "pdf_print_background": True,
    "block_cookie_banners": True,
    "metadata_page_title": True,
    "metadata_http_response_status_code": True,
    "metadata_http_response_headers": True,
    "store": True,
    "storage_path": "archive/{host}/{date}/{id}",
    "external_identifier": "terms-of-service",
    "response_type": "json"
}

req = urllib.request.Request(
    "https://shotsmith.dev/v1/take",
    data=json.dumps(body).encode(),
    headers={"X-Access-Key": "YOUR_ACCESS_KEY", "Content-Type": "application/json"},
    method="POST",
)

# Raises urllib.error.HTTPError on a 4xx/5xx response
with urllib.request.urlopen(req, timeout=60) as res:
    print(json.load(res))
<?php

$ch = curl_init('https://shotsmith.dev/v1/take');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['X-Access-Key: YOUR_ACCESS_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'url' => 'https://example.com/terms',
        'format' => 'pdf',
        'pdf_print_background' => true,
        'block_cookie_banners' => true,
        'metadata_page_title' => true,
        'metadata_http_response_status_code' => true,
        'metadata_http_response_headers' => true,
        'store' => true,
        'storage_path' => 'archive/{host}/{date}/{id}',
        'external_identifier' => 'terms-of-service',
        'response_type' => 'json',
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 60,
]);
$response = json_decode(curl_exec($ch), true);

if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($response['error_message']);
}

print_r($response);
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{
	  "url": "https://example.com/terms",
	  "format": "pdf",
	  "pdf_print_background": true,
	  "block_cookie_banners": true,
	  "metadata_page_title": true,
	  "metadata_http_response_status_code": true,
	  "metadata_http_response_headers": true,
	  "store": true,
	  "storage_path": "archive/{host}/{date}/{id}",
	  "external_identifier": "terms-of-service",
	  "response_type": "json"
	}`)

	req, _ := http.NewRequest("POST", "https://shotsmith.dev/v1/take", body)
	req.Header.Set("X-Access-Key", "YOUR_ACCESS_KEY")
	req.Header.Set("Content-Type", "application/json")

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

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
require "net/http"
require "json"

body = {
  "url" => "https://example.com/terms",
  "format" => "pdf",
  "pdf_print_background" => true,
  "block_cookie_banners" => true,
  "metadata_page_title" => true,
  "metadata_http_response_status_code" => true,
  "metadata_http_response_headers" => true,
  "store" => true,
  "storage_path" => "archive/{host}/{date}/{id}",
  "external_identifier" => "terms-of-service",
  "response_type" => "json"
}

res = Net::HTTP.post(
  URI("https://shotsmith.dev/v1/take"),
  body.to_json,
  "X-Access-Key" => "YOUR_ACCESS_KEY",
  "Content-Type" => "application/json"
)
raise res.body unless res.is_a?(Net::HTTPSuccess)

puts JSON.parse(res.body)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Request {
    public static void main(String[] args) throws Exception {
        var body = """
            {
              "url": "https://example.com/terms",
              "format": "pdf",
              "pdf_print_background": true,
              "block_cookie_banners": true,
              "metadata_page_title": true,
              "metadata_http_response_status_code": true,
              "metadata_http_response_headers": true,
              "store": true,
              "storage_path": "archive/{host}/{date}/{id}",
              "external_identifier": "terms-of-service",
              "response_type": "json"
            }
            """;

        var request = HttpRequest.newBuilder(URI.create("https://shotsmith.dev/v1/take"))
            .header("X-Access-Key", "YOUR_ACCESS_KEY")
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(body))
            .build();

        var res = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(res.body());
    }
}
using System;
using System.Net.Http;
using System.Text;

using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Access-Key", "YOUR_ACCESS_KEY");

var body = """
    {
      "url": "https://example.com/terms",
      "format": "pdf",
      "pdf_print_background": true,
      "block_cookie_banners": true,
      "metadata_page_title": true,
      "metadata_http_response_status_code": true,
      "metadata_http_response_headers": true,
      "store": true,
      "storage_path": "archive/{host}/{date}/{id}",
      "external_identifier": "terms-of-service",
      "response_type": "json"
    }
    """;

var res = await http.PostAsync(
    "https://shotsmith.dev/v1/take",
    new StringContent(body, Encoding.UTF8, "application/json")
);
res.EnsureSuccessStatusCode();

Console.WriteLine(await res.Content.ReadAsStringAsync());
  • PDF or PNG? PDFs keep text selectable and searchable. A full-page PNG (format=png, full_page=true) is a pixel-exact visual record. Many teams keep both.
  • The response includes when the capture was made, the page’s status code and headers, and where the file was stored.
  • external_identifier labels the capture with your own reference, so you can find every capture of the same document later.

Keep it in your own storage

shotsmith keeps captures for your plan’s history period (3 to 90 days). For long-term records, add store=true and keep the files in your own S3-compatible bucket, with your own retention rules, versioning or object lock. Save your bucket’s credentials once under Storage in the dashboard. storage_path understands {id}, {date} and {host}.

Archive on a schedule

  • Only when something changes: a monitor captures the page on a schedule and keeps every capture. Its change history doubles as an archive of each version.
  • Every day, regardless: a cron job or the cURL archive script captures a list of URLs daily.
  • Lots of pages: bulk requests archive up to 100 URLs per call in the background.

Make the record trustworthy

  • Capture without cookie banners or pop-ups covering the content, but don’t hide anything else, so the record shows the page as published.
  • Store a checksum (SHA-256) of each file alongside it, so you can show it hasn’t been altered.
  • Turn on object lock or versioning in your bucket, so archived files can’t be overwritten or deleted early.

This guide describes technical record-keeping, not legal advice. If captures may be used as evidence, check with your legal team what your jurisdiction requires.