{
  "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 24+ countries. No monthly fees—pay only for what you scrape.",
    "version": "1.0",
    "x-build-id": "picdlFLI3V9m15mz0"
  },
  "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",
        "required": [
          "startUrls"
        ],
        "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",
              "GB",
              "CA",
              "AU",
              "DE",
              "FR",
              "ES",
              "IT",
              "JP",
              "KR",
              "CN",
              "TW",
              "HK",
              "SG",
              "MY",
              "TH",
              "PH",
              "IN",
              "AE",
              "SA",
              "IL",
              "RU",
              "BR",
              "MX"
            ],
            "type": "string",
            "description": "Target country for localized pricing and availability",
            "default": "US"
          },
          "currencyCode": {
            "title": "Currency",
            "enum": [
              "USD",
              "GBP",
              "CAD",
              "AUD",
              "EUR",
              "JPY",
              "KRW",
              "CNY",
              "TWD",
              "HKD",
              "SGD",
              "MYR",
              "THB",
              "PHP",
              "INR",
              "AED",
              "SAR",
              "ILS",
              "RUB",
              "BRL",
              "MXN"
            ],
            "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 items to scrape (0 = unlimited)",
            "default": 100
          },
          "maxReviewsPerProduct": {
            "title": "Max Reviews per Product",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum reviews to fetch per product in Reviews mode (0 = all)",
            "default": 100
          },
          "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 Scrapes",
            "type": "boolean",
            "description": "Set to true for high-speed full category extraction (10k+ items)",
            "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": "Proxy settings. Residential proxies strongly recommended."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}