# Shopify API Scraper (`rl1987/shopify-api-scraper`) Actor

API scraper to get product data from almost any Shopify store!

- **URL**: https://apify.com/rl1987/shopify-api-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:** E-commerce
- **Stats:** 18 total users, 1 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 variants

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/platform/actors/running/actors-in-store#pay-per-event

## 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 API Scraper

Most eCommerce stores based on Shopify platform expose RESTful API to get
product data, e.g.:

- https://www.allbirds.com/products.json
- https://www.allbirds.com/collections/mens/products.json
- https://pelacase.ca/products.json
- https://pelacase.myshopify.com/products.json

Note, however, that in some cases this trick won't work with primary store
domain. In that case one should inspect web site source with View Source
feature of Chrome browser and look for `*.myshopify.com` subdomain being
referenced in JavaScript code, e.g.:

```javascript
Shopify.shop = "pelacase.myshopify.com";
```

#### Input example

```json
{
  "start_urls": [
    {
      "url": "https://allbirds.com/products.json"
    }
  ]
}
```

#### Output example

This scraper outputs one row per product variant, e.g.:

```json
{
  "product_id": 4826199687248,
  "title": "Women's Wool Runner - True Black (Cream Sole)",
  "description": "The Allbirds Wool Runner is the orginal wool sneaker that started it all. Called the world's most comfortable shoe, it's flexible, supportive, astonishingly soft, and machine washable. The Wool Runner is breathable, lightweight, and can be worn sockless. Best used for walking, cooler weather, and everyday casual wear.",
  "handle": "womens-wool-runners-true-black",
  "web_url": "https://allbirds.com/products/womens-wool-runners-true-black",
  "vendor": "Allbirds",
  "product_type": "Shoes",
  "tags": [
    "allbirds::carbon-score => 7.07",
    "allbirds::cfId => color-womens-wool-runners-true-black-cream",
    "allbirds::complete => true",
    "allbirds::edition => classic",
    "allbirds::gender => womens",
    "allbirds::hue => black",
    "allbirds::master => womens-wool-runners",
    "allbirds::material => wool",
    "allbirds::price-tier => msrp",
    "allbirds::silhouette => runner",
    "allbirdskit::kit-discount-2c1bmbSUmqIAxb6DrSxejL => 9",
    "allbirdskit::kit-id => 2c1bmbSUmqIAxb6DrSxejL",
    "allbirdskit::kit-size-2c1bmbSUmqIAxb6DrSxejL => 2",
    "loop::returnable => true",
    "shoprunner",
    "YCRF_womens-move-shoes",
    "YGroup_ygroup_womens-wool-runners"
  ],
  "images": [
    "https://cdn.shopify.com/s/files/1/1104/4168/files/WR3MTBK_SHOE_LEFT_GLOBAL_MENS_WOOL_RUNNER_TRUE_BLACK_CREAM.png?v=1751144315",
    "https://cdn.shopify.com/s/files/1/1104/4168/files/WR3MTBK_SHOE_BACK_GLOBAL_MENS_WOOL_RUNNER_TRUE_BLACK_CREAM.png?v=1751144315",
    "https://cdn.shopify.com/s/files/1/1104/4168/files/WR3MTBK_SHOE_TOP_GLOBAL_MENS_WOOL_RUNNER_TRUE_BLACK_CREAM.png?v=1751144315",
    "https://cdn.shopify.com/s/files/1/1104/4168/files/WR3MTBK_SHOE_BOTTOM_GLOBAL_MENS_WOOL_RUNNER_TRUE_BLACK_CREAM.png?v=1751144315"
  ],
  "featured_image": null,
  "variant_id": 32956153069648,
  "variant_title": "9",
  "option1": "9",
  "option2": null,
  "option3": null,
  "variant_sku": "WR3WTBK090",
  "variant_available": true,
  "price": "100.00",
  "compare_at_price": null
}
```

#### Notes

- Some of the heavily customised Shopify stores (e.g. Supreme) do not expose
  the API this scraper relies on.
- It is recommended to disable timeout for larger scraping jobs that span
  across multiple stores or cover large amount of products.

# Actor input Schema

## `start_urls` (type: `array`):

URLs to start with

## Actor input object example

```json
{
  "start_urls": [
    {
      "url": "https://blvck.com/products.json"
    }
  ]
}
```

# 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 = {
    "start_urls": [
        {
            "url": "https://blvck.com/products.json"
        }
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("rl1987/shopify-api-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "start_urls": [
    {
      "url": "https://blvck.com/products.json"
    }
  ]
}' |
apify call rl1987/shopify-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=rl1987/shopify-api-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/7DjHCwC6CvWmhd3X0/builds/LtYemduzbukF3Opwm/openapi.json
