# Shopify Collections Scraper (`kawsar/shopify-collections-scraper`) Actor

Scrape Shopify store collections and products effortlessly. Extract titles, handles, product counts, and catalog data from any store URL, then export clean results instantly in JSON, CSV, or Excel formats for your ecommerce analysis.

- **URL**: https://apify.com/kawsar/shopify-collections-scraper.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 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 Store Scraper

![Shopify Collections Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/shopify-collections-scraper-cover.png)

Scrape Shopify store collections and products effortlessly with kawsar. Extract titles, handles, product counts, and comprehensive catalog data from any store URL, then export clean results instantly in JSON, CSV, or Excel formats for your ecommerce analysis.

### Overview

This tool provides a streamlined way to extract product catalogs, collections, and inventory details from any public Shopify storefront. Whether you are conducting market research, monitoring competitor pricing, or migrating store data, this scraper delivers structured, ready-to-analyze datasets without technical friction.

### Features

- **Comprehensive Catalog Extraction**: Pull detailed collection lists, product titles, variant options, handles, and inventory counts.
- **Flexible Export Formats**: Instantly download or export your extracted data in clean JSON, CSV, or Excel formats.
- **High-Speed Performance**: Optimized pagination and concurrent request handling for fast catalog scraping.
- **Structured Data Output**: Every record is cleanly formatted with consistent schemas ready for database insertion or BI tools.

### Input Configuration

The scraper accepts simple, intuitive parameters to target the exact store categories or product ranges you need:

- **Store URL**: The base web address of the target Shopify storefront.
- **Extraction Scope**: Choose whether to extract products, collections, or both simultaneously.
- **Max Items Limit**: Set custom caps on the number of records to retrieve during a single run.

### Input example

```json
{
  "mode": "collections",
  "storeUrls": ["https://www.allbirds.com"],
  "maxItems": 50,
  "requestDelaySecs": 1
}
```

For products of a collection:

```json
{
  "mode": "collection_products",
  "storeUrls": ["https://www.allbirds.com"],
  "collectionHandles": ["mens"],
  "maxItems": 50
}
```

### Output Data Structure

The extracted dataset delivers structured attributes for every item:

```json
{
  "title": "Classic Leather Sneaker",
  "handle": "classic-leather-sneaker",
  "product_type": "Footwear",
  "vendor": "BrandName",
  "product_count": 12,
  "status": "active",
  "variants": [
    {
      "title": "US 9 / Black",
      "price": "89.99",
      "sku": "CLS-BLK-09"
    }
  ]
}

```

### Frequently Asked Questions (FAQ)

#### Can I scrape multiple Shopify stores in a single run?

Yes, you can provide a list of target store URLs to process multiple storefronts sequentially or in parallel depending on your workflow setup.

#### What formats are available for downloading results?

You can export your extracted data in JSON, CSV, and Excel formats, making it effortless to open in spreadsheet software or feed directly into custom data pipelines.

#### How are rate limits and pagination handled?

The scraper automatically manages store pagination and implements polite request throttling to ensure smooth extraction without triggering server blocks.

***

### Is web scraping legal?

This actor extracts publicly accessible data without bypassing paywalls, or technical security layers. While collecting public web data is widely permitted, compliance depends on how data is gathered and used:

- **Personal data**: When collecting identifiers like emails, phone numbers, or social handles, ensure compliance with applicable data protection laws such as GDPR or CCPA.
- **Copyrighted content**: Public text, images, and visual assets are often protected by intellectual property rights. Avoid directly duplicating or re-distributing full creative works.
- **Platform terms & rate limits**: Practice responsible data extraction by avoiding aggressive traffic spikes, adhering to rate limits, and respecting published platform policies.
- **Disclaimer**: This summary serves informational purposes only and does not constitute formal legal counsel. Seek professional legal advice for specific compliance queries.

For a detailed guide, see Apify's legal overview: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

## `mode` (type: `string`):

What to scrape.

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

Shopify store base URLs (for example https://www.allbirds.com).

## `collectionHandles` (type: `array`):

Collection handles used when mode is Products of a collection.

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

Stop after this many successful rows. Hard max is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between requests.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

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

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "collections",
  "storeUrls": [
    "https://www.allbirds.com"
  ],
  "collectionHandles": [
    "mens"
  ],
  "maxItems": 100,
  "requestDelaySecs": 1,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

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

Full dataset for this run.

## `items` (type: `string`):

Dataset items as 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 = {
    "storeUrls": [
        "https://www.allbirds.com"
    ],
    "collectionHandles": [
        "mens"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/shopify-collections-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"],
    "collectionHandles": ["mens"],
}

# Run the Actor and wait for it to finish
run = client.actor("kawsar/shopify-collections-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"
  ],
  "collectionHandles": [
    "mens"
  ]
}' |
apify call kawsar/shopify-collections-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kawsar/shopify-collections-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/5tEWjpFhlCsfDLjTJ/builds/79W0Rxr2Hig9dtFhs/openapi.json
