# Fashion Product Page Scraper (`flashi/fashion-pdp-scraper`) Actor

This actor extracts detailed product information from valid fashion e-commerce URLs—including product name, description, price, image urls, available sizes, and brand metadata. It verifies if a link is a genuine product page and determines real-time stock availability. Read more at www.flashi.ai

- **URL**: https://apify.com/flashi/fashion-pdp-scraper.md
- **Developed by:** [Flash Intelligence](https://apify.com/flashi) (community)
- **Categories:** E-commerce, AI, Developer tools
- **Stats:** 8 total users, 0 monthly users, 57.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.001 / result

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?

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

## 👗 Fashion Product Page Scraper

Built by [Flash Intelligence](https://www.flashi.ai)
**Extract detailed product data, real-time pricing, and stock availability from fashion e-commerce websites.**

This Actor is a specialized scraping tool designed for the fashion and apparel industry. Unlike generic scrapers, it understands the unique structure of fashion product pages. It automatically detects product details, validates if a link is a genuine product page (filtering out blogs or collections), and returns structured JSON data ready for analysis.

### ✨ Key Features

- **Real-Time Stock Check:** Instantly verifies if an item is currently in stock.
- **Size Intelligence:** Distinguishes between **Available Sizes** and **Out-of-Stock Sizes**.
- **Smart Validation:** Automatically validates URLs. If you input a non-product page (like a homepage or blog), the scraper flags it immediately rather than returning incorrect data.
- **Rich Metadata:** Extracts deep details including Brand, Material, Color, Condition, Gender, and Category.
- **Image Extraction:** Retrieves high-quality product image URLs.
- **Price Monitoring:** Captures the current selling price.

### 🚀 Use Cases

- **Competitor Price Monitoring:** Track how competitors are pricing similar fashion items.
- **Inventory Tracking:** Monitor when specific sizes go out of stock or are replenished.
- **Dropshipping & Retail Arbitrage:** Find underpriced items and verify availability instantly.
- **Trend Analysis:** Aggregate data on materials, colors, and descriptions across different brands.

***

### 🔌 Input Parameters

The Actor takes a simplified input object. You only need to provide the target `url`.

#### Example Input

```json
{
  "url": "[https://theminnesotan.com/products/bears-trucker](https://theminnesotan.com/products/bears-trucker)"
}
```

Start a new [web scraping](https://apify.com/web-scraping) project quickly and easily in Python with our empty project template. It provides a basic structure for the [Actor](https://apify.com/actors) with [Apify SDK](https://docs.apify.com/sdk/python/) and allows you to easily add your own functionality.

### 📦 Output Data

Results are stored in the default Apify Dataset (JSON, CSV, Excel, HTML).

#### 1. Successful Scrape (Status: 200)

Valid product pages return detailed metadata and stock status.

```json
{
  "input_url": "[https://theminnesotan.com/products/bears-trucker](https://theminnesotan.com/products/bears-trucker)",
  "scrape_status": "success",
  "product_in_stock": true,
  "is_valid_product_page": true,
  "product_details": {
    "product_title": "Bears Trucker Hat",
    "product_description": "Classic trucker hat featuring the Bears logo...",
    "product_price": 29.99,
    "product_sizes_available": ["S", "M", "L", "XL"],
    "product_sizes_out_of_stock": ["XXL"],
    "product_images": [
      "[https://cdn.shopify.com/s/files/1/image_1.jpg](https://cdn.shopify.com/s/files/1/image_1.jpg)",
      "[https://cdn.shopify.com/s/files/1/image_2.jpg](https://cdn.shopify.com/s/files/1/image_2.jpg)"
    ],
    "product_color": "Navy/Orange",
    "product_brand": "The Minnesotan",
    "product_material": "Cotton/Polyester Mesh",
    "product_sex": "Unisex",
    "product_category": "Accessories > Hats",
    "product_condition": "New"
  }
}
```

### ⚠️ Error States & Validation

This Actor is designed to be robust. It distinguishes between a **Technical Failure** (which stops the run) and a **Validation Failure** (which logs the error and continues).

#### 1. Invalid Page (Soft Failure)

If the URL provided is reachable but is **not** a fashion product page (e.g., a blog post, a homepage, or a privacy policy), the Actor will **not fail**.

Instead, it returns a successful response with an `invalid_page` status. This allows you to process bulk URLs without stopping the entire run because of one bad link.

```json
{
  "input_url": "[https://theminnesotan.com/blogs/news](https://theminnesotan.com/blogs/news)",
  "scrape_status": "invalid_page",
  "error": "The provided URL does not appear to be a product page."
}
```

### Included features

- **[Apify SDK](https://docs.apify.com/sdk/python/)** for Python - a toolkit for building Apify [Actors](https://apify.com/actors) and scrapers in Python
- **[Input schema](https://docs.apify.com/platform/actors/development/input-schema)** - define and easily validate a schema for your Actor's input
- **[Request queue](https://docs.apify.com/sdk/python/docs/concepts/storages#working-with-request-queues)** - queues into which you can put the URLs you want to scrape
- **[Dataset](https://docs.apify.com/sdk/python/docs/concepts/storages#working-with-datasets)** - store structured data where each object stored has the same attributes

### How it works

Insert your own code to `async with Actor:` block. You can use the [Apify SDK](https://docs.apify.com/sdk/python/) with any other Python library.

### Resources

- [Python tutorials in Academy](https://docs.apify.com/academy/python)
- [Video guide on getting data using Apify API](https://www.youtube.com/watch?v=ViYYDHSBAKM)
- [Integration with Make, GitHub, Zapier, Google Drive, and other apps](https://apify.com/integrations)
- A short guide on how to build web scrapers using code templates:

[web scraper template](https://www.youtube.com/watch?v=u-i-Korzf8w)

### Getting started

For complete information [see this article](https://docs.apify.com/platform/actors/development#build-actor-at-apify-console). In short, you will:

1. Build the Actor
2. Run the Actor

### Pull the Actor for local development

If you would like to develop locally, you can pull the existing Actor from Apify console using Apify CLI:

1. Install `apify-cli`

   **Using Homebrew**

   ```bash
   brew install apify-cli
   ```

   **Using NPM**

   ```bash
   npm -g install apify-cli
   ```

2. Pull the Actor by its unique `<ActorId>`, which is one of the following:

   - unique name of the Actor to pull (e.g. "apify/hello-world")
   - or ID of the Actor to pull (e.g. "E2jjCZBezvAZnX8Rb")

   You can find both by clicking on the Actor title at the top of the page, which will open a modal containing both Actor unique name and Actor ID.

   This command will copy the Actor into the current directory on your local machine.

   ```bash
   apify pull <ActorId>
   ```

### Documentation reference

To learn more about Apify and Actors, take a look at the following resources:

- [Apify SDK for JavaScript documentation](https://docs.apify.com/sdk/js)
- [Apify SDK for Python documentation](https://docs.apify.com/sdk/python)
- [Apify Platform documentation](https://docs.apify.com/platform)
- [Join our developer community on Discord](https://discord.com/invite/jyEM2PRvMU)

# Actor input Schema

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

The specific fashion product page URL you want to scrape.

## Actor input object example

```json
{
  "url": "https://theminnesotan.com/products/bears-trucker"
}
```

# 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 = {
    "url": "https://theminnesotan.com/products/bears-trucker"
};

// Run the Actor and wait for it to finish
const run = await client.actor("flashi/fashion-pdp-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 = { "url": "https://theminnesotan.com/products/bears-trucker" }

# Run the Actor and wait for it to finish
run = client.actor("flashi/fashion-pdp-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 '{
  "url": "https://theminnesotan.com/products/bears-trucker"
}' |
apify call flashi/fashion-pdp-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,flashi/fashion-pdp-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/AxYhk9cnoEZ4DGMoR/builds/eLtfcpt0jnkv9SKfR/openapi.json
