# Wholesale Catalog Normalizer & Buyer Feed Builder (`afkdigital/newapi04-wholesale-catalog-normalizer`) Actor

Normalize catalogs you own or may process into deduplicated brand and product feeds. Includes a licensed real example; does not crawl marketplaces.

- **URL**: https://apify.com/afkdigital/newapi04-wholesale-catalog-normalizer.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$6.00 / 1,000 unique catalog records

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

## Wholesale Catalog Normalizer & Buyer Feed Builder (NEWAPI04)

Normalize a catalog you own or have the right to process into product or brand records for sourcing, Clay, n8n, and spreadsheets. This Actor is a feed processor, not a catalog discovery service. It does not crawl Faire or any marketplace.

### Quick start

Run with no input to process three actual food products from the bundled Open Food Facts example. The example shows field mapping and brand/product output. It is **not a wholesale feed**: wholesale prices, minimum order amounts, MOQ, lead times, locations and shipping availability are unknown and remain null or empty. To process your own data, paste a CSV with headers or JSON array into `catalogText`, or supply a direct public HTTPS `catalogUrl`. Set `exampleData=false` when you want a missing source to be an error.

Example (customer-provided values shown for format illustration, not verified wholesale offers):

```json
{
  "mode": "product",
  "exampleData": false,
  "catalogText": "brand_name,product_name,sku,price,currency,minimum_order_quantity,minimum_order_amount\nExample Brand,Example Cup,C1,8,USD,12,150",
  "format": "csv",
  "maxResults": 100
}
```

Bundled real example files: `data/openfoodfacts_sample.csv` and `data/openfoodfacts_sample.json`. The CSV was derived from three product records retrieved on 2026-10-17 using the official Open Food Facts product API: barcodes 3017620422003, 5449000000996, and 8076800195057. The source URLs are included in each row. The `brands` field is preserved verbatim as `brand_name`; it may contain multiple names, and should not be treated as verified manufacturer identity.

### Input and rules

Required columns: `brand_name`, `product_name`. Optional fields: `brand_url`, `brand_location`, `website`, `product_url`, `sku`, `category`, `price`, `currency`, `minimum_order_quantity`, `minimum_order_amount`, `lead_time_days`, `shipping_destinations`, `rating`, `review_count`, `tags`, `source_name`, `source_license`, `source_url`. Common aliases (vendor, supplier, moq, wholesale_price, ships_to) are accepted. Missing scalar fields are null; missing lists are empty. Invalid rows lacking either required field are skipped, while a feed with only invalid rows fails. Malformed CSV/JSON, source HTTP errors, and invalid row types fail rather than returning an apparently successful empty result.

Choose `mode=product` or `mode=brand`. Filter by keyword, brand location, shipping destination, maximum minimum order amount, or maximum lead time, and cap with `maxResults`. A filter requiring a missing field excludes that record. A valid source with no matching records succeeds with an empty Dataset.

The HTTP reader accepts only direct public HTTPS feeds, at most 5 MB and 50,000 rows, with timeouts and up to three attempts on temporary errors. Do not include credentials in URLs. Only upload or link data you may process and export.

### Dataset output

In product mode, one unique product becomes one Dataset item. In brand mode, one unique brand in the submitted filtered feed becomes one Dataset item. `observed_product_count` counts products observed in this feed; `catalog_total_count` is null. MOQ is a unit quantity and `minimum_order_amount` is a monetary threshold. The Actor never infers growth or missing wholesale values.

Export the default Dataset as JSON or CSV from Apify for Clay and n8n. Source attribution columns are retained when supplied. A restart of the same run checks items already saved in its default Dataset and skips them; separate runs each process their own Dataset and are charged independently.

### Example data rights

The bundled example is adapted from the [Open Food Facts database](https://world.openfoodfacts.org/) under [Open Database License (ODbL) 1.0](https://opendatacommons.org/licenses/odbl/1-0/) and Database Contents License. Attribution: © Open Food Facts contributors. Changes: selected three products, mapped fields to this Actor's CSV/JSON schema, omitted images and most source attributes. The example and its derivative database are offered under ODbL 1.0; the product text contents retain their applicable source license. You may copy, upload, use commercially and redistribute this example subject to attribution and applicable share-alike obligations. Consult the [source's reuse guidance](https://openfoodfacts.github.io/documentation/docs/Product-Opener/api/tutorials/license-be-on-the-legal-side/) when combining with other databases. This example does not license customer catalogs or third-party artwork.

### Pricing

Pay per event: the `apify-default-dataset-item` event is intended as the only billable event at **$0.006 per successfully saved unique default Dataset item** ($6 per 1,000 items), whether brand or product. Skipped, rejected, filtered, or duplicate rows are not Dataset items. Each new Actor run is charged independently even if it processes an identical catalog. The live Store pricing section is authoritative. Platform compute and storage charges follow the current Apify plan and the Store listing's usage-inclusion setting. Post-run Dataset storage or retrieval may incur standard Apify charges.

### Local development

`npm ci && npm test && npm start`; `docker build -t newapi04 .`. To run locally, set `APIFY_LOCAL_STORAGE_DIR` and create `storage/key_value_stores/default/INPUT.json`.

# Actor input Schema

## `catalogUrl` (type: `string`):

Direct HTTPS URL to a catalog feed you may process. Redirects and private network URLs are rejected.

## `catalogText` (type: `string`):

Paste CSV with headers or JSON array. Use this or catalog URL.

## `exampleData` (type: `boolean`):

Use a three-product Open Food Facts ODbL example when no catalog is supplied; wholesale prices and minimums are unknown.

## `format` (type: `string`):

Filter or setting: format

## `mode` (type: `string`):

Filter or setting: mode

## `keyword` (type: `string`):

Filter or setting: keyword

## `brandLocation` (type: `string`):

Filter or setting: brandLocation

## `shippingDestination` (type: `string`):

Filter or setting: shippingDestination

## `maxMinimumOrderAmount` (type: `number`):

Filters only when amount is present; missing amounts are excluded when this filter is set.

## `maxLeadTimeDays` (type: `integer`):

Filter or setting: maxLeadTimeDays

## `maxResults` (type: `integer`):

Filter or setting: maxResults

## Actor input object example

```json
{
  "exampleData": true,
  "format": "auto",
  "mode": "product",
  "maxResults": 100
}
```

# Actor output Schema

## `dataset` (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("afkdigital/newapi04-wholesale-catalog-normalizer").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("afkdigital/newapi04-wholesale-catalog-normalizer").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 afkdigital/newapi04-wholesale-catalog-normalizer --silent --output-dataset

```

## MCP server setup

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

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/AmELNnxnNSG6GiIgA/builds/VNDFqDn5Pj3rvfDWF/openapi.json
