# iHerb Scraper - Vitamins, Supplements & Health Products (`crawlerbros/iherb-scraper`) Actor

Scrape iHerb.com product listings and details. Search by keyword, browse any category or brand, or look up exact products by ID/URL. Get prices, ratings, review counts, discounts, stock status, images, brand and category info.

- **URL**: https://apify.com/crawlerbros/iherb-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## iHerb Scraper

Scrape [iHerb.com](https://www.iherb.com) — one of the world's largest online retailers of vitamins, supplements, health, beauty, grocery, and household products. Search by keyword, browse any category or brand page, look up exact products by ID or URL, or pull individual customer reviews and customer Q\&A. Get prices, discounts, ratings, review counts, stock status, images, brand and category details. No login, cookies, or API keys required.

### What this actor does

- **Five modes:** `search` (keyword), `category` (browse any category or brand page), `product` (exact lookup by ID or URL), `reviews` (individual customer reviews for a product), `questions` (customer Q\&A for a product)
- **Sort orders:** Featured, Relevance, Best sellers, Top rated, Most rated, Price low→high, Price high→low, Newest, Heaviest, Lightest, Highest discount
- **Filters:** minimum rating, price range, in-stock only, discounted only, brand name, health topic (wellness category), "Only at iHerb" exclusive products, "iTested" independently lab-verified products, "Quality pick" curated products, iHerb house brands only, "Sport Certified" third-party anti-doping certified products
- **AI review summary** — `product` mode includes an AI-generated summary of what customers say, when iHerb has generated one
- **Individual customer reviews** — `reviews` mode returns real reviewer text, rating, verified-purchase status, helpful votes, and photos, sortable by relevance/newest/most helpful
- **Translated review text** — set `reviewDisplayLanguage` to read customer reviews (and the AI review summary) machine-translated into English, Spanish, French, German, Italian, Portuguese, Russian, Chinese, Japanese, or Arabic, regardless of what language the reviewer originally wrote in
- **Global pricing** — the store's local currency is detected automatically and included on every record; pick a country in the proxy settings to browse iHerb (and see prices) as if from that country
- **Empty fields are omitted** — every record only contains fields that were actually found

### Output per product

**Listing records** (`search` / `category` modes):

- `productId`, `partNumber`, `title`
- `brandName`, `brandId`
- `rating`, `reviewCount`
- `listPrice`, `discountPrice`, `discountPercentage`, `currency`
- `inStock`, `discontinued`, `sponsored`
- `flags[]` — e.g. `BestSeller`, `iHerbExclusive`, `Special`, `New`, `Clearance`, `LimitedEdition`
- `imageUrl`, `sourceUrl`
- `recordType: "product"`, `scrapedAt`

**Detail records** (`product` mode) additionally include:

- `description`, `categoryName`, `categoryId`, `categoryPath[]` — full breadcrumb trail, e.g. `["Supplements", "Vitamins", "Vitamin C", "Ascorbic Acid"]`
- `brandUrl`
- `gtin` — UPC/EAN barcode, when iHerb publishes one for the product
- `weightValue`, `weightUnit`
- `price` (instead of listPrice/discountPrice)
- `imageUrls[]` — additional product gallery photos (packaging angles, supplement facts panel), beyond the primary `imageUrl`, when iHerb publishes more than one image
- `suggestedUse`, `ingredients`, `warnings` — the product's "Suggested use", "Other ingredients", and "Warnings" label text, when iHerb publishes them (most supplement, beauty, and grocery products do)
- `firstAvailableDate` — the month the product was first listed on iHerb (`YYYY-MM`)
- `dimensions` — packaged product dimensions as published by iHerb (e.g. `14.4 x 7.7 x 7.7 cm`)
- `shippingWeightValue`, `shippingWeightUnit` — packaged shipping weight (box + protective material), when iHerb publishes it — distinct from the net product `weightValue`/`weightUnit`
- `packageQuantity` — the count/size of the package as published in the Specifications panel (e.g. `240 count`), independent of whether the product has alternate pack-size siblings
- `specialNote` — a shipping/storage note iHerb publishes for a subset of products (e.g. "kept refrigerated to ensure maximum freshness; not necessary to ship on ice")
- `supplementFacts` — the structured Supplement Facts panel (`servingSize`, `servingsPerContainer`, and a `nutrients[]` breakdown of `name` / `amountPerServing` / `dailyValue`), present only for supplement/nutrition products
- `variants[]` — sibling product options in the same family (e.g. Potency, Package quantity, Product form, Scent, Color), each with `attribute`, and `options[]` listing every sibling's `value`, `productId`, `url`, `inStock`, and `current` (on the option matching this record); omitted when the product has no sibling variants
- `categoryRankings[]` — iHerb's own best-seller rank for this product within each category it belongs to (most specific first), e.g. `#1 in Magnesium Oxide`, `#5 in Sleep`; each entry has `rank`, `categoryName`, `categoryUrl`; omitted for discontinued/low-volume products with no ranking data
- `reviewSummary` — an AI-generated summary of what customers say about the product, when iHerb has generated one (requires a minimum review volume)

**Review records** (`reviews` mode) — one record per customer review:

- `reviewId`, `productId`, `title`, `text`, `rating` (0-5)
- `reviewerName`, `reviewerCountry`, `reviewerBadge` (e.g. `Silver`, `Gold` contributor tier), `reviewerReviewCount`
- `verifiedPurchase`, `postedDate`, `helpfulYes`, `helpfulNo`, `languageCode` — the reviewer's *original* review language (e.g. `ar-SA`), independent of `reviewDisplayLanguage`; the `title`/`text` fields are always shown translated into the requested `reviewDisplayLanguage` regardless of what this field says
- `imageUrls[]` — customer-submitted photos, when the review includes any
- `sourceUrl` — the reviewed product's page
- `recordType: "review"`, `scrapedAt`

**Question records** (`questions` mode) — one record per customer question, newest first:

- `questionId`, `productId`, `question`, `askerName`, `postedDate`, `answerCount`, `helpful` (helpful-vote count, when any)
- `topAnswerText`, `topAnswererName`, `topAnswerVerifiedPurchase`, `topAnswerPostedDate` — the question's top/first answer, when iHerb includes one in the response
- `sourceUrl` — the product's page
- `recordType: "question"`, `scrapedAt`
- Note: iHerb's own Q\&A widget is shared across every pack-size/flavor variant of a product family, not just the exact ID you queried — so `productId`/`sourceUrl` on an individual question may point at a sibling variant of the product you requested rather than that exact ID. This mirrors what iherb.com itself shows on the product page.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search` / `category` / `product` / `reviews` / `questions` |
| `searchQuery` | string | `vitamin c` | Keyword (mode=search) |
| `categorySlug` | string | `vitamins` | Category or brand slug/URL (mode=category) |
| `productIds` | array | – | Numeric product IDs (mode=product / reviews / questions) |
| `productUrls` | array | – | Full product page URLs (mode=product / reviews / questions) |
| `sortBy` | string | `featured` | Result ordering (mode=search / category) |
| `reviewSortBy` | string | `mostRelevant` | Review ordering: `mostRelevant` / `newest` / `mostHelpful` (mode=reviews) |
| `reviewsWithImagesOnly` | boolean | `false` | Only return reviews that include photos (mode=reviews) |
| `reviewDisplayLanguage` | string | `en` | Machine-translate review text / AI summary into this language: `en` / `es` / `fr` / `de` / `it` / `pt` / `ru` / `zh` / `ja` / `ar` (mode=reviews / product) |
| `minRating` | number | – | Drop products below this rating (0-5) |
| `minPrice` | number | – | Drop products priced below this |
| `maxPrice` | number | – | Drop products priced above this |
| `inStockOnly` | boolean | `false` | Only emit in-stock products |
| `discountOnly` | boolean | `false` | Only emit discounted products |
| `brandName` | string | – | Only emit products whose brand contains this text |
| `healthTopic` | string | – | Restrict to an iHerb wellness category, e.g. `sleep`, `immuneSupport`, `weightManagement` (mode=search / category) |
| `onlyAtIherbOnly` | boolean | `false` | Only emit products in iHerb's exclusive "Only at iHerb" program (mode=search / category) |
| `iTestedOnly` | boolean | `false` | Only emit products carrying iHerb's "iTested" independent lab-verification badge (mode=search / category) |
| `qualityPickOnly` | boolean | `false` | Only emit products carrying iHerb's own "Quality pick" curated/editorial badge (mode=search / category) |
| `iherbBrandsOnly` | boolean | `false` | Only emit products from iHerb's own house-owned brand family (mode=search / category) |
| `sportCertifiedOnly` | boolean | `false` | Only emit products carrying a third-party sport anti-doping certification badge (e.g. NSF Certified for Sport, Informed Sport) (mode=search / category) |
| `maxItems` | int | `20` | Hard cap (1-500) |
| `proxyConfiguration` | object | AUTO | Apify proxy; pick a country to localize currency/availability |

#### Example: search with filters

```json
{
  "mode": "search",
  "searchQuery": "collagen",
  "sortBy": "topRated",
  "minRating": 4.5,
  "discountOnly": true,
  "maxItems": 30
}
```

#### Example: browse a category

```json
{
  "mode": "category",
  "categorySlug": "sports-nutrition",
  "sortBy": "bestSellers",
  "maxItems": 50
}
```

#### Example: browse a brand page

```json
{
  "mode": "category",
  "categorySlug": "now-foods",
  "sortBy": "priceLowToHigh"
}
```

#### Example: lookup exact products

```json
{
  "mode": "product",
  "productIds": ["61865", "104054"]
}
```

#### Example: get customer reviews for a product

```json
{
  "mode": "reviews",
  "productIds": ["61865"],
  "reviewSortBy": "mostHelpful",
  "maxItems": 50
}
```

#### Example: get customer Q\&A for a product

```json
{
  "mode": "questions",
  "productIds": ["61865"],
  "maxItems": 50
}
```

### Use cases

- **Price monitoring** — track prices and discounts on vitamins/supplements over time
- **Market research** — analyze best sellers and top-rated products by category
- **Competitor analysis** — compare brand pricing and catalog breadth
- **Content aggregation** — pull product catalogs for comparison/review sites
- **Deal discovery** — filter for discounted, in-stock products by rating

### Data source

Product data is read from iHerb's public, no-login pages (search, category/brand, and product pages). iHerb serves these behind Cloudflare bot management, which blocks plain `curl`/basic HTTP clients even with a browser User-Agent — a real browser TLS fingerprint is required, which is what the actor uses server-side. `sourceUrl` links open normally in any real browser; they just won't return content to bare `curl` or simple `requests.get()` calls, which is expected and consistent with how the live site behaves for any automated client.

### FAQ

**Do I need an iHerb account or API key?** No. The actor reads the same public pages a shopper sees, no login required.

**What currency are prices in?** iHerb shows prices in the currency of the store locale it serves (detected from the response and included in the `currency` field on every record). Use the proxy country selector in the input to browse from a specific country and see that country's pricing.

**Can I search by both keyword and category?** Use `mode=search` for keyword search, or `mode=category` with a category/brand slug. Combine either with the shared filters (rating, price, stock, discount, brand, health topic, Only-at-iHerb).

**Can I filter by wellness category, like Sleep or Immune Support?** Yes — set `healthTopic` (mode=search / category) to restrict results to iHerb's own wellness-category facet (e.g. Sleep, Immune Support, Weight Management, Women's Health). Leave it blank for no restriction.

