Prompt
What's the best web crawler for indexing JavaScript-heavy websites into an AI search corpus?
Latest observation
If your target is JavaScript-heavy sites, the “best” crawler is usually the one that can do real browser rendering, wait for network idle, and extract clean, deduplicated content in a format your indexing pipeline can use.
Best overall options
1) Playwright-based crawler
Best choice for most JS-heavy sites.
Why:
- Renders pages like a real browser
- Handles SPA frameworks well: React, Vue, Next.js, Nuxt, etc.
- Can wait for client-side content to load
- Good control over cookies, auth, pagination, infinite scroll, and click-based navigation
Good if you need:
- High fidelity crawling
- Authenticated sessions
- Custom rules for dynamic content
- Reliable extraction from pages that don’t expose content in HTML
Typical stack:
- Playwright for rendering
- A custom extraction layer for main text, links, metadata
- Deduping + chunking + embedding pipeline for the corpus
2) Crawlee
Best developer-friendly framework if you want a ready-made crawler on top of browser automation.
Why:
- Built for crawling at scale
- Supports both browser and HTTP crawling
- Integrates well with Playwright or Puppeteer
- Handles queues, retries, concurrency, session management
Good if you need:
- A production crawler quickly
- Better crawl orchestration than raw Playwright
- Scalable crawling across many pages/domains
3) Scrapy + Playwright
Best if you want a classic crawler with JS rendering only when needed.
Why:
- Scrapy is excellent for large-scale crawling, scheduling, retries, dedupe, pipelines
- Playwright plugin adds JS rendering for dynamic pages
- Efficient when most pages are static but some require browser rendering
Good if you need:
- Scalability
- Strong crawl architecture
- Fine-grained control over extraction and storage
If you want an off-the-shelf “web data extraction” product
4) Apify
Best hosted option for teams that don’t want to build everything themselves.
Why:
- Managed crawling infrastructure
- Playwright-based actors available
- Scheduling, proxies, storage, and scaling included
Good if you want:
- Faster time to value
- Less infrastructure work
- A service-oriented crawl pipeline
What I’d recommend by use case
Choose Playwright if:
- You’re crawling a few sites or a custom set of sites
- The sites are highly dynamic
- You need precise control over rendering and extraction
Choose Crawlee + Playwright if:
- You want to build a robust crawler for many pages/domains
- You need queueing, retry logic, and scale without reinventing everything
Choose Scrapy + Playwright if:
- You already use Python and want mature crawling infrastructure
- You need to crawl at scale with mixed static/dynamic pages
Choose Apify if:
- You want managed infrastructure and minimal ops
For an AI search corpus, the important part is not just crawling
A good crawler should also support:
- Rendered text extraction after JS execution
- Canonical URL handling
- Duplicate detection
- Metadata capture: title, headings, description, published date, author, tags
- Main-content extraction: remove nav/footer/sidebar noise
- Chunking for embeddings
- Incremental recrawling and change detection
- Robots.txt compliance
- Sitemaps and internal link discovery
- Auth/session support if needed
My practical recommendation
If you’re building this yourself:
- Use Playwright for rendering
- Wrap it with Crawlee if you want crawl management
- Store clean text + metadata + URL + source hash
- Feed that into your embedding/indexing pipeline
If you want the single best general-purpose answer:
Playwright, ideally managed through Crawlee or Apify, is the best fit for indexing JavaScript-heavy websites into an AI search corpus.
If you want, I can also give you:
- a comparison table of Playwright vs Crawlee vs Scrapy vs Apify, or
- a reference architecture for building the full AI search ingestion pipeline.