# Cotton On Product Scraper (`dromb/cottonon-product-scraper`) Actor

Extract products, categories, and item details from Cotton On AU storefront. Supports search, category browsing, and product detail extraction.

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

## Pricing

from $0.30 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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

## Cotton On Product Scraper

The **Cotton On Product Scraper** is a powerful tool designed to extract comprehensive product data from the Cotton On AU storefront. It enables businesses and researchers to perform market analysis, monitor pricing, and track product availability in real-time.

### 🚀 Use Cases

- **Price Monitoring**: Track price changes and discounts for specific products or categories.
- **Product Research**: Analyze product assortments and trends in the apparel and lifestyle market.
- **Market Research**: Compare Cotton On's offerings with competitors.
- **Availability Tracking**: Monitor stock levels and availability of specific sizes or colors.
- **Offer Discovery**: Identify current promotions and sales across the store.

### 🛠 Supported Operations

The scraper provides several operations to navigate and extract data from the site:

#### 1. Search Products (`search`)

Search for products using a keyword.

- **Input**: `query` (required), `page`, `limit`, `sort`, `filter`.
- **Example**: `query: "t-shirt"`, `sort: "price_asc"`.

#### 2. Category Products (`category`)

Extract products from a specific category URL or slug.

- **Input**: `url` (required), `page`, `limit`, `sort`, `filter`.
- **Example**: `url: "/co/women/womens-clothing/womens-tops/"`.

#### 3. Item Details (`item`)

Fetch detailed information for a single product using its code, slug, or full URL.

- **Input**: `slug` (required).
- **Example**: `slug: "7348434-01"`.

#### 4. List Categories (`categories`)

Retrieve the category tree structure parsed from the store's sitemap.

- **Input**: `parent_id`, `level`, `limit`, `refresh`.

#### 5. Get Search Filters (`search_filters`)

Retrieve available filter options (e.g., color, size, price range) and sorting rules for a specific search term or category.

- **Input**: `query` or `category_url`.

#### 6. Probe (`probe`)

Perform a lightweight availability check to ensure the storefront is accessible.

### 📊 Output Fields

The scraper returns normalized data. Key fields include:

- `id`: Unique product identifier.
- `name`: Full product name.
- `brand`: Brand name.
- `source_url`: Full URL to the product page.
- `price`: Current selling price.
- `discount_price`: Original price before discount.
- `currency`: Currency code (e.g., AUD).
- `barcode`: Primary EAN/UPC.
- `image`: Main product image URL.
- `description`: Detailed product description.
- `specifications`: Product features and specifications.
- `in_stock`: Boolean indicating if the product is available.
- `options`: Available colors and sizes.

### 🛡 Proxy & Bot Protection

- **Recommended Mode**: `direct` is typically sufficient for low-volume requests.
- **High Volume**: For large-scale scraping, use `apify` proxies to avoid rate limits and IP blocks.
- **Behavior**: The scraper implements automatic retries and fallback mechanisms to handle transient errors and blocks.

### ⚠️ Disclaimer

This scraper is an **unofficial** implementation and is **not affiliated** with, authorized by, or endorsed by Cotton On. All trademarks and copyrights belong to their respective owners. Use this tool in compliance with the website's terms of service.

### ⚙️ Configuration

- **Default Input**: Set to `search` operation with a small limit for fast testing.
- **Monetization**: This actor is configured with a pay-per-event model (per start and per result item).

# Actor input Schema

## `operation` (type: `string`):

The scraping operation to perform

## `query` (type: `string`):

Keyword to search for products (used in 'search' and 'search\_filters' operations)

## `url` (type: `string`):

URL or slug for the category (used in 'category' operation)

## `slug` (type: `string`):

Product code, slug, or full URL (used in 'item' operation)

## `page` (type: `integer`):

1-based page number for pagination

## `limit` (type: `integer`):

Items per page (max 60)

## `sort` (type: `string`):

Sorting rule: relevance, new\_in, most\_popular, price\_asc, price\_desc

## `filter` (type: `array`):

List of filter pairs in 'field:value' format (e.g. \['colour:black', 'size:m'])

## `parent_id` (type: `string`):

Filter categories by parent ID (used in 'categories' operation)

## `level` (type: `integer`):

Filter categories by depth level (used in 'categories' operation)

## `refresh` (type: `boolean`):

Force refresh of category/product index from sitemaps

## `includeRaw` (type: `boolean`):

Include the original source response in the output summary

## Actor input object example

```json
{
  "operation": "search",
  "query": "t-shirt",
  "url": "/co/women/womens-clothing/womens-tops/",
  "slug": "7348434-01",
  "page": 1,
  "limit": 20,
  "sort": "relevance",
  "refresh": false,
  "includeRaw": false
}
```

# Actor output Schema

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

Normalized dataset items returned by the actor.

## `summary` (type: `string`):

Run summary JSON stored under the OUTPUT key.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("dromb/cottonon-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("dromb/cottonon-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 '{}' |
apify call dromb/cottonon-product-scraper --silent --output-dataset

```

## MCP server setup

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