- Hashing Service (free) - Fetch raw HTML and hash to find changes
- Firecrawl Batch Scrape (paid) - Only scrape pages that actually changed
Batch 1a:
detect-changes + update-ai-site run together.
Batch 1b: discover-products runs in parallel (completely decoupled).- detect-changes (this endpoint) - Find what changed
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
entitiestable - Get business entity infoai_sitestable - Getsite_mapandpage_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]