{
  "openapi": "3.0.1",
  "info": {
    "title": "iHerb Scraper - Products, Prices, Supplement Facts & Reviews",
    "description": "Scrape iHerb by keyword, category, brand or product link: price, list price, discount, rating, reviews, stock, size, badges and images. Optional full details (ingredients, supplement facts, UPC, best-by date) and reviews. 35 countries and currencies. Error rows are free.",
    "version": "0.1",
    "x-build-id": "hsNtgFSnxGKOkAN2N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~iherb-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-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/scrapewise~iherb-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-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/scrapewise~iherb-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords as you would type them in the iHerb search bar, one per line, for example \"vitamin c\", \"magnesium glycinate\" or \"collagen peptides\". Each keyword returns the products iHerb lists for it, page after page (48 per page), with the sort and filters below. Leave every source empty to run the example \"vitamin c\". Also accepts 'searchQuery', 'keyword' and 'queries'.",
            "items": {
              "type": "string"
            }
          },
          "categoryUrls": {
            "title": "Category, brand or search links",
            "type": "array",
            "description": "Any iHerb product list, one per line: categories such as https://www.iherb.com/c/vitamin-c, brand pages such as https://www.iherb.com/c/now-foods, search links (https://www.iherb.com/search?kw=zinc) or specials. Country subdomains (uk.iherb.com, de.iherb.com) work too; the country below decides prices and currency. Also accepts 'startUrls' and 'urls'.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product links or ids",
            "type": "array",
            "description": "Specific products, one per line: https://www.iherb.com/pr/now-foods-c-1000-250-tablets/468 or just the numeric id (468). Each returns one full row with description, ingredients, supplement facts, suggested use, warnings, UPC, weight and best-by date, charged as 'Product with details'. Also accepts 'productIds'.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max products per keyword or list",
            "minimum": 1,
            "type": "integer",
            "description": "Upper limit of products for each keyword and each category or search link, for example 30 (the default) or 1000. Product links are not limited by it. You pay per product delivered, so this caps the cost of each keyword. Also accepts 'maxResults' and 'maxProducts'.",
            "default": 30
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "default",
              "featured",
              "relevance",
              "best_sellers",
              "top_rated",
              "most_rated",
              "price_asc",
              "price_desc",
              "newest",
              "highest_discount"
            ],
            "type": "string",
            "description": "Same options as the iHerb sort menu. 'iHerb default' keeps the order of the link (or Featured for keywords).",
            "default": "default"
          },
          "inStockOnly": {
            "title": "In stock only",
            "type": "boolean",
            "description": "Skip products that iHerb shows as out of stock. Skipped products are not charged.",
            "default": false
          },
          "onSaleOnly": {
            "title": "Discounted only",
            "type": "boolean",
            "description": "Keep only products with a discount (list price above the current price). Tip: combine with 'Highest discount' sort to find deals fast.",
            "default": false
          },
          "includeDetails": {
            "title": "Add full product details",
            "type": "boolean",
            "description": "On: every product from keywords and lists also gets description, ingredients, supplement facts (structured), suggested use, warnings, UPC, shipping weight, dimensions, best-by date, category paths, images and star breakdown. Charged as 'Product with details' instead of 'Product delivered'. Product links always include details.",
            "default": false
          },
          "country": {
            "title": "Country (prices and currency)",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "NZ",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "IE",
              "CH",
              "SE",
              "PL",
              "JP",
              "KR",
              "CN",
              "HK",
              "TW",
              "SG",
              "MY",
              "TH",
              "PH",
              "IN",
              "AE",
              "SA",
              "KW",
              "QA",
              "IL",
              "TR",
              "MX",
              "BR",
              "CL",
              "CO",
              "ZA"
            ],
            "type": "string",
            "description": "The iHerb store whose prices, currency and stock you want. iHerb prices differ by country. Also accepts 'countryCode'.",
            "default": "US"
          },
          "currency": {
            "title": "Currency (optional)",
            "type": "string",
            "description": "Three-letter code such as USD, EUR or GBP to override the country's own currency. Leave empty to use the currency of the chosen country. The currency iHerb actually answered with is in every row."
          },
          "includeReviews": {
            "title": "Add customer reviews",
            "type": "boolean",
            "description": "On: each product delivered is followed by its reviews (one row each, type 'review'): rating, title, text, English translation, language, date, verified purchase, helpful votes and photos. Reviewer names and countries are never collected. Charged per review.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Reviews per product",
            "minimum": 0,
            "type": "integer",
            "description": "How many reviews to collect from each product when reviews are on (default 10). Popular products have thousands. Also accepts 'maxReviews'.",
            "default": 10
          },
          "reviewsSort": {
            "title": "Review order",
            "enum": [
              "most_relevant",
              "newest",
              "most_helpful"
            ],
            "type": "string",
            "description": "Same options as the review list on the product page.",
            "default": "most_relevant"
          },
          "reviewsRating": {
            "title": "Only reviews with",
            "enum": [
              "all",
              "5",
              "4",
              "3",
              "2",
              "1"
            ],
            "type": "string",
            "description": "Keep only reviews with this star rating, for example 1 star to study complaints.",
            "default": "all"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy by default, at no extra price for you. Change it only if you know you need to.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}