**Can I get only iHerb's exclusive "Only at iHerb" products?** Yes — set `onlyAtIherbOnly: true` (mode=search / category) to restrict results to products in that program; matching records also carry an `OnlyAtIherb` entry in their `flags[]`.

**Can I get only independently lab-tested ("iTested") products?** Yes — set `iTestedOnly: true` (mode=search / category) to restrict results to products carrying iHerb's "iTested" badge, meaning they've been independently third-party lab-verified for quality and purity.

**Can I get only iHerb's own "Quality pick" curated products?** Yes — set `qualityPickOnly: true` (mode=search / category) to restrict results to products carrying iHerb's own editorial "Quality pick" badge. This is a small, curated selection distinct from both "Only at iHerb" (exclusive manufacturing) and "iTested" (independent lab verification); if you set both `iTestedOnly` and `qualityPickOnly` together, `iTestedOnly` takes precedence since iHerb's own site only supports one badge filter active at a time.

**Can I get only iHerb's own house brands?** Yes — set `iherbBrandsOnly: true` (mode=search / category) to restrict results to products from brands iHerb itself owns and manufactures (e.g. California Gold Nutrition, Doctor's Best), as opposed to third-party brands. This is distinct from "Only at iHerb" (third-party brands with exclusive distribution rights) and can be combined freely with `qualityPickOnly` or `iTestedOnly`.

