# Iherb Product Search Scraper (`soft_alexist/iherb-product-search-scraper`) Actor

Scrape product listings from iHerb.com with precision. This scraper extracts product names, pricing, discount details, images, and unique identifiers from category pages — perfect for price monitoring, competitive analysis, and e-commerce research.

- **URL**: https://apify.com/soft\_alexist/iherb-product-search-scraper.md
- **Developed by:** [Soft Alexist](https://apify.com/soft_alexist) (community)
- **Categories:** Automation, Developer tools, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

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

## iHerb Product Search Scraper: Extract Beauty & Health Product Data at Scale

***

### What Is iHerb?

iHerb.com is a major global e-commerce platform specializing in health supplements, vitamins, beauty products, and wellness items. With millions of SKUs across hundreds of categories, manually tracking product prices, discounts, and availability is impractical. The **iHerb Product Search Scraper** automates collection of product-level data from search and category pages, enabling real-time market insights and competitive intelligence.

***

### Overview

The **iHerb Product Search Scraper** extracts structured product records from iHerb category pages and search results. It is designed for:

- **Price monitors** tracking competitor pricing and discount trends
- **E-commerce analysts** studying product assortment and promotional strategies
- **Retailers** benchmarking iHerb's product positioning against their own inventory
- **Researchers** analyzing the health supplement market landscape
- **Aggregator platforms** building comprehensive product databases

The scraper excels at handling pagination, managing bulk collection across multiple URLs, and delivering clean, normalized pricing data ready for analysis or database import.

***

### Input Format

The scraper accepts a JSON configuration object to control what and how much to scrape:

```json
{
  "urls": [
    "https://www.iherb.com/c/beauty?p=2"
  ],
  "max_items_per_url": 200,
  "ignore_url_failures": true
}
```

| Field | Description |
|---|---|
| `urls` | Array of iHerb category or search result pages to scrape (e.g., `/c/beauty?p=2`, `/s/vitamin-c`) |
| `max_items_per_url` | Maximum products to extract per URL (integer, default: `200`) |
| `ignore_url_failures` | Boolean flag; if `true`, scraper continues if some URLs fail; if `false`, stops on error |

**Best practices:**

- Use paginated category URLs to control volume (e.g., `?p=1`, `?p=2`, etc.)
- Set `max_items_per_url` to 50–200 depending on your needs
- Enable `ignore_url_failures: true` for bulk runs to avoid interruptions from temporary network issues

***

### Output Format

**Sample output**

```json
{
  "product_id": 101522,
  "product_name": "Eucerin, Roughness Smoothing Cream, Very Dry, Rough & Bumpy Skin, Fragrance Free, 16 oz (454 g)",
  "iurl_small": "https://cloudinary.images-iherb.com/image/upload/f_auto,q_auto:eco/images/euc/euc02564/s/54.jpg",
  "iurl_medium": "https://cloudinary.images-iherb.com/image/upload/f_auto,q_auto:eco/images/euc/euc02564/m/54.jpg",
  "list_price": "$",
  "discount_price": "$",
  "discount_percentage": "0",
  "discount_type": 0,
  "part_number": "EUC-02564",
  "brand_code": null,
  "discount_price_decimal": 0.0,
  "group_id": 0,
  "from_url": "https://www.iherb.com/c/beauty?p=2"
}
```

Each product record contains 12 core fields with pricing, identification, and visual data:

#### Product Identification

| Field | Meaning | Example |
|---|---|---|
| `Product ID` | Unique iHerb identifier for the product | `12345678` |
| `Product Name` | Official product title as displayed on iHerb | `Vitamin C 1000mg - 100 Capsules` |
| `Part Number` | Manufacturer's part/SKU number | `VC-1000-100` |
| `Brand Code` | Internal iHerb brand classification code | `BRAND_001` |
| `Group ID` | Product category/family grouping ID | `10234` |

#### Pricing & Discounts

| Field | Meaning | Example |
|---|---|---|
| `List Price` | Original/MSRP price before discounts | `$19.99` |
| `Discount Price` | Current sale price (rounded) | `$14.99` |
| `Discount Price Decimal` | Precise discount price with decimals | `$14.99` |
| `Discount Percentage` | Percentage off the list price | `25%` |
| `Discount Type` | Discount category (e.g., "Sale", "Loyalty", "Bundle") | `SALE` |

#### Visual Assets

| Field | Meaning |
|---|---|
| `Image URL Small` | Thumbnail image link (e.g., 100x100px) |
| `Image URL Medium` | Medium product image link (e.g., 300x300px) |

**Use cases for each field:**

- **Pricing fields:** Compare price movements over time, identify aggressive discounting patterns, calculate margin compression
- **Discount fields:** Track promotional frequency, segment products by discount depth, detect loss leaders
- **Image URLs:** Populate your own product feeds, train computer vision models, detect branding changes
- **Identification fields:** Match iHerb products to your internal catalog, deduplication, cross-reference with manufacturer data

***

### How to Use

1. **Gather URLs** — Navigate to iHerb.com, select a category (e.g., Beauty, Vitamins), and copy the category page URL. Manually modify `?p=1`, `?p=2`, etc., for multi-page collections, or paste multiple URLs.

2. **Configure input** — Populate the `urls` array and set `max_items_per_url` based on how many products you need:
   - Quick scan: `50–100` items
   - Full category: `200` items
   - Bulk research: multiple URLs with `200` each

3. **Set error handling** — Enable `ignore_url_failures: true` for production runs to handle temporary network glitches gracefully.

4. **Run the scraper** — Execute the actor and monitor the run log for status updates.

5. **Export & analyze** — Download results as JSON, CSV, or Excel and integrate into your analytics pipeline or database.

**Troubleshooting:**

- If a URL returns no products, verify the page is not empty and the URL is formatted correctly (e.g., includes `?p=X` for paginated URLs)
- For large-scale collection, stagger runs across multiple hours to avoid rate limits
- Image URLs may expire; download and cache them regularly if building an archive

***

### Use Cases & Business Value

- **Price monitoring:** Track competitor pricing in real-time; alert on significant discounts or price changes
- **Market research:** Analyze product assortment depth, average pricing, and promotional cadence in the supplement category
- **Arbitrage & resale:** Identify high-discount products for resale on other platforms
- **Competitive benchmarking:** Compare your product mix and pricing strategy against iHerb's
- **Content aggregation:** Populate your own product database, comparison tools, or price comparison website
- **Trend analysis:** Study which product categories are most heavily discounted, identify emerging brands

The iHerb scraper delivers ready-to-analyze data that would take weeks to gather manually, unlocking competitive advantages in pricing strategy, assortment planning, and market positioning.

***

### Conclusion

The **iHerb Product Search Scraper** is the fastest way to collect structured product and pricing data from one of the world's largest health and beauty e-commerce platforms. Whether you're monitoring prices, conducting market research, or building a product aggregator, this scraper delivers clean, normalized data with minimal setup. Start collecting today and gain the market intelligence you need.

# Actor input Schema

## `urls` (type: `array`):

Add the URLs of the product list urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.

## `ignore_url_failures` (type: `boolean`):

If true, the scraper will continue running even if some URLs fail to be scraped.

## `max_items_per_url` (type: `integer`):

The maximum number of items to scrape per URL.

## Actor input object example

```json
{
  "urls": [
    "https://www.iherb.com/c/beauty?p=2"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 500
}
```

# 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 = {
    "urls": [
        "https://www.iherb.com/c/beauty?p=2"
    ],
    "ignore_url_failures": true,
    "max_items_per_url": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("soft_alexist/iherb-product-search-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 = {
    "urls": ["https://www.iherb.com/c/beauty?p=2"],
    "ignore_url_failures": True,
    "max_items_per_url": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("soft_alexist/iherb-product-search-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 '{
  "urls": [
    "https://www.iherb.com/c/beauty?p=2"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 500
}' |
apify call soft_alexist/iherb-product-search-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ZsTrrAvQqcMf57iDQ/builds/Roq8AckCSxnSYVklO/openapi.json
