{
  "openapi": "3.0.1",
  "info": {
    "title": "iHerb Scraper - Vitamins, Supplements & Health Products",
    "description": "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.",
    "version": "1.0",
    "x-build-id": "OJFeuFtUZD3IPhOpR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~iherb-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-iherb-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/crawlerbros~iherb-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-iherb-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/crawlerbros~iherb-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-iherb-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "category",
              "product",
              "reviews",
              "questions"
            ],
            "type": "string",
            "description": "What to fetch from iHerb.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text keyword search (mode=search), e.g. `vitamin c`, `collagen`, `probiotics`.",
            "default": "vitamin c"
          },
          "categorySlug": {
            "title": "Category or brand slug / URL",
            "type": "string",
            "description": "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.",
            "default": "vitamins"
          },
          "productIds": {
            "title": "Product IDs (mode=product / reviews / questions)",
            "type": "array",
            "description": "Numeric iHerb product IDs, e.g. `61865`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs (mode=product / reviews / questions)",
            "type": "array",
            "description": "Full iHerb product page URLs, e.g. `https://www.iherb.com/pr/.../61865`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "featured",
              "relevance",
              "bestSellers",
              "topRated",
              "mostRated",
              "priceLowToHigh",
              "priceHighToLow",
              "newest",
              "heaviest",
              "lightest",
              "highestDiscount"
            ],
            "type": "string",
            "description": "Result ordering (mode=search / category only).",
            "default": "featured"
          },
          "reviewSortBy": {
            "title": "Review sort order (mode=reviews)",
            "enum": [
              "mostRelevant",
              "newest",
              "mostHelpful"
            ],
            "type": "string",
            "description": "Ordering of returned customer reviews (mode=reviews only).",
            "default": "mostRelevant"
          },
          "reviewsWithImagesOnly": {
            "title": "Reviews with photos only (mode=reviews)",
            "type": "boolean",
            "description": "Only return customer reviews that include photos (mode=reviews only).",
            "default": false
          },
          "reviewDisplayLanguage": {
            "title": "Review display language (mode=reviews / product)",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "ru",
              "zh",
              "ja",
              "ar"
            ],
            "type": "string",
            "description": "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.",
            "default": "en"
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Drop products with an average rating below this (0-5 stars)."
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Drop products priced below this amount (in the store's local currency)."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Drop products priced above this amount (in the store's local currency)."
          },
          "inStockOnly": {
            "title": "In-stock only",
            "type": "boolean",
            "description": "Only emit products currently in stock.",
            "default": false
          },
          "discountOnly": {
            "title": "Discounted only",
            "type": "boolean",
            "description": "Only emit products with an active discount.",
            "default": false
          },
          "brandName": {
            "title": "Filter by brand name",
            "type": "string",
            "description": "Only emit products whose brand name contains this text (case-insensitive)."
          },
          "healthTopic": {
            "title": "Health topic (mode=search / category)",
            "enum": [
              "",
              "immuneSupport",
              "sexualHealth",
              "moodBalanceAnxiety",
              "energy",
              "arthritis",
              "commonColdFlu",
              "metabolism",
              "heart",
              "boneJointCartilage",
              "biohacking",
              "childrensHealth",
              "travel",
              "brainCognitive",
              "gutHealth",
              "womensHealth",
              "hairSkinNails",
              "antiAgingLongevity",
              "bloodSugarBalance",
              "colon",
              "weightManagement",
              "detoxCleanse",
              "cardiovascularSupport",
              "bladder",
              "urinaryTract",
              "muscleRecovery",
              "mensHealth",
              "seasonalAllergies",
              "sleep",
              "eyeVision",
              "painRelief",
              "ayurvedicHerbs",
              "healthySnacking",
              "stressRelief",
              "healthyFats",
              "highProtein",
              "hormonalHealth",
              "respiratorySupport",
              "glp1Support",
              "ears",
              "sleepyTea"
            ],
            "type": "string",
            "description": "Restrict results to iHerb's wellness-category facet, e.g. Immune Support, Weight Management, Sleep (mode=search / category only). Leave blank for no restriction.",
            "default": ""
          },
          "onlyAtIherbOnly": {
            "title": "\"Only at iHerb\" products only (mode=search / category)",
            "type": "boolean",
            "description": "Only emit products in iHerb's exclusive \"Only at iHerb\" program (mode=search / category only).",
            "default": false
          },
          "iTestedOnly": {
            "title": "\"iTested\" independently lab-tested products only (mode=search / category)",
            "type": "boolean",
            "description": "Only emit products carrying iHerb's \"iTested\" badge — independently third-party lab-verified for quality/purity (mode=search / category only).",
            "default": false
          },
          "qualityPickOnly": {
            "title": "\"Quality pick\" curated products only (mode=search / category)",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "iherbBrandsOnly": {
            "title": "iHerb house brands only (mode=search / category)",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "sportCertifiedOnly": {
            "title": "\"Sport Certified\" products only (mode=search / category)",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "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.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}