**Can I get only sport-certified products?** Yes — set `sportCertifiedOnly: true` (mode=search / category) to restrict results to products carrying a third-party sport anti-doping certification badge (e.g. NSF Certified for Sport, Informed Sport) — especially useful for protein powders and sports-nutrition searches. Combines freely with any other filter.

**Will `mode=search` results still match my keyword if I pick a non-default sort order (e.g. Top rated, Price low→high)?** Yes. Results are always checked against your search terms before being returned, so switching the sort order never turns a keyword search into an unrelated product feed.

**What's a "category slug"?** The part of the URL after `/c/`, e.g. `https://www.iherb.com/c/vitamins` → `vitamins`. Brand pages use the same URL pattern (e.g. `/c/california-gold-nutrition`), so brand browsing works the same way.

**Why is `discountPrice` sometimes equal to `listPrice`?** iHerb only applies a discount to some products; when there's no active discount, both fields show the current price and `discountPercentage` is omitted.

**What happens if I look up a discontinued product?** `mode=product` still returns the record (title, description, last-known price, images, etc.) with `inStock: false`, since iHerb keeps discontinued product pages live with full data. Only products iHerb has fully removed from its catalog (unknown/invalid ID) return nothing.

**Does the actor return barcodes?** Product-lookup records (`mode=product`) include a `gtin` field (UPC/EAN) whenever iHerb publishes one for that product.

