# Detect E-Commerce Price & Stock Changes

**Use case:** 

Compares baseline and current product snapshots to emit added, removed, and modified SKU rows with numeric delta and percent change.

## Input

```json
{
  "mode": "two-source",
  "baselineDatasetId": "",
  "currentDatasetId": "",
  "baselineFileUrl": "",
  "currentFileUrl": "",
  "baselineRows": [
    {
      "id": "sku-4821",
      "price": 99,
      "inStock": false,
      "scrapedAt": "2026-11-30T10:00:00Z"
    }
  ],
  "currentRows": [
    {
      "id": "sku-4821",
      "price": 79.2,
      "inStock": true,
      "scrapedAt": "2026-12-01T10:00:00Z"
    }
  ],
  "snapshotStoreName": "dataset-diff-snapshots",
  "snapshotName": "default-baseline",
  "updateSnapshot": true,
  "emitInitialBaselineAsAdded": false,
  "keyFields": [
    "id"
  ],
  "trackFields": [],
  "ignoreFields": [
    "scrapedAt",
    "timestamp",
    "crawledAt",
    "runId"
  ],
  "includeStatuses": [
    "added",
    "removed",
    "modified"
  ],
  "numericTolerance": 0,
  "minPercentChange": 0,
  "ignoreCaseAndWhitespace": false,
  "ignoreArrayOrder": false,
  "webhookSkipIfNoChanges": true,
  "allowEmptyBaselineOverwrite": false,
  "maxRows": 100000
}
```

## Output

```json
{
  "changeType": {
    "label": "Change Type",
    "format": "string"
  },
  "recordKey": {
    "label": "Record Key",
    "format": "string"
  },
  "changedFields": {
    "label": "Changed Fields",
    "format": "array"
  },
  "changeSummary": {
    "label": "Summary",
    "format": "string"
  },
  "detectedAt": {
    "label": "Detected At",
    "format": "string"
  }
}
```

## How it works

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

The Dataset Diff & Change Detector (Added / Removed / Modified) Actor is ready to run with the inputs already set for "Detect E-Commerce Price & Stock Changes". [Sign up or log in](https://console.apify.com/create-task-from-example/TV7Ct9Yl0bS0hS2aw) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Detect E-Commerce Price & Stock Changes" task

The Dataset Diff & Change Detector (Added / Removed / Modified) Actor will start running based on the input automatically. You can also change all the input fields, like comparison mode, baseline inline rows, and more, to match your specific use case.

### 3. Receive the "Detect E-Commerce Price & Stock Changes" 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, record key, changed fields, 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 "Detect E-Commerce Price & Stock Changes" task via API](https://apify.com/forgekit/dataset-diff-change-detector.md).

## About this Actor

This example demonstrates how to use [Dataset Diff & Change Detector (Added / Removed / Modified)](https://apify.com/forgekit/dataset-diff-change-detector.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/forgekit/dataset-diff-change-detector.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/forgekit/dataset-diff-change-detector.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`).
