# Shopify Product Scraper - Products, Collections & Entire Stores (`novus/shopify-scraper`) Actor

An advanced Shopify data extraction tool built for professionals. Simply enter any store, collection, or product URL — the scraper automatically detects Shopify stores, fetches structured product data via the Shopify JSON API, and handles pagination for large catalogs.

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

## Pricing

$10.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Shopify Scraper

A professional-grade Shopify store scraper that extracts comprehensive product data from any Shopify-based e-commerce site. Supports full store crawling, collection scraping, individual product extraction, and search functionality.

### Why Use This Scraper?

- **Market Research**: Analyze competitor pricing, product descriptions, and variants
- **Trend Monitoring**: Track new product launches and stock status changes
- **Data Aggregation**: Build comprehensive catalogs from multiple Shopify stores
- **Marketing Insights**: Understand how brands structure their product metadata and categories

### Key Features

🚀 **Store-Wide Crawling** — Automatically discovers and extracts all products from an entire store

🎯 **Precision Targeting** — Scrape specific collections or individual product URLs

🔍 **Search Support** — Search for products within a store using keywords

💱 **Price Normalization** — Prices stored as integers (cents) to avoid floating-point errors

📦 **Comprehensive Data** — Extracts titles, descriptions, variants, images, options, SKUs, barcodes, and stock status

🛡️ **Anti-Bot Resilience** — Built-in rate limiting, retry logic, and proxy rotation

🔄 **Auto-Detection** — Automatically verifies if a site is Shopify-powered

⚡ **Fast & Reliable** — Optimized extraction with automatic fallback mechanisms

### How It Works

1. **Automatic Shopify Detection** — The scraper automatically verifies each URL is a Shopify store
2. **Smart URL Classification** — Detects if URL is a store root, collection, product, or search page
3. **Data Extraction** — Extracts comprehensive product data with automatic pagination
4. **Deduplication** — Automatically removes duplicate products across collections

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `startUrls` | Array | ✅ | - | List of Shopify URLs (store, collection, or product) |
| `maxProducts` | Integer | No | 0 | Max products to scrape (0 = unlimited) |
| `searchQuery` | String | No | - | Search term for finding specific products |
| `includeOutOfStock` | Boolean | No | true | Include out-of-stock products |
| `currency` | String | No | Auto | Currency code (USD, EUR, GBP, etc.) |
| `proxy` | Object | No | Apify Proxy | Proxy configuration |
| `useHeadlessFallback` | Boolean | No | true | Enable fallback extraction method |
| `requestTimeout` | Integer | No | 30000 | Request timeout in milliseconds |
| `retryCount` | Integer | No | 3 | Number of retry attempts |

### Input Examples

#### Scrape Entire Store

```json
{
    "startUrls": [
        { "url": "https://www.allbirds.com/" }
    ],
    "proxy": {
        "useApifyProxy": true
    }
}
```

#### Scrape Specific Collection

```json
{
    "startUrls": [
        { "url": "https://www.allbirds.com/collections/mens-shoes" }
    ],
    "maxProducts": 100
}
```

#### Scrape Single Product

```json
{
    "startUrls": [
        { "url": "https://www.allbirds.com/products/mens-wool-runners" }
    ]
}
```

#### Search Within Store

```json
{
    "startUrls": [
        { "url": "https://www.allbirds.com/" }
    ],
    "searchQuery": "wool runners",
    "maxProducts": 20
}
```

#### Multiple URLs

```json
{
    "startUrls": [
        { "url": "https://www.allbirds.com/collections/mens" },
        { "url": "https://www.allbirds.com/collections/womens" }
    ],
    "maxProducts": 50
}
```

### Output Schema

Each product includes:

```json
{
    "source": {
        "id": "7654321098765",
        "handle": "mens-wool-runners",
        "url": "https://www.allbirds.com/products/mens-wool-runners",
        "retailer": "www.allbirds.com",
        "scrapedAt": "2025-12-13T10:30:00Z"
    },
    "title": "Men's Wool Runners",
    "description": "Our original wool shoe...",
    "descriptionHtml": "<p>Our original wool shoe...</p>",
    "vendor": "Allbirds",
    "productType": "Shoes",
    "tags": ["mens", "shoes", "wool"],
    "createdAt": "2025-01-15T00:00:00Z",
    "updatedAt": "2025-12-10T00:00:00Z",
    "publishedAt": "2025-01-15T08:00:00Z",
    "variants": [
        {
            "id": "42345678901234",
            "title": "8 / Natural Grey",
            "sku": "WR-M-NG-8",
            "barcode": "1234567890123",
            "price": 11000,
            "compareAtPrice": null,
            "currency": "USD",
            "available": true,
            "inventoryQuantity": null,
            "requiresShipping": true,
            "weight": 0.5,
            "weightUnit": "kg",
            "option1": "8",
            "option2": "Natural Grey",
            "option3": null
        }
    ],
    "images": [
        {
            "id": "12345678901234",
            "url": "https://cdn.shopify.com/s/files/...",
            "alt": "Men's Wool Runners",
            "width": 1200,
            "height": 1500,
            "position": 1
        }
    ],
    "options": [
        { "name": "Size", "position": 1, "values": ["7", "8", "9", "10", "11", "12"] },
        { "name": "Color", "position": 2, "values": ["Natural Grey", "Black", "Navy"] }
    ]
}
```

### Extracted Data Fields

| Product Fields | Variant Fields | Media & Options |
|---------------|----------------|-----------------|
| Title | SKU | All Images |
| Description (text & HTML) | Barcode | Image Dimensions |
| Vendor/Brand | Price (in cents) | Alt Text |
| Product Type | Compare-at Price | Options (Size, Color) |
| Tags | Availability | Option Values |
| Created/Updated Dates | Inventory Quantity | Positions |
| URL & Handle | Weight & Unit | |
| Retailer | Shipping Required | |

### URL Types Supported

| URL Pattern | Type | Example |
|-------------|------|---------|
| `domain.com` | Full Store | `https://www.allbirds.com` |
| `/collections/{handle}` | Collection | `https://www.allbirds.com/collections/mens` |
| `/products/{handle}` | Single Product | `https://www.allbirds.com/products/wool-runners` |
| `/search?q={query}` | Search Results | `https://www.allbirds.com/search?q=wool` |

### Troubleshooting

| Issue | Possible Cause | Solution |
|-------|---------------|----------|
| 0 Results | Site is not Shopify-based | Check logs - scraper auto-detects and warns |
| 403 / Access Denied | IP flagged | Enable `useApifyProxy` with residential proxies |
| Incorrect Prices | Integer format | Divide by 100 (e.g., 2995 → $29.95) |
| Missing Products | Rate limiting | Increase `retryCount`, use proxies |

### Important Notes

- **Price Format**: All prices are integers in cents (e.g., 2995 = $29.95)
- **Variants**: Each product contains all variants in the `variants` array
- **Deduplication**: Products are automatically deduplicated by ID
- **Pagination**: Handles pagination automatically across large catalogs

### Cost Estimation

- **Speed**: Typically 500-2,000 products per minute
- **Compute Units**: ~0.1-0.2 CUs per 1,000 products
- **Proxy**: Residential proxies recommended for best results

*Actual costs vary based on store size and anti-bot measures.*

# Actor input Schema

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

List of Shopify URLs to scrape. Can be store root URLs, collection URLs, product URLs, or search URLs.

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

Maximum number of products to scrape. Set to 0 for unlimited.

## `searchQuery` (type: `string`):

Search query for product search. Only used when scraping search URLs or when you want to search within a store.

## `includeOutOfStock` (type: `boolean`):

Whether to include out-of-stock products in the results.

## `currency` (type: `string`):

Currency code for prices (e.g., USD, EUR, GBP). If not specified, uses the store's default currency.

## `proxy` (type: `object`):

Proxy settings for the scraper. Residential proxies are recommended for best results.

## `useHeadlessFallback` (type: `boolean`):

Enable fallback extraction method when primary method is blocked.

## `requestTimeout` (type: `integer`):

Timeout for HTTP requests in milliseconds.

## `retryCount` (type: `integer`):

Number of times to retry failed requests.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.allbirds.com/"
    }
  ],
  "maxProducts": 0,
  "includeOutOfStock": true,
  "currency": "",
  "proxy": {
    "useApifyProxy": true
  },
  "useHeadlessFallback": true,
  "requestTimeout": 30000,
  "retryCount": 3
}
```

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

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

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

```

## MCP server setup

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