**Does the actor return supplement facts?** Yes — `mode=product` records include a `supplementFacts` object (serving size, servings per container, and the full nutrient/amount/%daily-value table) for supplement and nutrition products. Beauty, grocery, and other non-supplement products correctly omit this field.

**Does the actor return other pack sizes / flavors / potencies of the same product?** Yes — `mode=product` records include a `variants[]` array listing sibling product IDs and URLs for attributes like potency, package quantity, product form, scent, or color, whenever iHerb offers more than one option in that family.

**Does the actor return the product's best-seller rank?** Yes — `mode=product` records include a `categoryRankings[]` array with iHerb's own best-seller rank for the product within each category it belongs to (e.g. `#1 in Magnesium Oxide`), most specific category first. Omitted for discontinued or low-volume products iHerb hasn't ranked.

**Can I get individual customer reviews, not just the aggregate rating?** Yes — use `mode=reviews` with a `productIds`/`productUrls` list to get each review's text, star rating, reviewer name/country, verified-purchase status, helpful-vote counts, and any photos the reviewer attached. Sort with `reviewSortBy` (`mostRelevant`, `newest`, `mostHelpful`) and set `reviewsWithImagesOnly: true` to only get reviews with photos.

**Can I get the "Customer questions and answers" section, not just reviews?** Yes — use `mode=questions` with a `productIds`/`productUrls` list to get every question asked about the product (newest first), along with its top answer when one is available, asker/answerer name, verified-purchase status on the answer, and dates. For some products, iHerb pools its Q\&A section across closely related sibling variants (e.g. different pack sizes of the same formula) rather than keeping it strictly per-listing; each returned question record's own `productId`/`sourceUrl` always correctly reflects which exact variant that question was actually asked about, so you can tell at a glance if a question came from a sibling listing.

**Can I read reviews in a different language than the reviewer wrote them in?** Yes — set `reviewDisplayLanguage` (e.g. `es`, `fr`, `de`, `zh`) and iHerb machine-translates every review's title and text into that language before it's returned, along with the AI review summary in `product` mode. The reviewer's underlying review (and who wrote it) doesn't change, only the language it's shown in.

**Is there a quick way to see overall sentiment without reading every review?** Yes — `mode=product` records include a `reviewSummary` field: an AI-generated summary of what customers commonly say about the product, when iHerb has generated one for it (requires a minimum review volume; omitted otherwise).

**How many products can I get per run?** Up to `maxItems` (max 500). Search/category results are paginated automatically until the cap is reached.

# Actor input Schema

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

What to fetch from iHerb.

## `searchQuery` (type: `string`):

Free-text keyword search (mode=search), e.g. `vitamin c`, `collagen`, `probiotics`.

## `categorySlug` (type: `string`):

iHerb category or brand slug (mode=category), e.g. `vitamins`, `supplements`, `sports-nutrition`, `herbs`, `homeopathy`, `grocery`, `bath-personal-care`, `skin-care`, `hair-care`, `childrens-health`, `household-supplies`, `essential-oils-aromatherapy`, `specials`, or a brand slug like `california-gold-nutrition`, `now-foods`, `doctors-best`. A full iHerb category/brand URL is also accepted.

## `productIds` (type: `array`):

Numeric iHerb product IDs, e.g. `61865`.

## `productUrls` (type: `array`):

Full iHerb product page URLs, e.g. `https://www.iherb.com/pr/.../61865`.

## `sortBy` (type: `string`):

Result ordering (mode=search / category only).

## `reviewSortBy` (type: `string`):

Ordering of returned customer reviews (mode=reviews only).

## `reviewsWithImagesOnly` (type: `boolean`):

Only return customer reviews that include photos (mode=reviews only).

## `reviewDisplayLanguage` (type: `string`):

Language to machine-translate customer review text into (mode=reviews) and the AI review summary into (mode=product). Every review is still returned regardless of the reviewer's original language — this only changes what language the text is shown in.

