{
  "openapi": "3.0.1",
  "info": {
    "title": "iHerb Scraper: Search, Products, Reviews & Monitor",
    "description": "The ultimate iHerb API. Supports 4 modes: Search, Product Details, Reviews, and Real-Time Price Monitoring. Extract ingredients, nutrition, and stock status for 188 countries. No monthly fees - pay only for what you scrape.",
    "version": "1.0",
    "x-build-id": "jRM5VFwfjjnNFntqa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vaunted~iherb-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vaunted-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/vaunted~iherb-scraper/runs": {
      "post": {
        "operationId": "runs-sync-vaunted-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/vaunted~iherb-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-vaunted-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",
        "properties": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "auto",
              "search",
              "details",
              "reviews",
              "monitor"
            ],
            "type": "string",
            "description": "Select the operation mode. 'auto' will detect URL type automatically.",
            "default": "auto"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Product URLs, Category URLs, or Search URLs to scrape. The actor will auto-detect the type if mode is 'auto'.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchKeywords": {
            "title": "Search Keywords",
            "type": "string",
            "description": "Keywords to search for (alternative to providing search URLs). Leave empty if using startUrls."
          },
          "countryCode": {
            "title": "Country/Region",
            "enum": [
              "US",
              "AL",
              "DZ",
              "AD",
              "AO",
              "AI",
              "AG",
              "AR",
              "AM",
              "AW",
              "AU",
              "AT",
              "AZ",
              "BS",
              "BH",
              "BD",
              "BB",
              "BY",
              "BE",
              "BZ",
              "BJ",
              "BM",
              "BT",
              "BO",
              "BA",
              "BW",
              "BR",
              "VG",
              "BN",
              "BG",
              "BF",
              "BI",
              "KH",
              "CM",
              "CA",
              "CV",
              "BQ",
              "KY",
              "CL",
              "CN",
              "CO",
              "CG",
              "CK",
              "CR",
              "HR",
              "CY",
              "CZ",
              "DK",
              "DJ",
              "DM",
              "DO",
              "EC",
              "EG",
              "SV",
              "EE",
              "SZ",
              "FK",
              "FO",
              "FJ",
              "FI",
              "FR",
              "GF",
              "PF",
              "GA",
              "GM",
              "GE",
              "DE",
              "GH",
              "GI",
              "GR",
              "GL",
              "GD",
              "GP",
              "GU",
              "GT",
              "GG",
              "GN",
              "GY",
              "HT",
              "HN",
              "HK",
              "HU",
              "IS",
              "IN",
              "ID",
              "IE",
              "IM",
              "IT",
              "CI",
              "JM",
              "JP",
              "JE",
              "JO",
              "KZ",
              "KE",
              "KI",
              "KW",
              "KG",
              "LV",
              "LB",
              "LI",
              "LT",
              "LU",
              "MO",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MQ",
              "MU",
              "MX",
              "MD",
              "MC",
              "MN",
              "ME",
              "MA",
              "MZ",
              "NA",
              "NP",
              "NL",
              "NC",
              "NZ",
              "NI",
              "NG",
              "MK",
              "MP",
              "NO",
              "OM",
              "PK",
              "PS",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PL",
              "PT",
              "QA",
              "RO",
              "RU",
              "RW",
              "WS",
              "SM",
              "ST",
              "SA",
              "SN",
              "RS",
              "SC",
              "SG",
              "SX",
              "SK",
              "SI",
              "SB",
              "ZA",
              "KR",
              "ES",
              "LK",
              "SH",
              "KN",
              "LC",
              "VC",
              "SR",
              "SE",
              "CH",
              "TW",
              "TJ",
              "TZ",
              "TH",
              "TG",
              "TO",
              "TT",
              "TN",
              "TR",
              "TC",
              "AE",
              "UG",
              "UA",
              "GB",
              "UY",
              "UZ",
              "VU",
              "VE",
              "VN",
              "YE",
              "ZM",
              "ZW"
            ],
            "type": "string",
            "description": "Target country for localized pricing and availability",
            "default": "US"
          },
          "currencyCode": {
            "title": "Currency",
            "enum": [
              "USD",
              "DZD",
              "ARS",
              "AMD",
              "AUD",
              "AZN",
              "BHD",
              "BYN",
              "BAM",
              "BRL",
              "GBP",
              "BND",
              "BGN",
              "KHR",
              "CAD",
              "KYD",
              "XAF",
              "CLP",
              "CNY",
              "COP",
              "CZK",
              "DKK",
              "DJF",
              "XCD",
              "EGP",
              "EUR",
              "FKP",
              "FJD",
              "GEL",
              "GHS",
              "GIP",
              "GNF",
              "HKD",
              "HUF",
              "ISK",
              "INR",
              "IDR",
              "JPY",
              "JOD",
              "KZT",
              "KRW",
              "KWD",
              "KGS",
              "LBP",
              "MOP",
              "MKD",
              "MWK",
              "MYR",
              "MVR",
              "MXN",
              "MDL",
              "MAD",
              "NPR",
              "NZD",
              "NGN",
              "NOK",
              "OMR",
              "PKR",
              "PEN",
              "PHP",
              "PLN",
              "QAR",
              "RON",
              "RUB",
              "RWF",
              "STN",
              "SAR",
              "RSD",
              "SGD",
              "ZAR",
              "SHP",
              "SZL",
              "SEK",
              "CHF",
              "TWD",
              "THB",
              "TOP",
              "TRY",
              "AED",
              "UGX",
              "UAH",
              "UZS",
              "VND",
              "YER"
            ],
            "type": "string",
            "description": "Currency for prices",
            "default": "USD"
          },
          "filters": {
            "title": "Search Filters",
            "type": "object",
            "description": "Filter results by brand, price range, or rating (applies to Search mode). Example: {\"brand\": \"California Gold\", \"minPrice\": 10, \"maxPrice\": 50, \"minRating\": 4}"
          },
          "maxItems": {
            "title": "Maximum Items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of dataset items to produce (0 = unlimited). In Reviews mode this caps total reviews, not products.",
            "default": 100
          },
          "maxReviewsPerProduct": {
            "title": "Max Reviews per Product",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum reviews to fetch per product in Reviews mode (0 = all). Total output is still capped by Maximum Items.",
            "default": 100
          },
          "reviewLanguage": {
            "title": "Review Language",
            "enum": [
              "all",
              "ar-SA",
              "hy-AM",
              "az-AZ",
              "bs-BA",
              "bg-BG",
              "zh-HK",
              "zh-CN",
              "zh-TW",
              "hr-HR",
              "cs-CZ",
              "da-DK",
              "nl-NL",
              "en-US",
              "et-EE",
              "fi-FI",
              "fr-FR",
              "ka-GE",
              "de-DE",
              "el-GR",
              "hi-IN",
              "hu-HU",
              "id-ID",
              "it-IT",
              "ja-JP",
              "kk-KZ",
              "ko-KR",
              "lv-LV",
              "lt-LT",
              "ms-MY",
              "no-NO",
              "pl-PL",
              "pt-BR",
              "pt-PT",
              "ro-RO",
              "ru-RU",
              "sk-SK",
              "sl-SI",
              "es-MX",
              "sv-SE",
              "th-TH",
              "tr-TR",
              "uk-UA"
            ],
            "type": "string",
            "description": "Only return reviews written in this language (Reviews mode). All languages is the default: English alone is a fraction of iHerb reviews, and Russian is often the largest share.",
            "default": "all"
          },
          "includeUpc": {
            "title": "Include UPC and SKU",
            "type": "boolean",
            "description": "Fetch UPC barcode, SKU and refreshed ratings in Details mode. This costs one extra request per product (roughly doubling requests). Turn off for faster, cheaper runs when you do not need barcodes.",
            "default": true
          },
          "webhookUrl": {
            "title": "Webhook URL (Monitor Mode)",
            "type": "string",
            "description": "URL to POST changes when price/stock changes are detected. Receives full JSON payload."
          },
          "monitorChangesOnly": {
            "title": "Output Changes Only",
            "type": "boolean",
            "description": "In Monitor mode, only output items that changed since last run",
            "default": true
          },
          "useSitemapForBulk": {
            "title": "Use sitemap for bulk (deprecated)",
            "type": "boolean",
            "description": "Deprecated and ignored for category URLs. The catalog API already paginates through an entire category, so bulk extraction needs no special flag.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max Concurrent Requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum parallel requests (adaptive throttling will adjust automatically)",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Not needed for most runs: iHerb's data APIs have not rate-limited this Actor even at high volume. Turn on Apify Proxy only if a run reports blocked or rate-limited requests."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}