{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Reviews Analyzer: Complaints, Themes & Trends",
    "description": "Turns Amazon reviews you already have (any reviews scraper dataset, CSV or JSON) into insights: complaint and praise themes with quotes, star trend by month, verified vs not, variants, keywords, review-pattern signals and a competitor benchmark. Never requests Amazon.",
    "version": "0.1",
    "x-build-id": "S9xVLpHL2kGgRMZL1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/badr_xba~amazon-review-insights/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-badr_xba-amazon-review-insights",
        "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/badr_xba~amazon-review-insights/runs": {
      "post": {
        "operationId": "runs-sync-badr_xba-amazon-review-insights",
        "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/badr_xba~amazon-review-insights/run-sync": {
      "post": {
        "operationId": "run-sync-badr_xba-amazon-review-insights",
        "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": {
          "datasetIds": {
            "title": "Apify datasets with reviews",
            "type": "array",
            "description": "Pick (or paste the ID of) one or more datasets made by an Amazon reviews scraper. The output fields of junglee, axesso_data, web_wanderer, delicious_zebu, jaybird and epctex review scrapers are mapped field by field, plus generic names (asin, rating / stars, text / body / content, title, date, verified, variant, helpful). Read only."
          },
          "fileUrls": {
            "title": "File URLs (CSV / JSON / JSON Lines)",
            "type": "array",
            "description": "http(s) links to your own review exports: CSV with a header row (comma, semicolon or tab), a JSON array (or an object with items / data / reviews), or JSON Lines. Amazon pages are refused: give the data, not the Amazon page.",
            "items": {
              "type": "string"
            }
          },
          "reviews": {
            "title": "Reviews pasted as JSON",
            "type": "array",
            "description": "Optional: a few reviews pasted directly, e.g. [{\"asin\":\"B0XXXXXXXX\",\"rating\":2,\"text\":\"Battery died after a week\",\"date\":\"2025-03-02\"}]."
          },
          "asins": {
            "title": "Only these ASINs",
            "type": "array",
            "description": "Keep only the reviews of these ASINs (parent or variant). Empty = every product in your data (no skipped record). <b>Billing:</b> each review with text that this filter leaves out is charged as a <b>skipped record</b> ($0.02 per 1,000 on the Free plan, less on paid plans), because it was still read. Duplicates and rating-only rows are never charged. Cheapest: filter in your scraper and leave this empty.",
            "items": {
              "type": "string"
            }
          },
          "myAsins": {
            "title": "Your own ASINs",
            "type": "array",
            "description": "Marked as \"yours\" in the report and listed first; with 2+ products they are compared with the others (themes where you get more complaints).",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Reviews from (date)",
            "type": "string",
            "description": "Keep only reviews written on or after this day (YYYY-MM-DD). Reviews without a readable date are left out when this is set. Empty = all dates (no skipped record). <b>Billing:</b> each review with text that this filter leaves out is charged as a <b>skipped record</b> ($0.02 per 1,000 on the Free plan, less on paid plans), because it was still read. Duplicates and rating-only rows are never charged. Cheapest: filter in your scraper and leave this empty."
          },
          "maxReviewsPerProduct": {
            "title": "Max reviews per product",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "0 = all (no skipped record). Otherwise the newest N reviews of each product are analysed (and charged as analysed reviews); the older reviews with text are left out and charged as <b>skipped records</b> ($0.02 per 1,000 on the Free plan, less on paid plans), because they were still read. Duplicates and rating-only rows are never charged.",
            "default": 0
          },
          "saveEnrichedReviews": {
            "title": "Save enriched reviews",
            "type": "boolean",
            "description": "Also save REVIEWS_ENRICHED in the key-value store: one line per analysed review with sentiment, complaint / praise themes, language and word count (no author data).",
            "default": false
          },
          "failRunOnError": {
            "title": "Fail the run on input errors",
            "type": "boolean",
            "description": "Off (default): a wrong input ends SUCCEEDED with a clear message and nothing charged. On: the run ends FAILED (useful in pipelines).",
            "default": false
          },
          "requestTimeoutSecs": {
            "title": "File download timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Per file URL.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}