{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Review Defect Finder",
    "description": "Paste an Amazon product URL and see which complaints are real patterns. It fetches the critical reviews and returns each recurring fault, how many separate reviewers named it, how many times it was mentioned, the first and last date seen, the worst star rating, and their exact words.",
    "version": "0.2",
    "x-build-id": "BxTQ1gNfdOB7a5O6K"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pradio~amazon-defect-ledger/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pradio-amazon-defect-ledger",
        "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/pradio~amazon-defect-ledger/runs": {
      "post": {
        "operationId": "runs-sync-pradio-amazon-defect-ledger",
        "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/pradio~amazon-defect-ledger/run-sync": {
      "post": {
        "operationId": "run-sync-pradio-amazon-defect-ledger",
        "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": {
          "productUrls": {
            "title": "Amazon product URL(s)",
            "type": "array",
            "description": "Paste one or more Amazon product URLs and this fetches the critical reviews itself, then builds the ledger. Only 1-3 star reviews are fetched, so you are not billed for reviews that cannot produce a finding. The fetch runs a separate review-scraper Actor on YOUR account and its publisher bills you for that run, on top of this one. Leave blank if you already have review data and are using the fields below instead. Left empty, this Actor runs on the worked example below so you can see a real ledger for free before spending anything.",
            "items": {
              "type": "string"
            }
          },
          "maxReviews": {
            "title": "Maximum reviews to fetch",
            "minimum": 1,
            "type": "integer",
            "description": "Caps how many CRITICAL reviews are fetched. Five-star reviews are never requested, so this is the number the review scraper bills you for. On a free Apify plan the scraper returns at most 10 whatever you set here. Only applies when you give a product URL.",
            "default": 100
          },
          "reviewsScraperActor": {
            "title": "Review scraper to use",
            "type": "string",
            "description": "Which Store Actor fetches the reviews. The default is the most used Amazon review scraper on the Store. Change it if you prefer another; it must return objects carrying the review text, a rating, a reviewer id and a date.",
            "default": "junglee/amazon-reviews-scraper"
          },
          "reviews": {
            "title": "Reviews",
            "type": "array",
            "description": "Array of review objects, each with the text under text or reviewDescription, the score under rating or ratingScore, plus userId and date. Supply these OR reviewsDatasetId. Accepts output from any Amazon review scraper or a manual export. Arrives filled with a worked example, so pressing Start produces a real ledger before you change anything.",
            "default": [
              {
                "userId": "R1",
                "date": "2026-03-02",
                "ratingScore": 2,
                "reviewDescription": "The left earbud stopped charging after about four months. Case shows it at 100% but it is dead."
              },
              {
                "userId": "R2",
                "date": "2026-03-19",
                "ratingScore": 1,
                "reviewDescription": "Left bud stopped charging completely around month five. Right one is fine."
              },
              {
                "userId": "R3",
                "date": "2026-04-07",
                "ratingScore": 2,
                "reviewDescription": "Battery died on the left earbud after four months of light use. Very disappointing."
              },
              {
                "userId": "R4",
                "date": "2026-02-11",
                "ratingScore": 1,
                "reviewDescription": "Case hinge snapped in my pocket within a few weeks. The plastic is far too thin."
              },
              {
                "userId": "R5",
                "date": "2026-05-02",
                "ratingScore": 2,
                "reviewDescription": "The hinge on the charging case broke after about three weeks of normal use."
              },
              {
                "userId": "R6",
                "date": "2026-05-14",
                "ratingScore": 1,
                "reviewDescription": "Hinge cracked and now the case will not stay shut at all."
              },
              {
                "userId": "R7",
                "date": "2026-01-30",
                "ratingScore": 3,
                "reviewDescription": "Did not like the colour, it is more grey than silver in person."
              }
            ]
          },
          "reviewsDatasetId": {
            "title": "…or an Apify dataset ID",
            "type": "string",
            "description": "Instead of pasting reviews, give the dataset ID of a run that produced them — for example an Amazon Reviews Scraper run. Items are read from that dataset and used as the reviews. This is what makes the Actor chainable: in an Integration, set this to {{resource.defaultDatasetId}} and a scraper run will feed this one automatically. Leave blank if you are supplying reviews directly."
          },
          "minCorroboration": {
            "title": "Minimum corroborating reviewers",
            "minimum": 2,
            "maximum": 50,
            "type": "integer",
            "description": "A defect must be named by at least this many DISTINCT reviewers to appear in the ledger",
            "default": 3
          },
          "productName": {
            "title": "Product name",
            "type": "string",
            "description": "Human-readable product label for the ledger entries",
            "default": ""
          },
          "linkUrl": {
            "title": "Link to put on every row",
            "type": "string",
            "description": "Copied onto every row so you can click back to the product. Only needed when you supply reviews yourself — if you gave a product URL above, that one is used automatically. Never fetched: this Actor does not guess which Amazon marketplace your reviews came from, so a link it invented would be wrong for every .co.uk, .de and .co.jp set."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}