# Shopify Store Products: Prices, Discounts & Stock Intelligence (`54m_music/shopify-store-products`) Actor

Read any public Shopify store catalogue and get each product with discount percent, price range, in-stock share, new-arrival flag and a store summary (median price, share on sale). Public products.json, no login, no proxy.

- **URL**: https://apify.com/54m_music/shopify-store-products.md
- **Developed by:** [Sam](https://apify.com/54m_music) (community)
- **Categories:** E-commerce, Business, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 product or store summary rows

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 Store Products: prices, discounts and stock intelligence

Point this Actor at any public Shopify store and get the whole catalogue **already analysed**: real
discount percent, lowest and highest price per product, share of options in stock, a new-arrival flag
and how each price compares with the store's median. Every store also gets one summary row (catalogue
size, median price, share on sale, share in stock). Use it for competitor price tracking, sale
monitoring, catalogue audits, and feeding an AI agent a ranked product list instead of raw JSON.
Sites that are not Shopify are rejected with a clear reason.

### What you get

Two kinds of rows, told apart by `rowType`.

**Product rows (`rowType: "product"`)**

| Field | What it means |
| --- | --- |
| `title`, `url`, `vendor`, `productType`, `tags`, `imageUrl`, `variantCount` | The product as the store lists it |
| `priceMin`, `priceMax` | Lowest and highest variant price, in the store's currency (the public feed does not state the currency) |
| `compareAtPriceMax` | Highest "compare at" (was) price among discounted variants |
| `onSale`, `discountPct` | `discountPct` is the best variant discount: `100 x (compareAt - price) / compareAt`, counted only where compare-at is higher than price. `0` and `onSale = false` otherwise |
| `inStockShare` | Variants in stock divided by all variants (0 to 1) |
| `availability` | `in_stock` (all variants), `partial` (some), `sold_out` (none) |
| `publishedAt`, `createdAt`, `updatedAt` | Dates from the store feed |
| `newArrival` | `true` when published within your new-arrival window (default 30 days) |
| `daysSincePublished`, `daysSinceUpdated` | Age in days at run time |
| `priceVsStoreMedian` | `priceMin / median(priceMin of all products read)`. 1.0 is typical, 0.5 is half the usual price, 2.0 is double |

**Store summary row (`rowType: "store"`)**

| Field | What it means |
| --- | --- |
| `catalogueSize` | Products read from the store |
| `medianPrice`, `priceMin`, `priceMax` | Price spread across the catalogue |
| `pctOnSale`, `avgDiscountPct` | Share of products with a real discount, and their average best discount |
| `pctInStock` | Share of products with at least one variant in stock |
| `newArrivals` | Count of new arrivals in your window |
| `vendorCount`, `productTypeCount`, `lastUpdatedDaysAgo` | Catalogue breadth and freshness |

### Input

| Field | Default | Notes |
| --- | --- | --- |
| `storeUrls` | one demo store | Store addresses, one per line. Paths are ignored |
| `maxProductsPerStore` | 250 | Cap per store (up to 5,000) |
| `newArrivalDays` | 30 | Window for the new-arrival flag |
| `onlyOnSale` | false | Return only discounted products (the summary still covers the whole catalogue) |
| `includeStoreSummary` | true | One summary row per store |

```json
{ "storeUrls": ["https://www.colourpop.com"], "maxProductsPerStore": 100, "newArrivalDays": 30 }
```

### Output example

```json
{
  "rowType": "product",
  "store": "www.colourpop.com",
  "title": "Liked Christmas a Lot…",
  "vendor": "ColourPop", "productType": "Shadow Stix Set", "variantCount": 1,
  "priceMin": 16, "priceMax": 16, "compareAtPriceMax": null,
  "onSale": false, "discountPct": 0,
  "inStockShare": 1, "availability": "in_stock",
  "newArrival": true, "daysSincePublished": 0.4, "daysSinceUpdated": 0,
  "priceVsStoreMedian": 1.33
}
```

### Pricing

Pay per event: you pay for each row written to the dataset (products and store summaries), plus the
standard Apify start event. See the Pricing tab. No proxy or browser is used, so runs are small and
fast: 100 products take about 3 seconds. A run that produces no rows fails, so you do not pay for an
empty run.

### How it works and limits

- Data comes from the public `/products.json` feed that Shopify stores publish, read 250 products per
  page. No login, no scraping of product pages.
- The Actor reads `robots.txt` first and skips a store that disallows the feed. It waits at least 0.6 s
  between requests, waits out one HTTP 429 `Retry-After`, then stops. It never uses a proxy or evades
  blocks. Shopify rate-limits this feed per IP, so very large runs across many stores can be slowed.
- A site without `/products.json` is skipped with "not a Shopify store" in the run status message. The
  run only fails when every store fails.
- Some stores hide or limit the feed. You get what a visitor can see: hidden and draft products are
  not included.
- Only public catalogue data is read. No customer, order or staff data is collected.

### FAQ

**Why is a sale not detected?** Discounts are read from the "compare at" price, which stores set on
purpose. A store that discounts at checkout (codes, automatic cart discounts) shows no sale here.

**Can I track discounts over time?** Yes. Schedule the Actor daily and compare `discountPct`,
`availability` and `inStockShare` between runs.

**What about WooCommerce stores?** Use the WooCommerce Store Products Actor; it reads the WooCommerce
Store API with the same fields.

# Actor input Schema

## `storeUrls` (type: `array`):

Shopify stores to read, one per line, for example https://www.allbirds.com. Only the site address is used.

## `maxProductsPerStore` (type: `integer`):

Stop after this many products for each store.

## `newArrivalDays` (type: `integer`):

A product counts as a new arrival when it was published within this many days.

## `onlyOnSale` (type: `boolean`):

Return only products with a real discount. The store summary row still covers the whole catalogue.

## `includeStoreSummary` (type: `boolean`):

Adds one summary row per store: catalogue size, median price, share on sale, share in stock.

## Actor input object example

```json
{
  "storeUrls": [
    "https://www.colourpop.com"
  ],
  "maxProductsPerStore": 25,
  "newArrivalDays": 30,
  "onlyOnSale": false,
  "includeStoreSummary": true
}
```

# Actor output Schema

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

Every scored row in the default dataset, overview table view.

## `allFields` (type: `string`):

Every row with all fields.

# 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 = {
    "storeUrls": [
        "https://www.colourpop.com"
    ],
    "maxProductsPerStore": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("54m_music/shopify-store-products").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 = {
    "storeUrls": ["https://www.colourpop.com"],
    "maxProductsPerStore": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("54m_music/shopify-store-products").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 '{
  "storeUrls": [
    "https://www.colourpop.com"
  ],
  "maxProductsPerStore": 25
}' |
apify call 54m_music/shopify-store-products --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,54m_music/shopify-store-products"
        }
    }
}
```

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/aQvSHcvLBHaOge04l/builds/8jHtjkImDbgiYNGGC/openapi.json
