{"id":48552618,"url":"https://github.com/olostep-api/amazon-price-tracker","last_synced_at":"2026-04-08T09:03:12.173Z","repository":{"id":342510041,"uuid":"1170659164","full_name":"olostep-api/amazon-price-tracker","owner":"olostep-api","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-06T07:25:46.000Z","size":559,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-06T11:51:35.946Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olostep-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-02T11:20:46.000Z","updated_at":"2026-03-06T07:25:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/olostep-api/amazon-price-tracker","commit_stats":null,"previous_names":["olostep-api/amazon-price-tracker"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/olostep-api/amazon-price-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olostep-api%2Famazon-price-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olostep-api%2Famazon-price-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olostep-api%2Famazon-price-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olostep-api%2Famazon-price-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olostep-api","download_url":"https://codeload.github.com/olostep-api/amazon-price-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olostep-api%2Famazon-price-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31547847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-08T09:03:11.551Z","updated_at":"2026-04-08T09:03:12.166Z","avatar_url":"https://github.com/olostep-api.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Amazon Product Price Tracker (Python + Streamlit + Olostep API)\n\nTrack [Amazon](https://www.amazon.com/) product prices with a lightweight Python workflow that scrapes product data via the [Olostep API](https://www.olostep.com/), stores history in **CSV + JSON**, and provides both a **Streamlit dashboard** and **CLI runners** for manual and scheduled checks.\n\n![Amazon Product Price Tracker Streamlit Dashboard](assets/ui.png)\n\n## Why This Project\n\nThis project helps you:\n- Monitor Amazon product price changes over time.\n- Compare current vs previous prices (`higher`, `lower`, `same`, `new`, `unknown`).\n- Run one-off checks from terminal or recurring checks on a schedule.\n- View a compact web dashboard for URL management, tracking controls, and filtered product data.\n\n## Features\n\n- Streamlit dashboard (`app.py`)\n  - Add, edit, and remove tracked URLs.\n  - Run tracking manually.\n  - Start or stop the scheduler and view scheduler status.\n  - Filter tracked products by title/URL and price direction.\n- CLI one-shot runner (`run_tracker.py`)\n- CLI scheduler runner (`run_scheduler.py`)\n- Auto-aligned CSV schema\n- JSON history with average price and sample count\n\n## Prerequisites\n\n- Python 3.10+\n- `pip`\n- Valid `OLOSTEP_API_KEY`\n- Internet access for API requests\n\n## Quick Start\n\n### 1) Install dependencies\n\n```bash\npip install requests python-dotenv streamlit\n```\n\n### 2) Configure environment\n\nCreate `.env`:\n\n```env\nOLOSTEP_API_KEY=your_api_key_here\n```\n\nCreate an API key from the [Olostep API Keys dashboard](https://www.olostep.com/dashboard/api-keys), then place it in `.env`.\n\n### 3) Add product URLs\n\nAdd one URL per line in:\n\n```text\ndata/product_urls.txt\n```\n## Run the App\n\n### Streamlit dashboard\n\n```bash\nstreamlit run app.py\n```\n\n### CLI one-time tracking\n\n```bash\npython run_tracker.py\n```\n\nOptional flags:\n\n```bash\npython run_tracker.py \\\n  --csv output/price_tracker_history.csv \\\n  --history-json output/product_price_history.json \\\n  --urls-file data/product_urls.txt \\\n  --sleep 2\n```\n\n### CLI scheduled tracking\n\n```bash\npython run_scheduler.py --interval-minutes 30\n```\n\nOptional flags:\n\n```bash\npython run_scheduler.py \\\n  --interval-minutes 15 \\\n  --csv output/price_tracker_history.csv \\\n  --history-json output/product_price_history.json \\\n  --urls-file data/product_urls.txt \\\n  --sleep 2\n```\n\n## Output Files\n\nAll outputs are written to `output/` by default.\n\n| File | Purpose |\n|---|---|\n| `output/price_tracker_history.csv` | Latest product snapshot including current/previous price and change direction |\n| `output/product_price_history.json` | Per-product historical timeline with computed average price |\n\n## Project Structure\n\n```text\n.\n├── app.py                         # Streamlit dashboard entrypoint\n├── run_tracker.py                 # CLI one-time tracking runner\n├── run_scheduler.py               # CLI scheduled tracking runner\n├── assets/\n│   ├── ui.png                     # Dashboard screenshot\n│   └── thumbnail.png              # Parser preview image\n├── data/\n│   └── product_urls.txt           # Input URLs (one per line)\n├── output/\n│   ├── price_tracker_history.csv  # Latest snapshot rows\n│   └── product_price_history.json # Per-product historical timeline\n└── src/\n    └── tracker/\n        ├── constants.py           # Defaults and shared constants\n        ├── csv_store.py           # CSV read/write and schema alignment\n        ├── json_history.py        # JSON history persistence\n        ├── normalizer.py          # Price and payload normalization\n        ├── olostep_client.py      # Olostep request client\n        ├── scheduler.py           # Scheduling loop logic\n        ├── service.py             # Core tracking orchestration\n        ├── url_loader.py          # URL loading and validation\n        └── utils.py               # Shared helper utilities\n```\n\n## Notes\n\n- If CSV schema changes, it is auto-aligned by the app.\n- New products are appended.\n- Existing products are updated on successful scrapes.\n- On successful updates, old `price` is shifted to `previous_price`.\n\n## Olostep Parser Reference\n\n- [Olostep Parsers Documentation](https://docs.olostep.com/features/structured-content/parsers)\n- [Olostep Authentication Guide](https://docs.olostep.com/get-started/authentication)\n- [Parser preview image](assets/thumbnail.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folostep-api%2Famazon-price-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folostep-api%2Famazon-price-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folostep-api%2Famazon-price-tracker/lists"}