# Track price and stock changes between two product scrapes

**Use case:** 

Feed it today's and yesterday's datasets from any product scraper and get one row for each product whose price, stock or other fields changed, with the old and new values side by side. New and removed products are left out, so the result is a short list of real changes. Run it after each scheduled scrape to build a price history or an alert list.

## Input

```json
{
  "keyFields": [
    "url"
  ],
  "ignoreFields": [
    "scrapedAt"
  ],
  "changeTypes": [
    "changed"
  ],
  "ignoreArrayOrder": false
}
```

## Output

```json
{
  "changeType": {
    "label": "Change type",
    "format": "string"
  },
  "key": {
    "label": "Key",
    "format": "string"
  },
  "keyHash": {
    "label": "Key hash",
    "format": "string"
  },
  "changedFields": {
    "label": "Changed fields",
    "format": "array"
  },
  "previousValues": {
    "label": "Previous values",
    "format": "object"
  },
  "item": {
    "label": "Item",
    "format": "object"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Dataset Change Tracker Actor is ready to run with the inputs already set for "Track price and stock changes between two product scrapes". [Sign up or log in](https://console.apify.com/create-task-from-example/oassIymIFgP826frI) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Track price and stock changes between two product scrapes" task

The Dataset Change Tracker Actor will start running based on the input automatically. You can also change all the input fields, like key fields, fields to ignore, and more, to match your specific use case.

### 3. Receive the "Track price and stock changes between two product scrapes" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as change type, key, key hash, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Track price and stock changes between two product scrapes" task via API](https://apify.com/quietworkslab/dataset-change-tracker.md).

## FAQ

### Which scrapers does the price change task work with?

The price change task works with the dataset of any scraper, as long as each product has a stable key such as its URL or SKU. Choose that field as the key field.

### Can I ignore fields that always change?

Yes. List them in ignoreFields, for example scrapedAt or a rating count, and the price change task compares only the remaining fields.

### Can it run automatically after my scraper?

Yes. Set stateStoreName and the Dataset Change Tracker remembers the last run (as hashes), so each run of the price change task compares with the previous one without choosing it.

## About this Actor

This example demonstrates how to use [Dataset Change Tracker](https://apify.com/quietworkslab/dataset-change-tracker.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/quietworkslab/dataset-change-tracker.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/quietworkslab/dataset-change-tracker.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
