# Shopify Products Scraper (`magnesia/shopify-products-scraper`) Actor

Scrape product catalogs from Shopify stores via the public /products.json endpoint. Fast HTTP-only extraction — titles, prices, variants, images, and more.

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

## Pricing

from $2.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

**Magnesia LLC** · Apify Store Actor

Scrape **product catalogs** from any public Shopify store using the official `/products.json` endpoint. Fast, HTTP-only (no browser), one clean dataset row per product.

### Use cases

- Competitor price & assortment monitoring
- Catalog enrichment for marketplaces / PIM
- Dropshipping research and product discovery
- Building product datasets for analytics or AI agents

### What you get

| Field | Description |
| --- | --- |
| `store` | Store origin (e.g. `https://www.allbirds.com`) |
| `id` | Shopify product ID |
| `title` / `handle` / `vendor` / `product_type` | Product identity |
| `tags` | Product tags |
| `priceMin` / `priceMax` | Min/max variant prices |
| `compareAtMin` / `compareAtMax` | Compare-at (MSRP) range |
| `available` | `true` if any variant is available |
| `variants` | Optional full variant list (SKU, options, prices) |
| `images` | Image URLs |
| `url` | Canonical product URL |
| `created_at` / `updated_at` | Shopify timestamps |

### How it works

1. Normalizes each store URL to its origin.
2. Pages `/products.json?limit=250&page=N` until `maxProductsPerStore` or the last page.
3. Maps each product to a flat dataset row and charges `product-scraped`.
4. Non-Shopify sites (HTML / 404 / missing `products[]`) are **logged and skipped**.

### Input

```json
{
  "startUrls": ["https://www.allbirds.com"],
  "maxProductsPerStore": 100,
  "includeVariants": true
}
```

### Pricing (PPE)

Pay-per-event. **Platform usage (compute, storage) is included** — you only pay the event prices below, with no separate Apify usage charges.

| Event | What it bills | Price |
| --- | --- | --- |
| `apify-actor-start` | Actor start (one event per GB of memory, min. 1; default 512 MB = 1 event) | **$0.0005** |
| `product-scraped` | Each product pushed to the dataset | **$0.002** |

**Max cost per run** is respected exactly: the Actor stops gracefully when your limit is reached, so every delivered product is a charged product.

### Why this Actor

- **HTTP-only** — no Playwright, cheap on Free plan
- **Graceful skips** for non-Shopify URLs
- Optional full **variants** payload
- Clear schemas and live PPE pricing

### Legal / ToS

Only scrapes the **public** Shopify JSON catalog. Respect each store’s terms, robots.txt, and applicable law. Do not overload stores — keep `maxProductsPerStore` reasonable.

### Support

Built by **Magnesia LLC** (Wyoming, US). Issues and feature requests welcome on the Actor page.

# Actor input Schema

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

List of Shopify store base URLs (e.g. https://www.allbirds.com or https://shop.example.com).

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

Maximum number of products to scrape per store (paginated via /products.json).

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

Include full variant details (SKU, options, inventory) for each product.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.allbirds.com"
  ],
  "maxProductsPerStore": 100,
  "includeVariants": true
}
```

# Actor output Schema

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

Dataset of scraped Shopify products (one item per product).

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

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

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

```

## MCP server setup

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