# AI Price & Shelf Intelligence — Repricing, MAP & Assortment (`fuze/ai-price-intelligence`) Actor

Competitor price monitoring with an AI layer: price-change diffing, AI repricing recommendations, MAP-violation detection and assortment-gap analysis. Schedule it to watch prices daily. Actively maintained. · More no-code data tools → datatools-hub.vercel.app

- **URL**: https://apify.com/fuze/ai-price-intelligence.md
- **Developed by:** [Fredrik Hansson](https://apify.com/fuze) (community)
- **Categories:** AI, E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.80 / 1,000 sku monitoreds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

## AI Price & Shelf Intelligence — Repricing, MAP & Assortment

Competitor price monitoring with an **AI layer**: price-change diffing, AI repricing recommendations, MAP-violation detection and assortment-gap analysis.

Raw price scrapers give you numbers. **This gives you decisions** — the analysis layer price-monitoring suites charge five figures a year for.

![AI Price & Shelf Intelligence — Repricing, MAP & Assortment — input and sample output](https://datatools-hub.vercel.app/actor-shots/ai-price-intelligence.png)

### 🔗 Chain it after your scraper

Already tracking competitors with **[Amazon Product Scraper (`junglee/Amazon-crawler`)](https://apify.com/junglee/Amazon-crawler)**, **[Shopify Scraper (`autofacts/shopify`)](https://apify.com/autofacts/shopify)** or **[eBay Scraper (`dtrungtin/ebay-items-scraper`)](https://apify.com/dtrungtin/ebay-items-scraper)**? Feed those competitor product URLs in and get AI repricing recommendations, MAP-violation flags and assortment gaps on top of the prices. Works with the output of any Amazon, Shopify or ecommerce product scraper.

### Quick start

1. **Fill in the input** — set the fields in the input tab (prefilled with a working example).
2. **Click Start** — the Actor runs and writes one record per item to the dataset.
3. **Get your data** — export to **JSON, CSV or Excel**, or pull it via the API.

### What it does

Give it your products with competitor product URLs. For each product it scrapes the shelf, then adds:

- **Matched competitor prices** — lowest, highest and average
- An **AI repricing recommendation** — suggested price, rationale and projected margin, respecting your strategy (`undercut` / `match` / `premium`), floor margin and MAP
- **MAP-violation detection** — flags any seller priced below your minimum advertised price, with the exact gap
- Optional **assortment-gap report** — what competitors carry that you don't
- **Price-change diffing** vs. a previous run (`baselineDatasetId`) — turning it into a daily price monitor

A deterministic guardrail ensures **no recommendation ever falls below your MAP or floor margin**, so the AI's output is always safe to act on.

### Input

| Field | Type | Description |
|---|---|---|
| `products` | array | Your products (see below). Required. |
| `strategy` | string | `undercut` / `match` / `premium` (default undercut). |
| `undercutPct` | integer | How far under the lowest competitor (default 5). |
| `floorMarginPct` | integer | Never price below this gross margin (default 10). |
| `generateRepricing` | boolean | AI repricing per product (default true). |
| `assortmentReport` | boolean | Catalog gap analysis (default false). |
| `baselineDatasetId` | string | Previous run → show price changes. |

Each product:

```json
{
  "products": [
    {
      "sku": "SKU-001",
      "name": "Wireless Headphones X",
      "yourPrice": 129.0,
      "cost": 70.0,
      "mapPrice": 119.0,
      "competitorUrls": [
        "https://competitor-a.com/product/123",
        "https://competitor-b.com/p/456"
      ]
    }
  ],
  "strategy": "undercut",
  "undercutPct": 5
}
```

(`yourUrl` can be used instead of `yourPrice` to scrape your own price.)

### Output

One record per product (plus an optional `assortment` record):

```json
{
  "recordType": "product",
  "sku": "SKU-001",
  "yourPrice": 129.0,
  "lowestCompetitor": 118.0,
  "avgCompetitor": 124.5,
  "mapViolations": [{ "source": "competitor-a.com", "price": 109.0, "mapPrice": 119.0, "gap": 10.0 }],
  "repricing": { "suggestedPrice": 119.0, "rationale": "Undercut lowest… (Adjusted up to respect MAP.)", "projectedMarginPct": 41.2 },
  "priceChange": { "yourDelta": 0, "marketDelta": -3.5 }
}
```

### Pricing (pay-per-event)

| Event | When | Price |
|---|---|---|
| `sku-monitored` | per product checked | $0.10 |
| `repricing-recommendation` | per AI repricing recommendation | $0.20 |
| `map-violation-detected` | per confirmed MAP violation | $0.50 |
| `assortment-report` | per run (catalog gap analysis) | $0.50 |

### Who it's for

Online retailers, DTC brands and manufacturers enforcing MAP — monitoring hundreds of SKUs, daily.

### Notes

- Requires an OpenAI API key (`OPENAI_API_KEY`) for repricing/assortment.
- Price extraction reads structured data first (JSON-LD, price meta) then falls back to common price elements; works best on standard product pages.

### Related actors

- [Competitor Pulse — AI Competitor Intelligence Monitor](https://apify.com/fuze/competitor-pulse) — Watch competitors holistically — pricing, website, hiring, tech, news and
- [Argus — Autonomous Intelligence Agent](https://apify.com/fuze/argus) — Describe a mission in plain English; Argus plans what to watch, gathers from public
- [AI Share of Voice — Multi-Engine GEO Tracker](https://apify.com/fuze/ai-share-of-voice) — Track your brand's visibility and share of voice across AI answer engines, with

# Actor input Schema

## `products` (type: `array`):

Your products to monitor. Each object: { "sku", "name", "yourUrl" or "yourPrice", "cost", "mapPrice", "competitorUrls": \["..."] }. The actor scrapes the price from each URL.

## `strategy` (type: `string`):

How the AI should position your price vs. the market.

## `undercutPct` (type: `integer`):

For the 'undercut' strategy, how far below the lowest competitor to go.

## `floorMarginPct` (type: `integer`):

Never recommend a price whose gross margin (vs. cost) falls below this.

## `generateRepricing` (type: `boolean`):

If on, generate an AI repricing recommendation per product. Adds a per-product charge.

## `assortmentReport` (type: `boolean`):

If on, run a catalog-level analysis of products competitors carry that you don't. Adds one per-run charge.

## `baselineDatasetId` (type: `string`):

Optional. A previous run's dataset ID — results then show price changes since then (turns this into a daily price monitor).

## `maxConcurrency` (type: `integer`):

How many products to process in parallel.

## `model` (type: `string`):

OpenAI model for repricing/assortment. gpt-4o-mini is the cost-effective default.

## Actor input object example

```json
{
  "products": [
    {
      "sku": "BOOK-001",
      "name": "A Light in the Attic",
      "yourPrice": 55,
      "cost": 30,
      "mapPrice": 50,
      "competitorUrls": [
        "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
      ]
    }
  ],
  "strategy": "undercut",
  "undercutPct": 5,
  "floorMarginPct": 10,
  "generateRepricing": true,
  "assortmentReport": false,
  "maxConcurrency": 5,
  "model": "gpt-4o-mini"
}
```

# Actor output Schema

## `results` (type: `string`):

All product price records and the assortment report in the default dataset.

# 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 = {
    "products": [
        {
            "sku": "BOOK-001",
            "name": "A Light in the Attic",
            "yourPrice": 55,
            "cost": 30,
            "mapPrice": 50,
            "competitorUrls": [
                "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
            ]
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fuze/ai-price-intelligence").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 = { "products": [{
            "sku": "BOOK-001",
            "name": "A Light in the Attic",
            "yourPrice": 55,
            "cost": 30,
            "mapPrice": 50,
            "competitorUrls": ["https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"],
        }] }

# Run the Actor and wait for it to finish
run = client.actor("fuze/ai-price-intelligence").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 '{
  "products": [
    {
      "sku": "BOOK-001",
      "name": "A Light in the Attic",
      "yourPrice": 55,
      "cost": 30,
      "mapPrice": 50,
      "competitorUrls": [
        "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
      ]
    }
  ]
}' |
apify call fuze/ai-price-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fuze/ai-price-intelligence"
        }
    }
}
```

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/Ku0KlbEqlWYjKLfeR/builds/udtg3tqiEvqWKm0gl/openapi.json
