# Shopify Product Feed Scraper (`brotherly_elm/shopify-products-scraper`) Actor

Collect product data from public Shopify feeds. Provide store domains, collection handles, or product URLs. Choose product or variant rows and filter by update time, publication time, or sale status. Output can be capped per store and overall. No affiliation with or endorsement by Shopify.

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

## Pricing

from $0.50 / 1,000 variant 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 product feed scraper

Collect public Shopify product data from a store, collection, or individual product page. The actor makes public HTTPS `GET` requests only, checks `robots.txt`, follows only same-registrable-domain redirects, and stops on 403/429/430 responses. It does not use Shopify credentials, the Admin API, private data, or `.js` endpoints.

### Inputs

`startUrls` can be combined with `stores`. `stores` requests each explicit store root; `startUrls` adds store-root, collection, or individual product routes. Normalized duplicate store hosts are processed once, retaining the applicable root and supplied URL routes. Accepted targets include a store root, a collection path, or an individual product path, for example:

```json
{
  "startUrls": [
    "https://shop.example/",
    "https://shop.example/collections/sale",
    "https://shop.example/products/linen-shirt"
  ],
  "rowPer": "product"
}
```

A product target requests `/products/{handle}.json` only, after robots permission. A product response must be a JSON object with a product handle and a variants array; either a bare product object or `{ "product": { ... } }` is accepted. Collection targets use `/collections/{handle}/products.json`; store roots use `/products.json`. The schema accepts `startUrls` as a list of strings and `stores` as a list of store domains or URLs; when both are present, both are retained and duplicate hosts are de-duplicated. Set `collection` to a handle when using `stores` to read a collection feed.

Optional filters: `updatedWithinHours`, `publishedWithinHours`, and `onSaleOnly`. `maxProductsPerStore` defaults to 10 and is bounded at 50,000; `totalRowCap` defaults to 100 and is bounded at 10,000 output rows. Collection handles are limited to 128 alphanumeric, underscore, or hyphen characters. The crawler fetches at most 200 pages per endpoint, 250 products per feed page, and stops at an 840-second overall deadline. Requests are spaced by 1.2 seconds by default. `offlineFixture: true` emits a fixed synthetic sample without storefront requests; all unrelated inputs are ignored, while `rowPer: "variant"` is honored to return two fixture variant rows (the default product mode returns one product row). Malformed `startUrls` entries fail validation with an explicit error.

### Row modes and sample outputs

Examples below are synthetic and illustrate the output field shapes. The product has two variants: a sale Small and a regular-price Large.

Product mode returns one row for each product and retains the existing nested variant objects unchanged. It adds product-level timestamps (`created`, `updated`, `published`), numeric price and compare-at-price bounds, sale and availability flags, `variant count`, ordered `option names`, and an `images` array of `{ "url", "alt" }` objects. Bounds ignore missing/non-numeric prices and are `null` when no usable value exists; `on-sale` is true if any variant is discounted, and `any-variant-available` is true if any variant is available. Image entries retain a null `alt` if Shopify does not supply alt text. Product mode exposes the full product-catalogue row; `rowPer: "variant"` keeps one row per variant and the existing variant-row fields.

`rowPer: "product"` (the default) returns one row for the product, with variant details nested:

```json
{
  "store": "shop.example",
  "product id": 11,
  "title": "Synthetic Linen Shirt",
  "handle": "synthetic-linen-shirt",
  "product URL": "https://shop.example/products/synthetic-linen-shirt",
  "vendor": "Example Workshop",
  "product type": "Apparel",
  "tags": ["synthetic", "fixture"],
  "created": "2025-01-01T00:00:00Z",
  "updated": "2025-01-09T00:00:00Z",
  "published": "2025-01-02T00:00:00Z",
  "min variant price": 24.0,
  "max variant price": 24.0,
  "min compare-at price": 30.0,
  "max compare-at price": 30.0,
  "on-sale": true,
  "any-variant-available": true,
  "variant count": 2,
  "option names": ["Size"],
  "images": [{"url": "https://cdn.example.invalid/synthetic.jpg", "alt": "Synthetic linen shirt"}],
  "variants": [
    {
      "variant id": 101,
      "variant title": "Small",
      "SKU": "SYN-S",
      "price": 24.0,
      "compare-at price": 30.0,
      "onSale": true,
      "discountPercent": 20.0,
      "available": true,
      "option values": {"Size": "Small"}
    },
    {
      "variant id": 102,
      "variant title": "Large",
      "SKU": "SYN-L",
      "price": 24.0,
      "compare-at price": null,
      "onSale": false,
      "discountPercent": null,
      "available": false,
      "option values": {"Size": "Large"}
    }
  ]
}
```

`rowPer: "variant"` returns one row per variant, repeating the parent product fields:

