# Shopify Products Scraper — Prices & Variants (`evanatlasx/shopify-products-scraper`) Actor

Scrape any public Shopify store via /products.json: products, variants, prices, SKUs, stock flags. Clear skip reasons. $0.001 per row.

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

## Pricing

from $1.00 / 1,000 product scrapeds

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 Products Scraper

Scrape products and variants from any **public** Shopify store using its built-in `/products.json` endpoint. No login, no Shopify Admin API, no browser.

Unlike scrapers that finish "successfully" with 0 results and no explanation, this Actor checks every store first and, if it cannot be scraped, **tells you why** in the log and in the `SUMMARY` record (not a Shopify store, password-protected, blocked by bot protection, rate limited, empty catalog, invalid URL…).

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `shopUrls` | string\[] | — (required) | Store URLs, e.g. `https://www.allbirds.com`. URLs ending in `/products.json` are accepted; only the origin is used. |
| `maxProductsPerShop` | integer | `100` | Max **products** per shop (each product may yield several variant rows). `0` = as many as the store exposes. |
| `includeVariants` | boolean | `true` | `true`: one row per variant. `false`: one row per product, using the first variant's price. |
| `maxShops` | integer | `5` | Max shops per run (hard cap 20). Extra URLs are skipped and listed in `SUMMARY`. |
| `requestDelayMs` | integer | `500` | Delay between page requests to the same shop. |
| `userAgent` | string | browser UA | Optional custom User-Agent. |

```json
{
    "shopUrls": ["https://www.allbirds.com"],
    "maxProductsPerShop": 50,
    "includeVariants": true
}
```

### Output

One dataset item per variant (or per product when `includeVariants` is `false`):

```json
{
    "shopUrl": "https://www.allbirds.com",
    "shopDomain": "allbirds.com",
    "productId": "7340901859408",
    "variantId": "41980124004432",
    "variantTitle": "8",
    "title": "Women's Allbirds Flip Flop - Dusty Pink",
    "handle": "womens-allbirds-flip-flop-dusty-pink",
    "vendor": "Allbirds",
    "productType": "Shoes",
    "tags": ["womens", "..."],
    "price": 50,
    "compareAtPrice": null,
    "available": true,
    "sku": "AB0123W080",
    "barcode": null,
    "imageUrl": "https://cdn.shopify.com/...",
    "productUrl": "https://www.allbirds.com/products/womens-allbirds-flip-flop-dusty-pink?variant=41980124004432",
    "variantCount": 6,
    "createdAt": "2025-03-01T10:00:00-08:00",
    "updatedAt": "2026-10-01T10:00:00-07:00",
    "scrapedAt": "2026-10-29T12:00:00.000Z"
}
```

`price` / `compareAtPrice` are numbers in the store's currency (or `null`). `tags` is always an array. Rows are de-duplicated by `shopDomain + productId + variantId`.

#### SUMMARY

The default key-value store record `SUMMARY` contains:

```json
{
    "shops": [{ "shopUrl": "...", "ok": true, "products": 50, "rows": 538, "pages": 1, "stopReason": "reached maxProductsPerShop=50", "elapsedMs": 3200 }],
    "products": 50,
    "rows": 538,
    "errors": [{ "shopUrl": "https://example.com", "reason": "http-404: not a Shopify store (no /products.json)" }],
    "skippedReasons": { "https://example.com": "http-404: not a Shopify store (no /products.json)" }
}
```

### How it works

1. **Probe** `https://<shop>/products.json?limit=1`. 404 / non-JSON / password redirect / 401 / 403 / challenge page → the shop is skipped with a reason.
2. **Paginate** `/products.json?limit=<n>&page=N` until a page is short or empty, the product cap is reached, or a safety limit of 25 pages.
3. **Retry** 429 and 5xx with exponential backoff (max 3 retries, honours `Retry-After`).

### Pricing

Pay per event: `product-scraped` is charged once per dataset row pushed. Skipped shops and empty runs cost nothing in events.

### Limitations

- Only data exposed by the public `/products.json` endpoint is available — no Admin API, no orders, no customer data.
- Password-protected stores and non-Shopify sites are skipped (with a reason), never bypassed.
- No exact inventory quantities: only the `available` flag per variant is exposed publicly.
- Some stores sit behind Cloudflare or other bot protection and may block or rate-limit requests; such stores are reported as skipped.
- Some stores cap pagination (often around page 17–20 of 250 products) or disable `/products.json` entirely, so very large catalogs may be incomplete.
- Prices are in the store's default currency; multi-currency / market-specific prices are not resolved.

# Actor input Schema

## `shopUrls` (type: `array`):

Public Shopify store URLs, e.g. https://www.allbirds.com. URLs that already end in /products.json are accepted too. Only the origin is used.

## `maxProductsPerShop` (type: `integer`):

Maximum number of products (not variant rows) to take from each shop. With "Include variants" each product can produce several rows. 0 = as many as the store exposes.

## `includeVariants` (type: `boolean`):

If enabled, outputs one row per variant (size/colour). If disabled, outputs one row per product using the first variant's price.

## `maxShops` (type: `integer`):

Maximum number of shops processed in one run. Extra URLs are skipped and listed in SUMMARY.

## `requestDelayMs` (type: `integer`):

Pause between paginated requests to the same shop to stay polite and avoid rate limits.

## `userAgent` (type: `string`):

Optional custom User-Agent header. Defaults to a desktop browser string.

## Actor input object example

```json
{
  "shopUrls": [
    "https://www.allbirds.com"
  ],
  "maxProductsPerShop": 100,
  "includeVariants": true,
  "maxShops": 5,
  "requestDelayMs": 500
}
```

# Actor output Schema

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

Scraped product / variant rows.

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

Per-shop counts, errors and skip reasons.

# 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 = {
    "shopUrls": [
        "https://www.allbirds.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("evanatlasx/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 = { "shopUrls": ["https://www.allbirds.com"] }

# Run the Actor and wait for it to finish
run = client.actor("evanatlasx/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 '{
  "shopUrls": [
    "https://www.allbirds.com"
  ]
}' |
apify call evanatlasx/shopify-products-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,evanatlasx/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/wwaiYX76csOj9c7Pa/builds/jdz7chvBhriynjAhp/openapi.json
