# Shopify Store Scraper (`santamaria-automations/shopify-store-scraper`) Actor

Scrape every product from any Shopify store: titles, prices, compare-at prices, variants, images, vendor, product type, tags and stock. Paste store URLs and get clean JSON, CSV or Excel. $0.001 per product plus $0.005 per run start.

- **URL**: https://apify.com/santamaria-automations/shopify-store-scraper.md
- **Developed by:** [NanoScrape](https://apify.com/santamaria-automations) (community)
- **Categories:** E-commerce, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 Scraper

Get the product catalog of any [Shopify](https://www.shopify.com) store as a clean table: names, prices, discounts, variants, images and store details. The actor reads the public `/products.json` endpoint that Shopify stores expose. Returns product details, descriptions, prices, discount info, variant data, images, and store metadata. No login required. Pay-per-result.

### Features

- **Any Shopify store**: works with myshopify.com subdomains and custom domains
- **Complete product data**: title, description, vendor, type, tags, all images, options, price range, discount detection
- **Variant details**: optional full variant data with SKU, individual prices, option values, and weight
- **Store metadata**: name, domain, myshopify domain, description, currency, country, city and published product count from the public `/meta.json`
- **Automatic pagination**: fetches all pages up to your limit (250 per page)
- **Automatic fallback**: tries `/collections/all/products.json` if `/products.json` is blocked
- **Clear errors**: a site that is not a Shopify store, or blocks access, is reported in the run status message
- **Deduplication**: no duplicate product IDs per store

### Use with AI Agents (MCP)

Connect this actor to any MCP-compatible AI client: Claude Desktop, Claude.ai, Cursor, VS Code, LangChain, LlamaIndex, or custom agents.

**Apify MCP server URL:**

```
https://mcp.apify.com?tools=santamaria-automations/shopify-store-scraper
```

**Example prompt once connected:**

> "Use `shopify-store-scraper` to extract all products from allbirds.com and kith.com. Return a table with product name, vendor, price range, and availability."

Clients that support dynamic tool discovery (Claude.ai, VS Code) will receive the full input schema automatically via `add-actor`.

### Output Data

Each record represents one product, with store metadata embedded:

#### Product Fields

| Field | Type | Description |
|-------|------|-------------|
| `product_id` | string | Shopify product ID |
| `product_title` | string | Product title |
| `product_handle` | string | URL slug |
| `product_type` | string|null | Merchant-assigned product type |
| `description` | string|null | Product description (HTML stripped to plain text) |
| `vendor` | string|null | Brand or vendor name |
| `tags` | array | Merchant-assigned tags |
| `min_price` | number|null | Lowest variant price |
| `max_price` | number|null | Highest variant price |
| `compare_at_price_min` | number|null | Lowest original/compare-at price (indicates discount) |
| `compare_at_price_max` | number|null | Highest original/compare-at price |
| `currency` | string|null | Store default currency |
| `available` | boolean | True if any variant is purchasable |
| `variant_count` | integer | Number of variants (sizes, colors, etc.) |
| `image_url` | string|null | Primary product image URL |
| `image_urls` | array | All product image URLs |
| `options` | array | Product options with values (e.g. `{name: "Size", values: ["S","M","L"]}`) |
| `variants` | array|null | Full variant details (only when `includeVariants` is enabled) |
| `product_url` | string | Direct link to the product page |
| `product_created_at` | string|null | ISO 8601 creation timestamp |
| `product_updated_at` | string|null | ISO 8601 last-updated timestamp |
| `product_published_at` | string|null | ISO 8601 publish timestamp |

#### Variant Fields (when `includeVariants: true`)

Each variant in the `variants` array contains:

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Variant ID |
| `title` | string | Variant title (e.g. "M / Black") |
| `sku` | string | Stock Keeping Unit code |
| `price` | number | Variant price |
| `compare_at_price` | number|null | Original price before discount |
| `available` | boolean | Whether this variant is in stock |
| `option1` | string|null | First option value (e.g. "Medium") |
| `option2` | string|null | Second option value (e.g. "Black") |
| `option3` | string|null | Third option value |
| `grams` | integer | Weight in grams |

#### Store Fields (embedded per product)

| Field | Type | Description |
|-------|------|-------------|
| `store_url` | string | Store URL as provided in input |
| `store_name` | string|null | Store display name |
| `store_domain` | string|null | Primary domain |
| `store_myshopify_domain` | string|null | myshopify.com subdomain |
| `store_description` | string|null | Store description |
| `store_currency` | string|null | Default currency code |
| `store_country` | string|null | Country code |
| `store_city` | string|null | Store city |
| `store_province` | string|null | Store state or province |
| `store_published_products_count` | integer|null | Number of published products the store reports |
| `scraped_at` | string | ISO 8601 scrape timestamp |

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `storeUrls` | array | `https://allbirds.com` (demo) | List of Shopify store URLs to scrape. Empty input scrapes the demo store allbirds.com, limited to 10 products |
| `maxProductsPerStore` | integer | 250 | Maximum products per store (1-10,000). Ignored in the empty-input demo, which returns 10 products |
| `includeVariants` | boolean | false | Include full variant details (SKU, prices, options, weight) per product |

### Input Examples

#### Scrape a single store

```json
{
  "storeUrls": ["https://allbirds.com"],
  "maxProductsPerStore": 500
}
```

#### Scrape multiple stores with variant details

```json
{
  "storeUrls": [
    "https://www.allbirds.com",
    "https://kith.com"
  ],
  "maxProductsPerStore": 250,
  "includeVariants": true
}
```

#### Scrape with myshopify.com domains

```json
{
  "storeUrls": ["https://weareallbirds.myshopify.com"],
  "maxProductsPerStore": 100
}
```

### Pricing

Pay per result. You are charged only for products that were saved to the dataset; a run with no results costs nothing.

| Event | Price |
|-------|-------|
| `actor-start` (once per run, charged with the first saved product) | $0.005 |
| `shopify-product-result` (per product saved) | $0.001 |

If you set a maximum total charge for the run, the actor stops saving products before the next charge would exceed it.

### Notes

- **Fallback endpoint**: If `/products.json` is blocked, the actor automatically tries `/collections/all/products.json` as a fallback.
- **Pagination**: Shopify returns up to 250 products per page. The actor paginates automatically using the legacy `?page=N` parameter, which works on all Shopify stores.
- **Custom domains**: The actor follows HTTP redirects, so custom domains pointing to Shopify backends are fully supported.
- **Public endpoint only**: `/products.json` and `/meta.json` are public Shopify endpoints. Some shops (for example headless storefronts) block them with HTTP 403 or 404; those stores are reported as skipped and the actor does not try to work around the block.
- **Store email and phone**: not available from the public endpoints. Use a website contact extractor on the store domain for contact details.
- **Discount detection**: Compare `min_price` with `compare_at_price_min` to identify products on sale.

### Issues & Feature Requests

If something is not working or you're missing a field, please [open an issue](https://console.apify.com/actors/shopify-store-scraper/issues).

# Actor input Schema

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

One or more Shopify store URLs (custom domain or myshopify.com), e.g. https://www.allbirds.com. The public /products.json endpoint must be reachable. If left empty, the actor scrapes the demo store allbirds.com.

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

Maximum number of products to scrape per store. Shopify returns up to 250 products per page; the actor paginates automatically. Default 250.

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

Include full variant details (SKU, individual prices, options, weight) per product. Increases output size but provides granular inventory data.

## Actor input object example

```json
{
  "storeUrls": [
    "https://www.allbirds.com"
  ],
  "maxProductsPerStore": 30,
  "includeVariants": false
}
```

# Actor output Schema

## `defaultDataset` (type: `string`):

Dataset containing scraped product records

# 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.allbirds.com"
    ],
    "maxProductsPerStore": 30,
    "includeVariants": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("santamaria-automations/shopify-store-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 = {
    "storeUrls": ["https://www.allbirds.com"],
    "maxProductsPerStore": 30,
    "includeVariants": False,
}

# Run the Actor and wait for it to finish
run = client.actor("santamaria-automations/shopify-store-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 '{
  "storeUrls": [
    "https://www.allbirds.com"
  ],
  "maxProductsPerStore": 30,
  "includeVariants": false
}' |
apify call santamaria-automations/shopify-store-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,santamaria-automations/shopify-store-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/iC8H00PhMkSCFs7dG/builds/qV5OB6l8z2pO8ZjNw/openapi.json
