Skip to main content
Internal Service β€” This is not an HTTP endpoint. It’s called directly by the generate-all orchestrator.

Purpose

Scrapes a website using our Custom Website Mapper (for URL discovery) + Firecrawl Batch Scrape API (for content extraction). Returns an array of pages with markdown content that all other services use. Runs in GROUP 1b (awaited, blocks GROUP 2).

Function Signature

Parameters

Returns

Scraping Flow

Step 1: Custom Website Mapper (Free)

Our internal mapper uses multiple strategies to discover URLs:
  1. robots.txt parsing - Extract sitemap directives
  2. sitemap.xml parsing - Parse sitemap and sitemap index files
  3. HTML link extraction - Find links in page content
  4. Recursive crawling - Follow internal links (with depth limit)
  5. URL validation - Filter out 404s and non-HTML pages

Step 2: Firecrawl Batch Scrape (Paid)

POST /v2/batch/scrape - Scrapes all discovered URLs in parallel, returns markdown content.
This approach is cost-efficient: URL discovery is free (our mapper), only content extraction uses Firecrawl credits.

Used By

Note: Discover Products (GROUP 1d) now uses Shopify’s products.json API directly and does NOT use scraped pages.

Code Location

Configuration

Error Handling

Common errors:
  • Timeout - Large sites may exceed the 120s timeout
  • Rate limit - Firecrawl has rate limits per API key
  • Invalid URL - URL must be accessible and not blocked
  • No URLs found - Website may block crawlers or have no discoverable pages