# OneDEAL Catalog Compare (`pioneering_telecast/catalog-lens`) Actor

Compare two supplier CSV catalogs for price changes, added or removed products, and data-quality issues. Download JSON and CSV reports. Up to 10,000 rows per file. Catalog data is processed and stored on Apify.

- **URL**: https://apify.com/pioneering_telecast/catalog-lens.md
- **Developed by:** [OneDEAL Underwriter](https://apify.com/pioneering_telecast) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$250.00 / 1,000 completed comparisons

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?

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

## Catalog Lens: CSV Price Comparison

Compare two UTF-8 CSV product catalogs using your chosen identifier and price columns. Get added products, removed products, price increases, price decreases, and data-quality issues. Calculations are deterministic; no AI, scraping, proxies or external catalog API is used.

### How to use

1. Export each catalog as UTF-8, comma-delimited CSV with a unique header row.
2. Paste the previous and current CSV text into their input fields.
3. Enter the exact identifier and price column headers for each file.
4. Run the comparison and download the results before your Apify retention period expires.

Example input:

```json
{"previousCsv":"SKU,Price\nA1,12.50\nA2,8.00","currentCsv":"SKU,Price\nA1,13.75\nA3,6.00","previousIdColumn":"SKU","previousPriceColumn":"Price","currentIdColumn":"SKU","currentPriceColumn":"Price"}
```

A1 increases by 1.25 (10%), A2 is removed, and A3 is added. For a zero previous price, the percentage is blank rather than undefined or infinite.

### Supported data and limits

Each file: at most 2 MiB UTF-8, 10,000 data rows, 32 columns, and 4,096 encoded bytes per CSV field. Field limit includes quotes and escaped quotes. Each individual output record is limited to 4 MiB; combined JSON, CSV and dataset outputs are limited to 10 MiB. Split large catalogs into corresponding identifier batches if a limit is reached. Embedded newlines and commas in correctly quoted fields are supported.

Identifiers are trimmed, case-sensitive strings; leading zeros are preserved. Prices must be nonnegative plain decimals with at most four decimal places and at most 10 billion. Currency symbols, thousands separators, negative values, exponent notation and currency conversion are not supported. Compare one currency and consistent units at a time. Duplicate identifiers and invalid prices exclude the affected identifier from price comparison and appear in the issue report. Missing identifiers are reported separately. A structurally valid catalog containing issues still produces a completed comparison; review the issue output before relying on results.

This Actor does not read Excel files, retrieve URLs, monitor catalogs, store reusable history, provide alerts or certify that catalog data is accurate.

### Results

- SUMMARY: row counts, changes, issues, unchanged identifiers and excluded identifiers.
- CHANGES: JSON rows with id, status, oldPrice, newPrice, delta and percent.
- ISSUES: JSON rows with side, record, id and problem. Record counts refer to CSV records, not physical lines inside quoted multiline values.
- CHANGES.csv and ISSUES.csv: UTF-8 CSV exports with a BOM and spreadsheet-formula mitigation. Potential formula-leading cells are prefixed with an apostrophe, so CSV text can differ from JSON text.
- Default dataset: one summary row to minimize duplicate storage-write costs. Enable Include detailed dataset rows only when your integration needs all changes and issues in the dataset; those rows have a type field. Full JSON and CSV outputs are always saved. Unchanged products are counted, not individually exported.

### Pricing behavior

The displayed Apify pricing panel is authoritative. The prepared billing implementation uses one comparison-completed event after all comparison outputs have been saved, including a valid comparison with zero changes. Structurally invalid inputs, exceeded application limits and output-write failures do not trigger that custom event. Partial outputs can remain after a storage or runtime failure. Platform usage charges, if applicable under the displayed pricing model, are distinct from this custom event. Do not assume failed runs consume no platform resources.

### Data handling

Your input and outputs are uploaded to and processed on Apify. They are not confined to your browser. Only submit data you have permission to upload. This Actor uses default unnamed Apify storage and does not send catalogs to AI providers or other external services. It does not log catalog contents intentionally. Apify account permissions, storage access and retention rules apply; this Actor does not implement a separate deletion schedule or a privacy guarantee. Download needed results and manage/delete retained data in your own Apify account. Do not post confidential catalog data or access-bearing output links in support issues.

### Support

Use this Actor's Issues tab for reproducible problems, with a small synthetic sample, run identifier, expected result and actual result. Remove sensitive and proprietary data before submitting an issue.

# Actor input Schema

## `previousCsv` (type: `string`):

Previous UTF-8 CSV text. Uploaded to Apify and retained under its storage policy.

## `currentCsv` (type: `string`):

Current UTF-8 CSV text. Uploaded to Apify and retained under its storage policy.

## `previousIdColumn` (type: `string`):

Exact header name.

## `previousPriceColumn` (type: `string`):

Exact header name.

## `currentIdColumn` (type: `string`):

Exact header name.

## `currentPriceColumn` (type: `string`):

Exact header name.

## `includeDatasetRows` (type: `boolean`):

Optional: also copy changes and issues into the default dataset. This increases storage-write usage. Leave off for lower-cost JSON/CSV results plus one dataset summary.

## Actor input object example

```json
{
  "previousCsv": "sku,price\nDEMO-001,10.00\nDEMO-002,20.00",
  "currentCsv": "sku,price\nDEMO-001,12.00\nDEMO-003,15.00",
  "previousIdColumn": "sku",
  "previousPriceColumn": "price",
  "currentIdColumn": "sku",
  "currentPriceColumn": "price",
  "includeDatasetRows": false
}
```

# Actor output Schema

## `summary` (type: `string`):

No description

## `changes` (type: `string`):

No description

## `issues` (type: `string`):

No description

## `changes_csv` (type: `string`):

No description

## `issues_csv` (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 = {
    "previousCsv": `sku,price
DEMO-001,10.00
DEMO-002,20.00`,
    "currentCsv": `sku,price
DEMO-001,12.00
DEMO-003,15.00`,
    "previousIdColumn": "sku",
    "previousPriceColumn": "price",
    "currentIdColumn": "sku",
    "currentPriceColumn": "price"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pioneering_telecast/catalog-lens").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 = {
    "previousCsv": """sku,price
DEMO-001,10.00
DEMO-002,20.00""",
    "currentCsv": """sku,price
DEMO-001,12.00
DEMO-003,15.00""",
    "previousIdColumn": "sku",
    "previousPriceColumn": "price",
    "currentIdColumn": "sku",
    "currentPriceColumn": "price",
}

# Run the Actor and wait for it to finish
run = client.actor("pioneering_telecast/catalog-lens").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 '{
  "previousCsv": "sku,price\\nDEMO-001,10.00\\nDEMO-002,20.00",
  "currentCsv": "sku,price\\nDEMO-001,12.00\\nDEMO-003,15.00",
  "previousIdColumn": "sku",
  "previousPriceColumn": "price",
  "currentIdColumn": "sku",
  "currentPriceColumn": "price"
}' |
apify call pioneering_telecast/catalog-lens --silent --output-dataset

```

## MCP server setup

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

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/iattFAzBXiQVIpOBj/builds/NGmX1cOKgicDU9vXB/openapi.json