## `minRating` (type: `number`):

Drop products with an average rating below this (0-5 stars).

## `minPrice` (type: `number`):

Drop products priced below this amount (in the store's local currency).

## `maxPrice` (type: `number`):

Drop products priced above this amount (in the store's local currency).

## `inStockOnly` (type: `boolean`):

Only emit products currently in stock.

## `discountOnly` (type: `boolean`):

Only emit products with an active discount.

## `brandName` (type: `string`):

Only emit products whose brand name contains this text (case-insensitive).

## `healthTopic` (type: `string`):

Restrict results to iHerb's wellness-category facet, e.g. Immune Support, Weight Management, Sleep (mode=search / category only). Leave blank for no restriction.

## `onlyAtIherbOnly` (type: `boolean`):

Only emit products in iHerb's exclusive "Only at iHerb" program (mode=search / category only).

## `iTestedOnly` (type: `boolean`):

Only emit products carrying iHerb's "iTested" badge — independently third-party lab-verified for quality/purity (mode=search / category only).

## `qualityPickOnly` (type: `boolean`):

Only emit products carrying iHerb's own "Quality pick" curated/editorial badge (mode=search / category only). If both this and `iTestedOnly` are set, `iTestedOnly` takes precedence since iHerb's own filter sidebar only supports one badge facet at a time.

## `iherbBrandsOnly` (type: `boolean`):

Only emit products from iHerb's own house-owned brand family (e.g. California Gold Nutrition, Doctor's Best) (mode=search / category only). Distinct from "Only at iHerb" exclusive third-party brands.

## `sportCertifiedOnly` (type: `boolean`):

Only emit products carrying a third-party sport anti-doping certification badge (e.g. NSF Certified for Sport, Informed Sport) (mode=search / category only). Especially useful for sports-nutrition/protein searches.

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

Hard cap on emitted records.

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

Apify proxy used to fetch pages and to localize currency/availability by country. The free Datacenter (AUTO) group is enabled by default and works reliably; pick a country in the editor to browse iHerb as if from that country.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "vitamin c",
  "categorySlug": "vitamins",
  "productIds": [],
  "productUrls": [],
  "sortBy": "featured",
  "reviewSortBy": "mostRelevant",
  "reviewsWithImagesOnly": false,
  "reviewDisplayLanguage": "en",
  "inStockOnly": false,
  "discountOnly": false,
  "healthTopic": "",
  "onlyAtIherbOnly": false,
  "iTestedOnly": false,
  "qualityPickOnly": false,
  "iherbBrandsOnly": false,
  "sportCertifiedOnly": false,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `products` (type: `string`):

Dataset containing all scraped iHerb products.

# 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 = {
    "mode": "search",
    "searchQuery": "vitamin c",
    "categorySlug": "vitamins",
    "productIds": [],
    "productUrls": [],
    "sortBy": "featured",
    "reviewSortBy": "mostRelevant",
    "reviewsWithImagesOnly": false,
    "reviewDisplayLanguage": "en",
    "inStockOnly": false,
    "discountOnly": false,
    "healthTopic": "",
    "onlyAtIherbOnly": false,
    "iTestedOnly": false,
    "qualityPickOnly": false,
    "iherbBrandsOnly": false,
    "sportCertifiedOnly": false,
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/iherb-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 = {
    "mode": "search",
    "searchQuery": "vitamin c",
    "categorySlug": "vitamins",
    "productIds": [],
    "productUrls": [],
    "sortBy": "featured",
    "reviewSortBy": "mostRelevant",
    "reviewsWithImagesOnly": False,
    "reviewDisplayLanguage": "en",
    "inStockOnly": False,
    "discountOnly": False,
    "healthTopic": "",
    "onlyAtIherbOnly": False,
    "iTestedOnly": False,
    "qualityPickOnly": False,
    "iherbBrandsOnly": False,
    "sportCertifiedOnly": False,
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/iherb-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 '{
  "mode": "search",
  "searchQuery": "vitamin c",
  "categorySlug": "vitamins",
  "productIds": [],
  "productUrls": [],
  "sortBy": "featured",
  "reviewSortBy": "mostRelevant",
  "reviewsWithImagesOnly": false,
  "reviewDisplayLanguage": "en",
  "inStockOnly": false,
  "discountOnly": false,
  "healthTopic": "",
  "onlyAtIherbOnly": false,
  "iTestedOnly": false,
  "qualityPickOnly": false,
  "iherbBrandsOnly": false,
  "sportCertifiedOnly": false,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call crawlerbros/iherb-scraper --silent --output-dataset

```

## MCP server setup

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