# Fitment Catalog QA (`repairiq/fitment-catalog-qa`) Actor

Find catalog errors before customers receive the wrong part: duplicate, overlapping, and contradictory applications, year gaps, invalid ranges, inconsistent brands and part numbers.

- **URL**: https://apify.com/repairiq/fitment-catalog-qa.md
- **Developed by:** [Ryan Carter](https://apify.com/repairiq) (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 $2.00 / 1,000 catalog issues

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

## Fitment Catalog QA

Find conflicts and missing information in a supplied fitment catalog.

Audits customer-supplied records. It neither supplies a licensed reference catalog nor certifies that a part fits a vehicle. Findings require review.

### Quick start

Paste this input into the Actor, or save it as `input.json` for the API example. Inline records with example.com URLs are fictional demonstration data. Form prefill values are examples, not defaults for empty API requests.

```json
{
  "rows": [
    {
      "rowId": "1",
      "partNumber": "WN-10042",
      "brand": "Widget Nation",
      "application": "2021-2022 KTM 300 XC-W"
    },
    {
      "rowId": "2",
      "partNumber": "WN-10042",
      "brand": "Widget Nation",
      "application": "2024 KTM 300 XC-W"
    },
    {
      "rowId": "3",
      "partNumber": "WN10042",
      "brand": "Widget nation",
      "application": "2024 KTM 300 XCW"
    },
    {
      "rowId": "4",
      "partNumber": "WN-10042",
      "brand": "Widget Nation",
      "application": "2022 KTM 300 XC-W",
      "engine": "300 2-stroke TPI"
    },
    {
      "rowId": "5",
      "partNumber": "WN-20090",
      "brand": "Widget Nation",
      "application": "2019-2014 Husqvarna TE 300"
    },
    {
      "rowId": "6",
      "partNumber": "WN-30001",
      "brand": "Widget Nation",
      "universal": "yes",
      "application": "2023 KTM 300 XC-W"
    },
    {
      "rowId": "7",
      "partNumber": "",
      "brand": "Widget Nation",
      "application": "2023 GasGas EC 300"
    },
    {
      "rowId": "8",
      "partNumber": "WN-40010",
      "brand": "Widget Nation",
      "application": "KTM 300 XC-W all years"
    }
  ],
  "detectYearGaps": true,
  "emitAuditSummary": true
}
```

### Input and output

The Input tab documents every supported option and default. Supply `rows` or a compatible `sourceDatasetId` (or `csvText`). A run supports at most 10,000 supplied records. Split larger inputs into separate runs.

Returns shared signal envelopes: `entityId`, `entityType`, `signalType`, `severity`, `confidence`, `observedAt`, `sourceUrl`, `evidence`, and Actor-specific `payload`. Compatible envelopes are unwrapped on input; payload fields must still match this Actor’s expected input. A common envelope does not join or enrich separate observations automatically.

Confidence is a heuristic evidence/completeness indicator, not a calibrated probability. Inspect evidence and missing inputs before acting. Dataset exports support JSON and CSV; nested fields are available through the dataset API.

### Pricing and spending limits

Pay per event, with platform usage included. The Apify Store pricing panel shows the current prices.

- **$0.002 per catalog issue**. One catalog issue delivered. A source row can produce more than one issue.
- **$0.25 per catalog audit report**. One requested audit summary report for the supplied catalog.
- **Startup: $0.005 per GB of allocated memory**, with a minimum of one startup event. The default memory allocation is 1 GB or less.

Diagnostics and included extra signals have no output-event charge; the startup charge still applies. Set the maximum run cost to control spending. If the remaining budget cannot cover the next event, the Actor stops and returns the results already completed. Check the run summary before assuming the entire input was processed. Fees from a separate upstream scraper are not included.

### Errors and repeat runs

Malformed or empty required input fails with an actionable error. Unsupported or insufficient records can produce free diagnostic signals or rejection counts in `OUTPUT`. Check the run status, summary, diagnostics, and billing record together; zero results does not establish that no opportunities or problems exist.

The Actor does not schedule itself. Create an Apify task and schedule after checking the initial output.

### Run it from the API

Start asynchronously to avoid request timeouts on larger inputs. Use the returned run ID to wait for completion, then download its dataset.

```bash
curl --request POST 'https://api.apify.com/v2/acts/repairiq~fitment-catalog-qa/runs' \
  --header "Authorization: Bearer $APIFY_TOKEN" \
  --header 'Content-Type: application/json' \
  --data-binary @input.json
```

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const input = JSON.parse(await (await import('node:fs/promises')).readFile('input.json', 'utf8'));
const run = await client.actor('repairiq/fitment-catalog-qa').call(input);
if (run.status !== 'SUCCEEDED') throw new Error('Run failed; inspect its log before using partial results.');
const dataset = client.dataset(run.defaultDatasetId);
for (let offset = 0; ; ) {
    const { items } = await dataset.listItems({ offset, limit: 1000 });
    for (const item of items) console.log(item);
    if (items.length < 1000) break;
    offset += items.length;
}
```

### Limitations and support

Audits customer-supplied records. It neither supplies a licensed reference catalog nor certifies that a part fits a vehicle. Findings require review.

Use data you have permission to process, and respect source restrictions. No affiliation with the named software vendors, marketplaces, or agencies is implied. Report reproducible problems through the Actor Issues tab with a run ID and a minimal input; omit credentials and private customer data.

### Local development

Requires Node.js 22 or newer. Run `npm ci`, `npm run build`, and `npm test` from this Actor directory. Put local input in `storage/key_value_stores/default/INPUT.json`, then run `npm start`. The repository root’s `npm run verify` also checks schemas, shared copies and real entry-point smoke scenarios.

# Actor input Schema

## `rows` (type: `array`):

Inline application rows. Accepts either a free-text `application` or structured year/make/model columns.

## `sourceDatasetId` (type: `string`):

Apify dataset containing catalog rows. Portfolio signal datasets are unwrapped automatically.

## `csvText` (type: `string`):

CSV with a header row. Common column names (part, sku, mfr part number, fitment, start year, ...) are mapped automatically.

## `requiredAttributes` (type: `array`):

Column names that must be non-empty on every row, e.g. position, quantity, material.

## `detectYearGaps` (type: `boolean`):

Flag one- and two-year omissions inside an otherwise continuous platform coverage range.

## `minimumModelYear` (type: `integer`):

Model years below this are reported as invalid.

## `maximumModelYear` (type: `integer`):

Defaults to the current year plus two.

## `emitAuditSummary` (type: `boolean`):

Adds one catalog-level record with issue counts, clean-row rate, and distinct part and brand counts.

## `maximumIssuesPerRow` (type: `integer`):

Caps noise on badly formed rows. Leave empty to report everything.

## Actor input object example

```json
{
  "rows": [
    {
      "rowId": "1",
      "partNumber": "WN-10042",
      "brand": "Widget Nation",
      "application": "2021-2022 KTM 300 XC-W"
    },
    {
      "rowId": "2",
      "partNumber": "WN-10042",
      "brand": "Widget Nation",
      "application": "2024 KTM 300 XC-W"
    },
    {
      "rowId": "3",
      "partNumber": "WN10042",
      "brand": "Widget nation",
      "application": "2024 KTM 300 XCW"
    }
  ],
  "requiredAttributes": [],
  "detectYearGaps": true,
  "minimumModelYear": 1950,
  "emitAuditSummary": true
}
```

# Actor output Schema

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

No description

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

No description

## `billing` (type: `string`):

Check whether the run stopped at its spending limit.

# 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 = {
    "rows": [
        {
            "rowId": "1",
            "partNumber": "WN-10042",
            "brand": "Widget Nation",
            "application": "2021-2022 KTM 300 XC-W"
        },
        {
            "rowId": "2",
            "partNumber": "WN-10042",
            "brand": "Widget Nation",
            "application": "2024 KTM 300 XC-W"
        },
        {
            "rowId": "3",
            "partNumber": "WN10042",
            "brand": "Widget nation",
            "application": "2024 KTM 300 XCW"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("repairiq/fitment-catalog-qa").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 = { "rows": [
        {
            "rowId": "1",
            "partNumber": "WN-10042",
            "brand": "Widget Nation",
            "application": "2021-2022 KTM 300 XC-W",
        },
        {
            "rowId": "2",
            "partNumber": "WN-10042",
            "brand": "Widget Nation",
            "application": "2024 KTM 300 XC-W",
        },
        {
            "rowId": "3",
            "partNumber": "WN10042",
            "brand": "Widget nation",
            "application": "2024 KTM 300 XCW",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("repairiq/fitment-catalog-qa").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 '{
  "rows": [
    {
      "rowId": "1",
      "partNumber": "WN-10042",
      "brand": "Widget Nation",
      "application": "2021-2022 KTM 300 XC-W"
    },
    {
      "rowId": "2",
      "partNumber": "WN-10042",
      "brand": "Widget Nation",
      "application": "2024 KTM 300 XC-W"
    },
    {
      "rowId": "3",
      "partNumber": "WN10042",
      "brand": "Widget nation",
      "application": "2024 KTM 300 XCW"
    }
  ]
}' |
apify call repairiq/fitment-catalog-qa --silent --output-dataset

```

## MCP server setup

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

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/aqZWjTfaOCa8m4dRz/builds/PQFy343ghJO5JJadP/openapi.json