```json
[
  {
    "store": "shop.example",
    "product id": 11,
    "title": "Synthetic Linen Shirt",
    "handle": "synthetic-linen-shirt",
    "product URL": "https://shop.example/products/synthetic-linen-shirt",
    "vendor": "Example Workshop",
    "product type": "Apparel",
    "tags": ["synthetic", "fixture"],
    "variant id": 101,
    "variant title": "Small",
    "SKU": "SYN-S",
    "price": 24.0,
    "compare-at price": 30.0,
    "onSale": true,
    "discountPercent": 20.0,
    "available": true,
    "option values": {"Size": "Small"}
  },
  {
    "store": "shop.example",
    "product id": 11,
    "title": "Synthetic Linen Shirt",
    "handle": "synthetic-linen-shirt",
    "product URL": "https://shop.example/products/synthetic-linen-shirt",
    "vendor": "Example Workshop",
    "product type": "Apparel",
    "tags": ["synthetic", "fixture"],
    "variant id": 102,
    "variant title": "Large",
    "SKU": "SYN-L",
    "price": 24.0,
    "compare-at price": null,
    "onSale": false,
    "discountPercent": null,
    "available": false,
    "option values": {"Size": "Large"}
  }
]
```

The schema includes optional currency metadata on rows when the storefront exposes it. Variant counts vary by product; product mode outputs one row per product, while variant mode can output many rows per product.

### Cost estimate

Planning estimate uses $0.0005 per output row plus a $0.00005 run-start event:

| Volume | Product mode | Variant mode |
|---|---:|---:|
| 1,000 output rows | $0.50005 | $0.50005 |
| 1,000 products | $0.50005 (1,000 rows) | $0.0005 × output rows + $0.00005 start event |

For example, 1,000 products averaging two variants produce about 2,000 variant rows, or $1.00005 under this estimate. This is a planning estimate based on output volume, not a platform quote; storefront availability, robots rules, and rate limits affect the data returned.

### Sample run and limits

The recaptured final-source ladder (`../../ladder-raw-v06.json`) processed 60 stores and produced 454 product rows; 46 stores returned rows (349.997 seconds reported by the actor). Five separate product URL probes across five stores returned an allowed product JSON shape (see `../../product-url-cases-v02.json`). All ladder rows passed required-field and aggregate checks; details are in `../../ladder.md`. The 47-test suite passed with socket operations blocked, and all 17 isolated gauntlet cases passed (`../../tests-final.log`, `../../gauntlet-final.log`; summary: `../../gauntlet.md`).

### Measured coverage (November 2026)

On 2026-11-20, an ordered, anonymous ladder tested 60 storefronts with a cap of 10 products per store and 10,000 output rows. The run took 340.250 seconds, made no retries, and recorded 2,319 variant rows. Forty-six stores returned data; the remaining outcomes are summarized below. These are store-level result counts, whereas 2,319 counts output rows. Product caps bound what was observed, and this fixed sample does not estimate coverage across all Shopify stores or establish how many products each store contains. Status categories describe this run only.

A separate anonymous check found that the published robots rules allowed the public `/products.json` path, yet a feed request received HTTP 429. A later anonymous request received HTTP 200; these distinct responses show that a robots allowance does not assure a successful response or steady availability. The ladder itself made no retries. This measurement describes public endpoint responses at the time tested, not a guarantee of future access or a complete catalogue.

| Store result | Stores |
|---|---:|
| Returned variant rows (`ok`) | 46 |
| Not Shopify | 8 |
| Forbidden (HTTP 403) | 2 |
| Rate limited (HTTP 429) | 1 |
| Other HTTP error | 1 |
| Other error | 1 |
| Redirected elsewhere | 1 |
| **Total tested** | **60** |

Not affiliated with or endorsed by Shopify.

# Actor input Schema

## `stores` (type: `array`):

Shopify storefront domains or URLs to inspect.

## `rowPer` (type: `string`):

Product mode emits one row with all variants nested; variant mode emits one row per variant.

## `startUrls` (type: `array`):

Optional HTTPS store roots, /collections/{handle} URLs, or /products/{handle} URLs. Product URLs fetch only the public .json endpoint after robots.txt permission; no .js endpoint is used. Can be combined with stores; normalized duplicate store hosts are processed once while retaining supplied URL routes.

## `collection` (type: `string`):

Optional public collection handle to filter products.

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

Maximum number of products emitted per store; defaults to 10.

## `updatedWithinHours` (type: `integer`):

Optional maximum age in hours based on product update time.

## `publishedWithinHours` (type: `integer`):

Optional maximum age in hours based on product publication time.

## `onSaleOnly` (type: `boolean`):

Return only variants currently marked on sale.

## `offlineFixture` (type: `boolean`):

Use synthetic products without storefront network requests.

## `totalRowCap` (type: `integer`):

Hard upper bound on output rows across stores; defaults to 100.

## Actor input object example

```json
{
  "stores": [
    "colourpop.com",
    "kith.com",
    "fromourplace.com"
  ],
  "rowPer": "product",
  "maxProductsPerStore": 10,
  "onSaleOnly": false,
  "offlineFixture": false,
  "totalRowCap": 100
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

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

No description

## `stores` (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("brotherly_elm/shopify-products-scraper").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("brotherly_elm/shopify-products-scraper").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 brotherly_elm/shopify-products-scraper --silent --output-dataset

```

## MCP server setup

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

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/sGlbg0KIpEHIuUlv6/builds/FEU1ZPAutvgpQsETF/openapi.json
