lacspace-scraper
Scrape structured data from any website — CSS selectors or auto-detect.
npx lacspace-scraper https://example.com --auto -f jsonEverything, in one command
lacspace-scraper ships its own zero-dependency HTML parser and CSS-selector engine, so a fast static engine handles most sites with no browser at all — and an optional real-browser mode renders JavaScript apps when you need it. Extract exactly the fields you want with a selector schema, turn repeating cards into one record each, or let the auto-detectors grab everything a page exposes.
What's inside
Selector schema
Map fields to CSS selectors (text, @attributes, inner HTML, or all matches as an array).
Repeating items
--item ".card" yields one record per element — product grids, list rows, search results.
Auto-detect
Metadata, headings, links, images, emails, phones, tables, JSON-LD, OpenGraph, feeds and readable text.
Static or browser
A fast zero-dependency engine by default; a real browser (--browser) for JavaScript-rendered sites.
Crawl a site
Follow links breadth-first with depth/page limits, seed from a sitemap, stay same-origin.
Polite by default
Respects robots.txt, with delay, jitter, retries, concurrency and a custom User-Agent.
Parser included
The HTML parser + CSS-selector engine are exported — use them on any HTML string, no network.
Any format
JSON, NDJSON, CSV or Excel, plus a built-in converter between all four.
Copy, paste, done
Real commands and snippets — from a one-liner to the typed library.
npx lacspace-scraper https://example.com --auto -f jsonTitle, meta, headings, links, images, OpenGraph, JSON-LD…
npx lacspace-scraper https://shop.site \
--item ".product-card" \
--field "name=h3" --field "price=.price" --field "url=a@href" -f xlsxOne row per product card.
npx lacspace-scraper crawl https://docs.site \
--depth 2 --limit 40 --auto metadata,text -f ndjsonBFS crawl, robots-aware, metadata + readable text per page.
import { parseHTML, applySchemaItems } from "lacspace-scraper";
const root = parseHTML(html);
const rows = applySchemaItems(root, ".product",
{ name: "h3", price: ".price", url: { selector: "a", attr: "@href" } });What people build with it
✓ Turn any website's listings into a spreadsheet
✓ Monitor prices, jobs, listings or catalog changes
✓ Build a dataset from a site's sitemap
✓ Extract metadata, tables or JSON-LD at scale
Run lacspace-scraper today
Free, open-source, no API keys. It's a CLI and a typed library.
npx lacspace-scraper https://example.com --auto -f json