# Shopify Products JSON Scraper - Variants, Barcode, Discounts (`martin10291/shopify-store-products`) Actor

Exports the public products JSON feed of any Shopify store or collection: prices, compare-at prices and discount %, variants with SKU, barcode (GTIN) and stock, images, tags, vendor and dates. Filter Shopify discounts, in-stock or keywords. Fast, no browser.

- **URL**: https://apify.com/martin10291/shopify-store-products.md
- **Developed by:** [Martin Petrov](https://apify.com/martin10291) (community)
- **Categories:** E-commerce, Lead generation, Integrations
- **Security:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.05 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 JSON Scraper - Variants, Barcode, Discounts

Export **every product from any Shopify store** in seconds from its public **products JSON** feed: prices, original (compare-at) prices and **discount %**, **variants with SKU, barcode and stock**, images, tags, vendor, product type and dates. Works on whole stores or a single **Shopify collection** (for example `/collections/sale`).

### Why use it

- **Any Shopify store**, no login, no API key: reads the store's public product feed
- **Sales detection**: compare-at price, discount %, `onSale` flag, and an "only discounted" filter
- **Variants**: nested in the product, or **one row per variant** with SKU, barcode (GTIN), price and stock
- **Store currency** detected automatically
- **Filters**: in-stock only, on-sale only, keywords
- Fast and cheap: up to 250 products per request, no browser

### Use cases

Competitor research, dropshipping product research, price monitoring, catalog migration and backups, affiliate and deal sites, market analysis.

### Output (one row per product)

| Field | Description |
|---|---|
| `title`, `url`, `handle`, `vendor`, `productType`, `tags` | Product |
| `price`, `maxPrice`, `compareAtPrice`, `discountPercent`, `onSale`, `currency` | Pricing |
| `available`, `variantsCount`, `variants[]` | Stock and variants (id, title, SKU, price, compare-at, available, barcode, options) |
| `image`, `images`, `description` | Media and text |
| `createdAt`, `updatedAt`, `publishedAt` | Dates |

With **oneRowPerVariant** each variant is its own row with `variantId`, `variantTitle`, `sku`, `barcode`, `price` and `available`.

### Input

- `storeUrls`: store or collection URLs
- `maxProductsPerStore`, `onlyAvailable`, `onlyOnSale`, `keywords`, `oneRowPerVariant`

### Pricing

Pay per result: one result per product (or per variant row).

### FAQ

**How do I know a store is on Shopify?** If `store.com/products.json` opens, it works. Many custom-domain stores are Shopify.
**Is stock count included?** Shopify's public feed shows in stock / sold out per variant, not exact quantities.

### Use it as an integration (chain it after another actor)

This actor can run automatically after any actor whose results contain a URL.

1. Open the source actor in Apify Console and go to the **Integrations** tab.
2. Click **Add integration** -> **Actor**, pick this actor and set **Dataset** to `{{resource.defaultDatasetId}}` (leave `storeUrls` empty). Set your other options and save.
3. When the source run finishes, this actor reads its dataset and processes every row. The field is detected automatically; set **Dataset field** if your column has another name.

You can also start it by hand with `datasetId` (pick a dataset or paste its ID) to process an existing dataset.

Good sources to chain from:

- compass/crawler-google-places (Google Maps Scraper) filtered to shops
- martin10291/website-tech-stack-detector (sites that run Shopify)

# Actor input Schema

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

Store home pages (https://www.allbirds.com) or collection pages (https://store.com/collections/sale). Any Shopify store.

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

Stop after this many products in each store.

## `oneRowPerVariant` (type: `boolean`):

Each size/color variant as its own row with SKU, barcode, price and stock (otherwise variants are nested in the product).

## `onlyAvailable` (type: `boolean`):

Skip sold-out products/variants.

## `onlyOnSale` (type: `boolean`):

Keep only products with a compare-at (original) price higher than the price.

## `keywords` (type: `array`):

Keep only products whose title, type, vendor or tags contain one of these words.

## `includeDescription` (type: `boolean`):

Plain-text product description (first 2000 characters).

## `maxItems` (type: `integer`):

Hard limit on dataset rows (and cost).

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy for stores that rate-limit servers.

## `datasetId` (type: `string`):

Optional. Pick a dataset (or paste its ID) to read the input from, for example the result of Google Maps Scraper. When this actor runs as an integration, the dataset of the triggering run is used automatically (payload.resource.defaultDatasetId), so you can leave this empty. If set, the values found in the dataset replace the main input list.

## `datasetField` (type: `string`):

Optional. The item field that holds the value, for example website, url or videoUrl (dot paths like author.url work). Empty = detected automatically.

## `datasetMaxItems` (type: `integer`):

Upper limit of unique values taken from the dataset, to keep the cost under control.

## Actor input object example

```json
{
  "storeUrls": [
    "https://www.allbirds.com",
    "https://www.gymshark.com/collections/sale"
  ],
  "maxProductsPerStore": 30,
  "oneRowPerVariant": false,
  "onlyAvailable": false,
  "onlyOnSale": false,
  "includeDescription": true,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "datasetMaxItems": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

Items extracted by the Actor.

# 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",
        "https://www.gymshark.com/collections/sale"
    ],
    "maxProductsPerStore": 30,
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("martin10291/shopify-store-products").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",
        "https://www.gymshark.com/collections/sale",
    ],
    "maxProductsPerStore": 30,
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("martin10291/shopify-store-products").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",
    "https://www.gymshark.com/collections/sale"
  ],
  "maxProductsPerStore": 30,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call martin10291/shopify-store-products --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,martin10291/shopify-store-products"
        }
    }
}
```

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/Owr0Q30ybiZOUI5jE/builds/V2i5uPPnD89tnsthT/openapi.json
