Skip to content

About

A simple utility to scrape, store, and analyze grocery store receipts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Receipt Scraper

Node.js scripts for scraping and analyzing grocery store receipts.

Currently only supports parsing of digital receipts from one of the most popular chains in Bulgaria - Lidl.

Prerequisites

  • Node.js (version 22 or higher)
  • OpenAI API key

Setup

  1. Clone the repository:
git clone https://github.com/todorgrigorov/receipt-scraper.git
cd receipt-scraper
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory with your OpenAI API key:
LIDL_COOKIE=auth_cookie_for_fetching_the_receipts
OPENAI_API_KEY=your_api_key_here
OPENAI_MODEL=your_model_name_here

Usage

The application consists of three main scripts.

Each script processes the output from the previous one, storing results in the src/lidl/out directory.

  1. Fetch receipt IDs:
node src/lidl/fetch-receipt-ids.js
  1. Fetch receipt contents:
node src/lidl/fetch-receipt-contents.js
  1. Turn raw receipts data into JSON structured format using an LLM (OpenAI):
node src/lidl/receipt-analyzer.js
  1. Concat individual receipt JSONs
./concat.sh
  1. Analyze!
python query.py

About

A simple utility to scrape, store, and analyze grocery store receipts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages