# Shopify Collection Assortment Exporter (`produkdigitalali/shopify-collection-assortment-exporter`) Actor

Export deduplicated Shopify collection products with collection membership, vendor, tags, options and coverage reports. Compare assortments without duplicate product charges.

- **URL**: https://apify.com/produkdigitalali/shopify-collection-assortment-exporter.md
- **Developed by:** [ProdukDigitalAli](https://apify.com/produkdigitalali) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 assortment product exporteds

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

## Shopify Collection Assortment Exporter

Export a deduplicated assortment from selected public Shopify collections. A product present in several supplied collections becomes one row with all observed collection memberships. Use it for assortment comparison, collection overlap analysis and preparing product lists for downstream enrichment.

### Quick start

Paste one to five canonical collection URLs. Start with two products and one page. No Shopify account, private token, proxy or AI key is required.

{
"collectionUrls": \[
"https://www.deathwishcoffee.com/collections/all"
],
"maxProductsPerCollection": 2,
"maxPagesPerCollection": 1
}

### Output

Each row has stable store/product identity, product URL, title, vendor, product type, tags, option names, variant/availability/image counts and observed collection memberships. Membership entries include source page and returned ordinal. OUTPUT reports each collection's pages, observed products and stop reason. Export JSON/CSV/Excel from the dataset; collections and tags are nested arrays.

This complements Shopify Variant Price Feed & SKU Matcher: this product discovers a bounded assortment from collection URLs and merges collection membership; the variant feed takes selected product URLs and returns variant prices with SKU mappings.

### Pricing

Pay per event: **USD0.002 per unique saved product (USD2 per1,000 products)**. Multiple supplied collection memberships do not add another charge for the same store/product. Failed requests, diagnostics and empty readable collections are free. Apify platform charges can also apply. Billing is measured after successful storage; an infrastructure failure between storage and charge is not an atomic transaction.

### Coverage and limits

One to five collections;1-200 observed products per collection;1-10 pages; maximum50 products per page; up to1,000 unique rows and50 HTTP requests;120-second work budget. There is no automatic retry or paid proxy. HTTP403/429 or unavailable feeds are reported explicitly. Products already observed from a partially readable collection may be exported, with that collection's error visible in OUTPUT. All source failures fail the run. Valid empty collections can succeed with zero charges.

Public storefront products.json feeds are not a guaranteed Shopify Admin API contract and may be missing, filtered, capped or reordered by a merchant. Short/empty pages mean only the public feed ended at observation time. The export is not an atomic snapshot. Collection membership is observed only within the supplied limits. Returned ordinal is not verified storefront visual position, bestseller rank, sales or popularity. No stock quantity, price, currency, hidden/private products or historical inventory is inferred. This Actor is not a full catalog mirror or import-ready Shopify CSV. Large variant payloads and unsafe numeric IDs are rejected rather than silently corrupted.

### Security

Read-only public HTTPS requests with validated/pinned public DNS, same-origin redirects and hard time/response/request limits. No cookies, login, cart writes, private IP targets, script execution or arbitrary endpoints. No customer/reviewer information is collected. Do not supply sensitive URLs. Use exported product content according to applicable rights and store terms. Not affiliated with Shopify.

### Development

Install dependencies with npm ci, run npm test, then apify validate-schema. See TEST_PLAN.md for real-network and cloud acceptance. Input defaults intentionally return a small bounded sample suitable for automated QA.

# Changelog

This Actor's version history is a separate document: https://apify.com/produkdigitalali/shopify-collection-assortment-exporter/changelog.md

# Actor input Schema

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

1-5 canonical HTTPS /collections/handle URLs. Public feed support varies by store.

## `maxProductsPerCollection` (type: `integer`):

Hard cap1-200. Coverage reports truncation.

## `maxPagesPerCollection` (type: `integer`):

Hard cap1-10;50 products maximum per page.

## Actor input object example

```json
{
  "collectionUrls": [
    "https://www.deathwishcoffee.com/collections/all"
  ],
  "maxProductsPerCollection": 2,
  "maxPagesPerCollection": 1
}
```

# Actor output Schema

## `products` (type: `string`):

No description

## `summary` (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 = {
    "collectionUrls": [
        "https://www.deathwishcoffee.com/collections/all"
    ],
    "maxProductsPerCollection": 2,
    "maxPagesPerCollection": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("produkdigitalali/shopify-collection-assortment-exporter").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 = {
    "collectionUrls": ["https://www.deathwishcoffee.com/collections/all"],
    "maxProductsPerCollection": 2,
    "maxPagesPerCollection": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("produkdigitalali/shopify-collection-assortment-exporter").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 '{
  "collectionUrls": [
    "https://www.deathwishcoffee.com/collections/all"
  ],
  "maxProductsPerCollection": 2,
  "maxPagesPerCollection": 1
}' |
apify call produkdigitalali/shopify-collection-assortment-exporter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,produkdigitalali/shopify-collection-assortment-exporter"
        }
    }
}
```

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/v5zpdHgZO7IjwahRu/builds/LEDPQzlDEIJCiI9ak/openapi.json
