Declarative DSL
Extract data with a clean DSL using text(), attr(), array() helpers - no more verbose querySelector chains.
Extract DOM elements with precision and speed

import { harvest, text, array } from 'domharvest-playwright'
// Extract quotes using the declarative DSL
const quotes = await harvest(
'https://quotes.toscrape.com/',
'.quote',
{
text: text('.text'),
author: text('.author'),
tags: array('.tag', text())
}
)
console.log(quotes)
// [{ text: "The world as we...", author: "Albert Einstein", tags: ["change", "world"] }, ...]DOMHarvest makes web scraping simple and reliable by leveraging Playwright's battle-tested browser automation. Whether you're building a data pipeline, monitoring websites, or extracting content for analysis, DOMHarvest provides the tools you need with minimal setup.
text(), attr(), array(), exists(), html(), count() for clean, readable extractionlogin(), fillLoginForm(), SessionManager for authenticated scrapingharvestBatch()