# Shopify Products, Inventory & Barcodes Scraper (`hoanle0126/shopify-store-product-scraper`) Actor

Scrape any public Shopify store for products, exact variant inventory counts, barcodes/GTINs, SKUs, prices, compare-at discounts, images, options, selling plans, and store metadata. Supports full store domains, collection URLs, and product filters with zero API keys.

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

## Pricing

$2.00 / 1,000 dataset items

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, Inventory & Barcodes Scraper

Extract complete product catalogues, **exact variant inventory quantities**, **barcodes / GTINs / UPCs**, **SKUs**, pricing, compare-at discounts, subscription selling plans, and store intelligence metadata from any public Shopify store — with **zero API keys** and **zero proxies required** for standard stores.

***

### Key Features

- **Full Store, Collection, or Single Product Scraping**:
  - Pass bare domains (`deathwishcoffee.com`), full store URLs (`https://colourpop.com`), collection URLs (`https://www.deathwishcoffee.com/collections/coffee`), or individual product URLs (`https://www.deathwishcoffee.com/products/death-wish-coffee`).
- **Exact Variant Inventory & Barcode/GTIN Enrichment (`.js` Deep Details)**:
  - Automatically queries Shopify's storefront `.js` endpoint per product to enrich every variant with `inventoryQuantity` (when exposed by the store), `barcode` (UPC/EAN/GTIN), `inventoryManagement`, `inventoryPolicy` (`deny` vs `continue` backorder), `quantityRule`, and subscription `sellingPlanGroups`.
- **Store Intelligence Metadata**:
  - Enriches every row with store-level metadata from `/meta.json` and `/cart.js`: `storeName`, `myshopifyDomain`, `currency`, `storeCountry`, `publishedProductsCount`, and `offersShopPayInstallments`.
- **Smart Pre-Save Filtering (Only Pay for Matching Products)**:
  - Filter by `inStockOnly`, `onSaleOnly` (discounted products), `vendorFilter`, `productTypeFilter`, or `searchKeyword` (matches title, description, tags, SKU, or barcode) before writing to the dataset.

***

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `domains` | `string[]` | `["https://www.deathwishcoffee.com"]` | One or more Shopify store domains, collection URLs, or product URLs. |
| `maxProducts` | `integer` | `50` | Maximum products to return per domain/URL (`0` = unlimited full catalogue). |
| `includeInventoryDetails` | `boolean` | `true` | Fetch `/products/{handle}.js` for exact variant inventory counts, barcodes, and selling plans. |
| `inStockOnly` | `boolean` | `false` | Only output products with at least one in-stock variant. |
| `onSaleOnly` | `boolean` | `false` | Only output discounted products (`compareAtPrice > price`). |
| `searchKeyword` | `string` | `""` | Filter products by keyword across title, description, tags, SKUs, and barcodes. |
| `vendorFilter` | `string` | `""` | Filter products by vendor / brand name. |
| `productTypeFilter` | `string` | `""` | Filter products by Shopify `product_type`. |

***

### Output Example

```json
{
  "productId": 7284910293143,
  "title": "Death Wish Stir Stick Set",
  "handle": "death-wish-stir-stick-set",
  "url": "https://www.deathwishcoffee.com/products/death-wish-stir-stick-set",
  "storeDomain": "deathwishcoffee.com",
  "storeName": "Death Wish Coffee",
  "myshopifyDomain": "deathwishcoffee.myshopify.com",
  "storeCountry": "US",
  "collectionHandle": null,
  "vendor": "Death Wish Coffee",
  "productType": "Merchandise",
  "currency": "USD",
  "priceMin": 8,
  "priceMax": 8,
  "compareAtPriceMin": null,
  "compareAtPriceMax": null,
  "discountPercentage": 0,
  "onSale": false,
  "available": true,
  "inventoryCount": 100,
  "variantCount": 1,
  "availableVariantsCount": 1,
  "skus": ["USTIRDW26"],
  "barcodes": [],
  "hasSubscription": false,
  "featuredImage": "https://cdn.shopify.com/s/files/...",
  "tags": ["merch", "accessories"],
  "variants": [
    {
      "id": 42351252209719,
      "title": "Default Title",
      "sku": "USTIRDW26",
      "barcode": null,
      "available": true,
      "price": 8,
      "compareAtPrice": null,
      "inventoryQuantity": 100,
      "inventoryManagement": "shopify",
      "inventoryPolicy": "deny",
      "requiresShipping": true
    }
  ]
}
```

***

### Common Use Cases

1. **Competitor Price & Stock Monitoring**: Track competitor pricing, markdown discounts (`discountPercentage`), and real-time stock levels (`inventoryCount`).
2. **Amazon / Google Shopping / Dropshipping Sourcing**: Extract `barcodes` (UPC/EAN/GTIN) and `skus` alongside variant prices to match products across marketplaces.
3. **Ecommerce Lead Generation**: Combine product catalogue size (`publishedProductsCount`), `myshopifyDomain`, and `currency` for B2B SaaS or agency outreach.

# Actor input Schema

## `domains` (type: `array`):

List of Shopify store domains, collection URLs, or product URLs to scrape. Bare domains (e.g. deathwishcoffee.com) scrape the full store catalogue; collection URLs (/collections/handle) scrape only that collection.

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

Maximum number of products to extract per input domain or URL. Set to 0 for unlimited (full catalogue).

## `includeInventoryDetails` (type: `boolean`):

When enabled, fetches each product's .js endpoint to enrich variants with exact public inventory_quantity, barcodes/GTINs, inventory_policy, quantity_rule, and subscription selling plans.

## `inStockOnly` (type: `boolean`):

Only return products that have at least one available in-stock variant.

## `onSaleOnly` (type: `boolean`):

Only return products where compareAtPrice is higher than the current price.

## `searchKeyword` (type: `string`):

Optional case-insensitive keyword to match against product title, description, tags, vendor, SKU, or barcode.

## `vendorFilter` (type: `string`):

Optional case-insensitive filter to only return products from a matching vendor/brand.

## `productTypeFilter` (type: `string`):

Optional case-insensitive filter to only return products matching a specific product_type.

## Actor input object example

```json
{
  "domains": [
    "https://www.deathwishcoffee.com"
  ],
  "maxProducts": 25,
  "includeInventoryDetails": true,
  "inStockOnly": false,
  "onSaleOnly": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {
    "domains": [
        "https://www.deathwishcoffee.com"
    ],
    "maxProducts": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("hoanle0126/shopify-store-product-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 = {
    "domains": ["https://www.deathwishcoffee.com"],
    "maxProducts": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("hoanle0126/shopify-store-product-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 '{
  "domains": [
    "https://www.deathwishcoffee.com"
  ],
  "maxProducts": 25
}' |
apify call hoanle0126/shopify-store-product-scraper --silent --output-dataset

```

## MCP server setup

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