# Competitor Price Position Snapshot (`junipr/competitor-price-position-snapshot`) Actor

Compare owned and competitor product pages for visible price position, sale badges, shipping text, ratings, availability, and offer presentation.

- **URL**: https://apify.com/junipr/competitor-price-position-snapshot.md
- **Developed by:** [junipr](https://apify.com/junipr) (community)
- **Categories:** E-commerce, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $17.50 / 1,000 product target checkeds

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

## Competitor Price Position Snapshot

Compare competitor product/collection pages for visible price position, sale badges, shipping text, ratings, availability, and offer presentation against owned products.

### What it does

Compares mapped public owned and competitor offers using visible or supplied prices, currency, sale, shipping, rating, and availability evidence.

The actor emits one row per owned-versus-competitor match. Every dataset row uses the declared dataset schema, includes source provenance and a scan timestamp, and is written only after every applicable pay-per-event charge is accepted.

### Typical uses

- Compare competitor product prices
- Snapshot price position for mapped products
- Export sale and shipping signals
- Find pricing gaps against competitors
- Build ecommerce price research sheet

### Input

Use public HTTP(S) URLs or deterministic `htmlInputs`. URL fetching rejects localhost, loopback, link-local, and private-network destinations. `allowedDomains` can further constrain live fetches.

- `startUrls`
- `sitemapUrls`
- `htmlInputs`
- `allowedDomains`
- `maxPages`
- `maxDepth`
- `includeEvidence`
- `includeRawSnapshots`
- `requestDelayMs`
- `timeoutMs`
- `userAgentMode`
- `ownedProductUrls`
- `competitorProductUrls`
- `productMatchMap`
- `priceRecords`
- `collectionUrls`
- `priceRules`
- `includeShippingSignals`
- `maxProducts`
- `maxCompetitors`
- `maxPriceRecords`
- `maxSnapshots`
- `maxChargeUsd`
- `includeReport`

The safety caps named in `maxProducts, maxCompetitors, maxPriceRecords, maxSnapshots, timeoutMs` are enforced in addition to `maxChargeUsd`. A value of `0` for `maxChargeUsd` is a hard zero budget: the actor exits before the first paid operation.

#### Minimal deterministic example

```json
{
  "htmlInputs": [
    {
      "sourceUrl": "https://shop.example/public-page",
      "html": "<html><head><title>Public page</title></head><body><h1>Public evidence</h1></body></html>"
    }
  ],
  "includeEvidence": true,
  "includeReport": true,
  "maxChargeUsd": 75
}
```

The prefilled input remains deliberately small so Apify automated quality runs finish quickly. For production use, replace the example source with public pages you are authorized to access.

### Dataset output

- `sourceUrl`
- `sourceType`
- `pageTitle`
- `recordType`
- `recordName`
- `issueCode`
- `severity`
- `evidenceSnippet`
- `recommendation`
- `canonicalUrl`
- `httpStatus`
- `scannedAt`
- `matchGroupId`
- `productName`
- `competitorName`
- `ownedUrl`
- `competitorUrl`
- `ownedPrice`
- `competitorPrice`
- `priceDifference`
- `pricePosition`
- `currency`
- `saleSignal`
- `shippingSignal`
- `ratingSignal`
- `availabilityComparison`

Reports are also written to key-value storage:

- `competitor-price-position-snapshot-summary-report.md`
- `competitor-price-position-snapshot-records.csv`
- `competitor-price-position-snapshot-issues.json`
- `competitor-price-position-snapshot-evidence-samples.json`
- `competitor-price-position-snapshot-run-metadata.json`

When `includeRawSnapshots` is true, bounded raw HTML snapshots are stored separately. Raw snapshots are off by default.

### Pay-per-event pricing

Platform-usage pass-through is **off**. Prices are the locked fixed-inclusive values for this actor.

| Event | Price | Meaning |
| --- | ---: | --- |
| `actor-start` | $0.08 | Actor Start |
| `product-target-checked` | $0.0175 | Product Target Checked |
| `competitor-price-record-checked` | $0.0175 | Competitor Price Record Checked |
| `price-position-signal-detected` | $0.0345 | Price Position Signal Detected |
| `executive-report-generated` | $0.85 | Executive Report Generated |

Charging rules:

- `actor-start` must be accepted before fetching or rendering begins.
- Page/target events are deduplicated per source.
- Record and finding events fire only when the corresponding output exists.
- Report output is written only after the report event is accepted.
- Partial charges and Apify charge-limit responses stop the run before additional paid output.
- Store discounts are tracked as a separate Console configuration requirement; this source does not claim they are already applied.

### Evidence and failure behavior

- Price difference is competitor price minus owned price.
- Missing sides and currency mismatches are explicit diagnostics.
- The actor does not access private pricing, accounts, carts, or restricted data.

A fetch failure, browser failure, blocked page, missing record, or incomplete match produces a bounded diagnostic row when possible. It never invents a successful extraction. Evidence can be omitted with `includeEvidence: false`.

### Local verification

```bash
pnpm --filter @junipr/competitor-price-position-snapshot build
pnpm --filter @junipr/competitor-price-position-snapshot test
pnpm --filter @junipr/competitor-price-position-snapshot smoke
```

The tests cover strong, weak, unavailable, comparison, and cap fixtures; schema equality; pricing metadata; accepted/partial/limited charges; zero budget; and report generation.

### Limitations

- Results reflect the public source at the scan time and may change later.
- Site markup changes can require selector/parser maintenance.
- The actor does not bypass authentication, CAPTCHAs, robots restrictions, or access controls.
- Legal, tax, pricing, SEO, merchandising, and marketplace decisions remain the user's responsibility.

# Actor input Schema

## `startUrls` (type: `array`):

startUrls for Competitor Price Position Snapshot.

## `sitemapUrls` (type: `array`):

sitemapUrls for Competitor Price Position Snapshot.

## `htmlInputs` (type: `array`):

htmlInputs for Competitor Price Position Snapshot.

## `allowedDomains` (type: `array`):

allowedDomains for Competitor Price Position Snapshot.

## `maxPages` (type: `integer`):

maxPages for Competitor Price Position Snapshot.

## `maxDepth` (type: `integer`):

maxDepth for Competitor Price Position Snapshot.

## `includeEvidence` (type: `boolean`):

includeEvidence for Competitor Price Position Snapshot.

## `includeRawSnapshots` (type: `boolean`):

includeRawSnapshots for Competitor Price Position Snapshot.

## `requestDelayMs` (type: `integer`):

requestDelayMs for Competitor Price Position Snapshot.

## `timeoutMs` (type: `integer`):

timeoutMs for Competitor Price Position Snapshot.

## `userAgentMode` (type: `string`):

userAgentMode for Competitor Price Position Snapshot.

## `ownedProductUrls` (type: `array`):

ownedProductUrls for Competitor Price Position Snapshot.

## `competitorProductUrls` (type: `array`):

competitorProductUrls for Competitor Price Position Snapshot.

## `productMatchMap` (type: `array`):

productMatchMap for Competitor Price Position Snapshot.

## `priceRecords` (type: `array`):

priceRecords for Competitor Price Position Snapshot.

## `collectionUrls` (type: `array`):

collectionUrls for Competitor Price Position Snapshot.

## `priceRules` (type: `array`):

priceRules for Competitor Price Position Snapshot.

## `includeShippingSignals` (type: `boolean`):

includeShippingSignals for Competitor Price Position Snapshot.

## `maxProducts` (type: `integer`):

maxProducts for Competitor Price Position Snapshot.

## `maxCompetitors` (type: `integer`):

maxCompetitors for Competitor Price Position Snapshot.

## `maxPriceRecords` (type: `integer`):

maxPriceRecords for Competitor Price Position Snapshot.

## `maxSnapshots` (type: `integer`):

maxSnapshots for Competitor Price Position Snapshot.

## `maxChargeUsd` (type: `number`):

maxChargeUsd for Competitor Price Position Snapshot.

## `includeReport` (type: `boolean`):

includeReport for Competitor Price Position Snapshot.

## Actor input object example

```json
{
  "startUrls": [],
  "sitemapUrls": [],
  "htmlInputs": [],
  "allowedDomains": [],
  "maxPages": 5,
  "maxDepth": 5,
  "includeEvidence": true,
  "includeRawSnapshots": false,
  "requestDelayMs": 0,
  "timeoutMs": 15000,
  "userAgentMode": "standard",
  "ownedProductUrls": [],
  "competitorProductUrls": [],
  "productMatchMap": [],
  "priceRecords": [
    {
      "matchGroupId": "camera",
      "role": "owned",
      "owned": true,
      "ownedUrl": "https://shop.example/camera",
      "name": "Atlas Camera",
      "price": 129.99,
      "currency": "USD",
      "availability": "in_stock"
    },
    {
      "matchGroupId": "camera",
      "role": "competitor",
      "competitorUrl": "https://competitor.example/camera",
      "name": "Rival Camera",
      "price": 149.99,
      "currency": "USD",
      "saleSignal": true,
      "shippingSignal": "free shipping",
      "ratingSignal": 4.6,
      "availability": "in_stock"
    }
  ],
  "collectionUrls": [],
  "priceRules": [],
  "includeShippingSignals": true,
  "maxProducts": 5,
  "maxCompetitors": 5,
  "maxPriceRecords": 20,
  "maxSnapshots": 20,
  "maxChargeUsd": 75,
  "includeReport": true
}
```

# Actor output Schema

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

No description

## `report` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("junipr/competitor-price-position-snapshot").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("junipr/competitor-price-position-snapshot").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 '{}' |
apify call junipr/competitor-price-position-snapshot --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,junipr/competitor-price-position-snapshot"
        }
    }
}
```

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/wOOoAEzfE3fpKDZsJ/builds/btcxJuoHAXkekLcyp/openapi.json
