# Shopify Products Scraper — Prices, SKUs & Stock (`kopachelli/shopify-products-scraper`) Actor

Give it a Shopify shop address. It reads the shop's public /products.json endpoint and returns every product with variants, prices, SKUs, stock state and images — up to the maxProducts cap, or one collection.

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

## Pricing

from $1.00 / 1,000 products

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

**Give it the address of a Shopify shop. It reads the shop's public `/products.json`
endpoint — the same JSON the shop's own storefront uses — page by page, and returns every
product with its variants, prices, SKUs, stock state, images and product-page address, up
to the `maxProducts` cap. It can also read one collection
(`/collections/<handle>/products.json`). No login, no cookies, no personal data.**

### What it is for

- **Competitor and market monitoring.** A current snapshot of a shop's catalogue: prices,
  `compare_at_price` discounts, stock state, new and removed products.
- **Catalogues into tools.** One clean JSON row per product, ready for Airtable,
  Make.com, Google Sheets or your own pipeline.
- **AI agents.** One cheap call that answers "what does this shop sell, at what price, in
  stock?".

### Input

| Field | Default | Meaning |
|---|---|---|
| `shopUrl` (required) | — | The shop's address, for example `https://www.allbirds.com`. Only the scheme and host are used; a path is ignored — the collection goes through `collectionHandle`. |
| `collectionHandle` | none | Read one collection instead of the whole catalogue: the handle of the collection, for example `best-sellers`. |
| `maxProducts` | 1000 | The run stops when it has returned this many products. The largest value is 100,000. There is no "unlimited". |

### Example input

```json
{
    "shopUrl": "https://www.allbirds.com",
    "maxProducts": 1000
}
```

This is the prefill input: it reads the whole visible catalogue of allbirds.com — 308
products at the time of writing.

### Output

#### Dataset: one item per product

```json
{
    "shop": "https://www.allbirds.com",
    "productId": 7292464824400,
    "handle": "womens-wool-cruiser-port-port-sole",
    "title": "Women's Wool Cruiser - Port (Port Sole)",
    "vendor": "Allbirds",
    "productType": null,
    "tags": ["best-seller", "wool"],
    "url": "https://www.allbirds.com/products/womens-wool-cruiser-port-port-sole",
    "image": "https://cdn.shopify.com/.../image.png",
    "images": ["https://cdn.shopify.com/.../image.png"],
    "variants": [
        {
            "id": 41990816137296,
            "title": "5",
            "sku": "A12858W050",
            "price": "120.00",
            "compareAtPrice": null,
            "available": false,
            "inventoryQuantity": null
        }
    ],
    "status": "active",
    "updatedAt": "2026-11-01T10:00:00-07:00"
}
```

| Field | Meaning |
|---|---|
| `shop` | The origin that was read. |
| `productId`, `handle` | The product's id and URL handle, as the endpoint gives them. |
| `title`, `vendor`, `productType`, `tags` | As the endpoint gives them. `tags` accepts both shapes shops really send: an array of strings and a comma-separated string. |
| `url` | The product's page on the shop. |
| `image`, `images` | The product's image addresses, as the CDN gives them. |
| `variants` | One entry per variant: `id`, `title`, `sku`, `price`, `compareAtPrice`, `available`, `inventoryQuantity`. |
| `status`, `updatedAt` | `active`/`draft`/`archived` and the endpoint's timestamp, as given. |

Nothing is guessed: a field the endpoint does not give is `null` or empty.
`inventoryQuantity` is the shop's own number where the endpoint exposes it; `null`
otherwise — deeper per-location inventory needs the shop's admin, which is out of scope.
Prices are the strings the endpoint gives, in the shop's own currency. `tags` is capped at
200, `variants` at 500 and `images` at 100 per product.

A product appears once per run, also after a restart; a repeated page ends the read.

#### Key-value store: the record `OUTPUT`

A summary of the run: the endpoint read, products pushed, pages and requests, duplicates
skipped, and the reason the run stopped — including `partial`, when a later page broke and
the products already read stayed in the dataset.

### How it reads the shop

1. It reads `/robots.txt` of the shop once. A missing file allows everything; a file that
   disallows `/products.json` or cannot be read stops the run — what the shop allows is
   then not known, and the run says so.
2. It reads `/products.json?limit=250&page=N` one page at a time, until an empty or short
   page, the `maxProducts` cap, or a stop.
