Skip to main content
Detect content changes on a website using an efficient 2-stage approach:
  1. Hashing Service (free) - Fetch raw HTML and hash to find changes
  2. Firecrawl Batch Scrape (paid) - Only scrape pages that actually changed
This is part of Batch 1a in the cron architecture:
Batch 1a: detect-changes + update-ai-site run together. Batch 1b: discover-products runs in parallel (completely decoupled).
  1. detect-changes (this endpoint) - Find what changed
  2. update-ai-site - Update the AI website

How It Works

Cost Efficiency

Before optimization: Batch scrape ALL pages every time After optimization: Batch scrape only pages that actually changed

Request Body

Response

Key difference: unchanged_pages does NOT have markdown - they weren’t batch scraped. Only new_pages and changed_pages have markdown content.

Status Values

Usage in Cron

Decoupled architecture: Product discovery (Batch 1b) now runs in parallel and uses the Shopify products.json API directly - it doesn’t depend on scraped content from detect-changes.

Database Reads

  • entities table - Get business entity info
  • ai_sites table - Get site_map and page_hashes

External API Calls

  • Custom Website Mapper (src/app/shared/mapping) - Get URL list [FREE]
  • Hashing Service (src/app/shared/hashing) - Fetch raw HTML + hash [FREE]
  • Firecrawl Batch Scrape API (/v2/batch/scrape) - Get markdown [PAID, only for changed pages]