Extract structured data from PDFs and web pages using AI.
pnpm installCopy .env.example to .env and add your ScrapeGraph API key:
cp .env.example .envThen edit .env:
SCRAPEGRAPH_API_KEY=your-api-key-here
node scrape2json.js <url># Extract from PDF
node scrape2json.js https://dserver.bundestag.de/brd/2025/0204-25.pdf
# Extract from webpage
node scrape2json.js https://www.bundestag.de/dokumente/textarchiv/2025/kw42-de-rente-1115416Returns JSON with:
date— relevant implementation datetitle— document titlesummary— one paragraph summary in English