3. With `collectionHandle` it reads `/collections/<handle>/products.json` the same way.

### How it behaves on the web

- **It says who it is.** Every request carries the User-Agent
  `ShopifyProductsScraper/1.0 (+https://apify.com/kopachelli/shopify-products-scraper)`.
  It does not pose as a browser or as another bot.
- **It obeys `robots.txt` for its own requests**, including every redirect hop — a
  `robots.txt` may redirect only inside the asked origin. To address this Actor in a
  `robots.txt`, use the name `ShopifyProductsScraper`. There is no input that turns this
  off.
- **It is slow on purpose.** One request at a time per host, at least 250 ms between two
  request starts, and a `Crawl-delay` of the shop honoured up to 10 seconds.
- **It retries once at most**, on 429, on 503 and when there is no answer — never sooner
  than `Retry-After` says, and not at all when the wait exceeds 30 seconds.
- **It never goes around a block.** On 401, 403, 451, a challenge answer, or 429 after
  the one retry, it stops for that shop and reports it. A shop behind a bot wall is
  reported, not worked around; the Actor uses no proxy.
- **It leaves a silent host alone.** Three unusable answers in a row — no answer, a server
  error, a download that breaks off — and the host is not asked again in the run.
- **It reads public addresses only**: `http` and `https`, and no address of a private
  network — written out in any form, or reached through a public name that resolves to
  one.
- **It never carries a password.** An address with a user name or a password is refused.

### Pricing

The Actor uses Apify's pay-per-event model. Two events are charged:

- `apify-actor-start` — once per run;
- `shop-read` — once per run, when the shop's product endpoint answers;
- `apify-default-dataset-item` — once per product written to the dataset.

Products dropped by the cap or duplicated are never written and never charged. The
current prices are set in Console and shown on this page.

### Limits

| What | Limit |
|---|---|
| Products per run | `maxProducts`, at most 100,000 |
| Page size | 250 products per request |
| Waiting for an answer | 30 seconds; a whole file 5 minutes |
| Redirects | 5 per request; every hop is checked against `robots.txt` |
| `robots.txt` | the first 500 KB are read |
| Answer size | 32 MB per products page |
| Per product | 200 tags, 500 variants, 100 images, 2,000 characters of text per field |

### When a run is interrupted

If the platform moves the run to another server, or the run is aborted gracefully, the
Actor saves where it is — the next page and the products already delivered — before it
stops. The restarted run continues from there and does not return a product twice.

### Questions and answers

**Does it work on every Shopify shop?**
Only shops whose `/products.json` endpoint answers publicly — most do, it is what the
shop's own storefront reads. A shop behind a login, a bot wall or a `robots.txt` that
closes the endpoint is reported, not worked around.

**What if the catalogue is bigger than `maxProducts`?**
The run stops at the cap and the summary says `stoppedBy: 'limit'`. Raise `maxProducts`
(up to 100,000) or use `collectionHandle` to narrow the read.

**Does it read reviews, Q\&A or inventory per location?**
No. Reviews and Q\&A are personal data and out of scope. `inventoryQuantity` is the
shop's own aggregate where the endpoint exposes it; per-location stock needs the shop's
admin API.

**What does a `partial` ending mean?**
A later products page broke (server error, broken download, block). The products already
read stayed in the dataset and the summary says which page failed — the catalogue is
incomplete, not wrong.

### Support

Questions and bug reports: the **Issues** tab of this Actor's page. The version and the
changelog are on the Actor's page too.

# Actor input Schema

## `shopUrl` (type: `string`):

The address of a Shopify shop, for example https://www.allbirds.com. Only the public product catalogue is read; no login and no personal data.

## `collectionHandle` (type: `string`):

Read one collection instead of the whole catalogue: the handle of the collection, for example "best-sellers". Leave empty for all products.

## `maxProducts` (type: `integer`):

The run stops when it has returned this many products. There is no "unlimited": the largest value is 100,000.

## Actor input object example

```json
{
  "shopUrl": "https://www.allbirds.com",
  "maxProducts": 1000
}
```

# Actor output Schema

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

One item per product: title, vendor, type, tags, page address, images and variants with prices, SKUs and availability.

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

How the run ended: products pushed, pages and requests read, why it stopped.

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

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

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

```

## MCP server setup

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