{
  "openapi": "3.0.1",
  "info": {
    "title": "Product Reviews with Sentiment Analysis",
    "description": "Collect product reviews, enrich each with sentiment, and generate a per-product sentiment report.",
    "version": "0.0",
    "x-build-id": "nxzjdGPVjdOZoKPd4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/e-commerce~product-reviews-sentiment/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-e-commerce-product-reviews-sentiment",
        "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/e-commerce~product-reviews-sentiment/runs": {
      "post": {
        "operationId": "runs-sync-e-commerce-product-reviews-sentiment",
        "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/e-commerce~product-reviews-sentiment/run-sync": {
      "post": {
        "operationId": "run-sync-e-commerce-product-reviews-sentiment",
        "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": {
          "searchKeywords": {
            "title": "Product keywords",
            "type": "array",
            "description": "Enter product keywords (for example \"wireless earbuds\"). Each keyword is searched on every selected marketplace and the best-matching product is analyzed. Use this instead of, or alongside, pasting product URLs below.",
            "items": {
              "type": "string"
            }
          },
          "searchSources": {
            "title": "Marketplaces to search",
            "type": "array",
            "description": "Which marketplaces each keyword is searched on (78 supported). Only applies to keyword search, not to pasted URLs.",
            "items": {
              "type": "string",
              "enum": [
                "academy",
                "ae",
                "albertsons",
                "aldi-uk",
                "alibaba",
                "allegro",
                "alza",
                "amazon",
                "anthropologie",
                "ao",
                "argos",
                "ariat",
                "asda-uk",
                "ashleyfurniture",
                "autozone",
                "barnesandnoble",
                "basspro",
                "bestbuy",
                "bjs",
                "bloomingdales",
                "bluemercury",
                "boots",
                "cdiscount",
                "chewy",
                "coles",
                "coop-uk",
                "costco",
                "cvs",
                "deliveroo",
                "dicks",
                "ebay",
                "galaxus-ch",
                "glovo",
                "goofish",
                "google-shopping",
                "harborfreight",
                "homedepot",
                "iceland-uk",
                "idealo",
                "ikea",
                "instacart",
                "insulationpoint",
                "john-lewis",
                "justeat",
                "kaufland",
                "kohls",
                "lidl-uk",
                "lowes",
                "macys",
                "mands-food-uk",
                "meijer",
                "menswearhouse",
                "mercadolibre",
                "morrisons-uk",
                "newegg",
                "noon",
                "nordstrom",
                "ocado-uk",
                "petco",
                "sainsburys-uk",
                "saloncentric",
                "sephora",
                "smyths",
                "spacenk",
                "staples-ca",
                "staples-us",
                "superdrug",
                "takealot",
                "taobao",
                "target",
                "tesco-uk",
                "tractorsupply",
                "ulta",
                "waitrose-uk",
                "walgreens",
                "walmart",
                "wayfair",
                "wolt"
              ],
              "enumTitles": [
                "Academy Sports + Outdoors",
                "American Eagle",
                "Albertsons",
                "Aldi (UK)",
                "Alibaba",
                "Allegro",
                "Alza",
                "Amazon",
                "Anthropologie",
                "AO",
                "Argos",
                "Ariat",
                "Asda (UK)",
                "Ashley Furniture",
                "AutoZone",
                "Barnes & Noble",
                "Bass Pro Shops",
                "Best Buy",
                "BJ’s Wholesale",
                "Bloomingdale’s",
                "Bluemercury",
                "Boots",
                "Cdiscount",
                "Chewy",
                "Coles",
                "Co-op (UK)",
                "Costco",
                "CVS",
                "Deliveroo",
                "Dick’s Sporting Goods",
                "eBay",
                "Galaxus (CH)",
                "Glovo",
                "Goofish",
                "Google Shopping",
                "Harbor Freight",
                "The Home Depot",
                "Iceland (UK)",
                "Idealo",
                "IKEA",
                "Instacart",
                "Insulation Point",
                "John Lewis",
                "Just Eat",
                "Kaufland",
                "Kohl’s",
                "Lidl (UK)",
                "Lowe’s",
                "Macy’s",
                "M&S Food (UK)",
                "Meijer",
                "Men’s Wearhouse",
                "Mercado Libre",
                "Morrisons (UK)",
                "Newegg",
                "Noon",
                "Nordstrom",
                "Ocado (UK)",
                "Petco",
                "Sainsbury’s (UK)",
                "SalonCentric",
                "Sephora",
                "Smyths Toys",
                "Space NK",
                "Staples (CA)",
                "Staples",
                "Superdrug",
                "Takealot",
                "Taobao",
                "Target",
                "Tesco (UK)",
                "Tractor Supply",
                "Ulta",
                "Waitrose (UK)",
                "Walgreens",
                "Walmart",
                "Wayfair",
                "Wolt"
              ]
            },
            "default": [
              "amazon",
              "ebay",
              "walmart",
              "mercadolibre"
            ]
          },
          "productReviewUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "Direct links to individual product pages on a supported marketplace. All reviews for each product are collected and analyzed.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "reviewListingUrls": {
            "title": "Review listing URLs",
            "type": "array",
            "description": "Links to category or listing pages that contain multiple products (for example a Walmart category page). Each product found on the page is collected and its reviews analyzed. Bounded by \"Maximum products\".",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sortReview": {
            "title": "Review sort type",
            "enum": [
              "Most recent",
              "Most relevant",
              "Most helpful",
              "Highest rated",
              "Lowest rated"
            ],
            "type": "string",
            "description": "How reviews are sorted before collection. Some marketplaces may not support all options and fall back to the default.",
            "default": "Most recent"
          },
          "additionalReviewProperties": {
            "title": "Include additional review properties",
            "type": "boolean",
            "description": "Includes additional marketplace-specific properties on each collected review."
          },
          "maxReviewsPerProduct": {
            "title": "Maximum reviews per product",
            "minimum": 1,
            "type": "integer",
            "description": "The maximum number of reviews to collect per product."
          },
          "maxProducts": {
            "title": "Maximum products",
            "minimum": 1,
            "type": "integer",
            "description": "Safety cap on how many distinct products are analyzed in one run. A sentiment report is generated (and charged) per product, so this bounds report spend.",
            "default": 25
          },
          "generateReport": {
            "title": "Generate per-product report",
            "type": "boolean",
            "description": "Off by default. When enabled, a full sentiment report is generated per product and stored in the key-value store. Each report is a paid event, so turn this on only when you want the reports.",
            "default": false
          },
          "reportFormat": {
            "title": "Report format",
            "enum": [
              "html",
              "pdf"
            ],
            "type": "string",
            "description": "Human-readable report written to the key-value store. A machine-readable JSON report is always written alongside it.",
            "default": "html"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}