USE CASE

Website Archiving with Screenshots

How to capture and preserve point-in-time snapshots of websites for legal compliance, research, competitive intelligence, and historical documentation.

March 21, 20269 min read

Why Archive Websites?

The web is ephemeral. Pages change, get redesigned, or disappear entirely. According to research, the average web page has a lifespan of about 100 days before it is modified or removed. Website archiving captures what a page looked like at a specific moment in time.

This matters for several critical use cases:

Legal and Compliance

Legal teams need to document web content as evidence -- trademark violations, copyright infringement, pricing claims, or terms of service at the time of a transaction. A screenshot with a timestamp is admissible as evidence in most jurisdictions.

Regulatory Compliance

Financial services, healthcare, and government organizations are often required to archive their web content. FINRA, SEC, and GDPR all have web archiving requirements. Screenshots provide visual proof of what was published and when.

Competitive Intelligence

Track how competitors change their pricing, features, messaging, and design over time. Weekly or monthly screenshots create a visual timeline of their evolution. See our guide on SEO monitoring with screenshots.

Research and Journalism

Researchers and journalists cite web sources that may change or disappear. Archiving the cited page preserves the evidence regardless of future changes.

Your Own Website History

Track your own website's evolution -- design changes, content updates, and A/B test variations. Useful for design reviews, stakeholder presentations, and portfolio documentation.

Screenshots vs HTML Archiving

There are two main approaches to website archiving, each with different strengths:

AspectScreenshot ArchiveHTML/WARC Archive
What it capturesVisual appearance (pixels)Source code and assets
Dynamic contentFully rendered (JS executed)May miss JS-rendered content
Searchable textNo (image only)Yes
Legal evidenceStrong (visual proof)Moderate (can be modified)
Storage size100KB - 5MB per page1MB - 50MB+ per page
Setup complexitySimple (one API call)Complex (crawler setup)

For most use cases, screenshots are the better choice: they capture exactly what a user sees (including dynamically rendered content), they are smaller, and they are easier to set up. For full-text search, combine screenshots with web scraping.

Building a Website Archive with ScreenshotAPI

Here is how to build a simple but effective website archiving system:

Step 1: Define Your Archive List

const archiveTargets = [
  { url: "https://competitor.com", frequency: "daily" },
  { url: "https://competitor.com/pricing", frequency: "weekly" },
  { url: "https://yoursite.com", frequency: "weekly" },
  { url: "https://yoursite.com/terms", frequency: "monthly" },
];

Step 2: Capture and Store

const fs = require("fs");
const path = require("path");

async function archivePage(url, apiKey) {
  const timestamp = new Date().toISOString().split("T")[0];
  const slug = new URL(url).hostname + new URL(url).pathname.replace(/\//g, "_");
  const filename = `${slug}_${timestamp}.png`;

  const response = await fetch(
    `https://screenshotapi-api-production.up.railway.app/v1/screenshot?` +
    `url=${encodeURIComponent(url)}&format=png&width=1440&fullpage=true`,
    { headers: { Authorization: `Bearer ${apiKey}` } }
  );

  if (!response.ok) throw new Error(`Failed: ${response.status}`);

  const buffer = Buffer.from(await response.arrayBuffer());
  const archivePath = path.join("archive", filename);
  fs.mkdirSync("archive", { recursive: true });
  fs.writeFileSync(archivePath, buffer);

  return { url, timestamp, filename: archivePath, size: buffer.length };
}

Step 3: Automate with Cron

Use a cron job, GitHub Actions, or a scheduling service to run the archive script on a regular basis. For important pages, daily captures ensure you never miss a change.

For real-time change detection, use our webhook system to get notified when a capture completes, then compare against the previous version.

Best Practices for Website Archiving

Use Full-Page Captures

Always use full-page screenshots for archiving. A viewport-only screenshot misses content below the fold, which could be legally important.

Include Metadata

Store metadata alongside each screenshot: the URL, capture timestamp, HTTP status code, page title, and any response headers. This metadata is essential for legal evidence.

Generate PDFs for Legal Records

For legal archiving, PDF captures are often preferred over screenshots because they preserve text selectability and are a standard document format in legal proceedings.

Store with Integrity

Respect Robots.txt

While screenshot APIs visit pages like a normal browser, be mindful of archiving pages that explicitly prohibit crawling. For legal evidence, this is generally acceptable, but check with your legal team.

Use Cases in Detail

Brand Protection

Automate weekly screenshots of search results for your brand name. Detect counterfeit sites, unauthorized resellers, or trademark violations before they damage your brand.

Price Monitoring

Capture competitor pricing pages daily. Compare screenshots over time to identify pricing strategy changes, promotional patterns, and market positioning shifts.

Content Compliance

Archive your own website to prove compliance with advertising standards, terms of service commitments, and regulatory requirements. Insurance companies, financial services, and healthcare providers all benefit from this.

Design Documentation

Capture your website before and after every design change. This creates a visual changelog that is invaluable for design reviews, stakeholder communication, and visual regression testing.

Start Archiving Websites Today

100 free screenshots per month. Full-page captures, PDF generation, and batch processing.

Related Articles