# Home Depot & Lowe's Price Tracker with Penny Detection (`pulsewatch/dealwatch-scraper`) Actor

Real-time price monitoring for Home Depot and Lowe's. Detects 30-90% off clearance, penny items (.02/.03 → .01), and inventory drops. Multi-ZIP support. Outputs clean JSON with product details, prices, discounts, and stock status.

- **URL**: https://apify.com/pulsewatch/dealwatch-scraper.md
- **Developed by:** [Niko W](https://apify.com/pulsewatch) (community)
- **Categories:** Developer tools, E-commerce, Automation
- **Stats:** 326 total users, 4 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00005 / actor start

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## DealWatch

DealWatch scrapes product listings, stores results in SQLite, and can send alert messages.

This README covers local setup through running the scraper test script:
`app/scripts/test_scraper.py`.

### 1. Prerequisites

- Python 3.11+
- `uv` installed
- Linux desktop/headless environment capable of running Playwright/Camoufox

### 2. Clone And Enter Project

```bash
git clone <your-repo-url>
cd dealwatch
```

### 3. Set Python Module Path

Run commands from the project root and set:

```bash
export PYTHONPATH=.
```

If you prefer per-command usage, prefix commands like:

```bash
PYTHONPATH=. uv run python app/scripts/test_scraper.py
```

### 4. Configure Environment

Create `.env` in the project root:

```bash
cat > .env << 'EOF'
DB_PATH=sql.db
EOF
```

`DB_PATH` is the SQLite file used by the DAO layer.

### 5. Install Dependencies

```bash
uv sync
```

### 6. Install Browser Runtime

For the current Home Depot config (`app/configs/yaml/homedepot.com.yaml`), Camoufox is enabled, so fetch Camoufox:

```bash
uv run python -m camoufox fetch
```

Playwright browser install :

```bash
uv run python -m playwright install
```

### 7. Seed Required Database Records

`test_scraper.py` uses `domain_name="homedepot.com"` and keyword search.\
You must have:

- a `websites` row for `homedepot.com`
- at least one keyword in `keywords`

Add website:

```bash
uv run python app/scripts/add_website.py --domain-name homedepot.com
```

Add one keyword:

```bash
uv run python app/scripts/add_keyword.py --keyword screwdriver
```

Or bulk load from `keywords.txt`:

```bash
uv run python app/scripts/add_keyword_from_txt.py
```

### 8. Add Telegram Account Details

If you want alert delivery, add at least one Telegram bot account to the database.

Insert account:

```bash
uv run python app/scripts/add_account.py \
  --token "<telegram_bot_token>" \
  --chat-id "<telegram_chat_id>"
```

Send a test alert to all stored Telegram accounts:

```bash
uv run python app/services/telegram/alert.py "DealWatch setup test message"
```

If this command reports `sent=1` (or more), Telegram setup is working.

### 9. Run Scraper Test

```bash
uv run python app/scripts/test_scraper.py
```

The script will launch `ListingScraper`, run the configured Home Depot flow, and use stored Telegram account details for alert delivery.

### 10. Common Setup Errors

`ModuleNotFoundError: No module named 'app'`

- Run from repo root and set `PYTHONPATH=.`.

`Website with domain 'homedepot.com' not found in database.`

- Run the `add_website.py` command above.

`settings.use_camoufox=true but camoufox is not installed`

- Run `uv sync` and `uv run python -m camoufox fetch`.

Scraper starts but does nothing

- Add at least one keyword with `add_keyword.py` or `add_keyword_from_txt.py`.

### 11. Configuring Zip Codes

To scrape across multiple store locations, add a `zip_codes` list to the `search_module` section of the domain YAML and mark the zip code input action with `zip_code_input: true`:

```yaml
search_module:
  zip_codes:
    - "28546"
    - "90210"
  actions_before_search:
    - name: input_action
      selector: '[data-testid="zip-code-text-field"] input'
      zip_code_input: true
      submit: false
      loading_delay: 2
```

The scraper will run the full keyword search once per zip code. See `docs/setup_guide.md` for full details.

# Actor input Schema

## `zip_codes` (type: `array`):

List of ZIP codes to monitor (e.g., 28546, 90210)

## `store` (type: `string`):

Which store to scrape

## `keywords` (type: `array`):

Search keywords to find products

## Actor input object example

```json
{
  "zip_codes": [
    "28546"
  ],
  "store": "homedepot.com",
  "keywords": [
    "screwdriver",
    "drill",
    "generator",
    "grill"
  ]
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "zip_codes": [
        "28546"
    ],
    "keywords": [
        "screwdriver",
        "drill",
        "generator",
        "grill"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pulsewatch/dealwatch-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "zip_codes": ["28546"],
    "keywords": [
        "screwdriver",
        "drill",
        "generator",
        "grill",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("pulsewatch/dealwatch-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "zip_codes": [
    "28546"
  ],
  "keywords": [
    "screwdriver",
    "drill",
    "generator",
    "grill"
  ]
}' |
apify call pulsewatch/dealwatch-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pulsewatch/dealwatch-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KTmMhFSh0ofTzcmKd/builds/J92icGv6gdvsTisqx/openapi.json
