{
  "openapi": "3.0.1",
  "info": {
    "title": "Low Rating Review Analyzer — CSV & JSON",
    "description": "Analyze your authorized CSV/JSON product reviews. Find candidate complaint themes with evidence IDs, sample sizes and multilingual uncertainty. No review-site scraping.",
    "version": "1.0",
    "x-build-id": "7PUFUOoWFupEd51G4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/afkdigital~low-rating-review-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-afkdigital-low-rating-review-analyzer",
        "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/afkdigital~low-rating-review-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-afkdigital-low-rating-review-analyzer",
        "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/afkdigital~low-rating-review-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-afkdigital-low-rating-review-analyzer",
        "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": [
          "rightsConfirmed",
          "aiProcessingConfirmed"
        ],
        "properties": {
          "inputMode": {
            "title": "Review source",
            "enum": [
              "demo",
              "json",
              "csv",
              "upload"
            ],
            "type": "string",
            "description": "Built-in CC0 synthetic demo is safe to try without uploading data. For your CSV/JSON select the corresponding mode and explicitly confirm both processing permissions.",
            "default": "demo"
          },
          "reviews": {
            "title": "JSON reviews",
            "type": "array",
            "description": "JSON mode only. Paste your own authorized records here (not used by synthetic demo). text/rating required; id/date/helpfulVotes/language optional.",
            "items": {
              "type": "object"
            }
          },
          "csvText": {
            "title": "CSV text",
            "type": "string",
            "description": "Used in CSV mode. Include text,rating headers or configure fieldMapping. UTF-8; quoted commas and multiline text supported."
          },
          "reviewFileUrl": {
            "title": "Upload CSV or JSON file",
            "type": "string",
            "description": "Used in upload mode. Only HTTPS api.apify.com/v2/key-value-stores/.../records/... uploads are accepted; website URLs and redirects are rejected."
          },
          "fileFormat": {
            "title": "Uploaded file format",
            "enum": [
              "auto",
              "csv",
              "json"
            ],
            "type": "string",
            "description": "Auto inspects the first non-whitespace character. JSON root must be an array or an object containing only a reviews array.",
            "default": "auto"
          },
          "rightsConfirmed": {
            "title": "I am authorized to process these reviews",
            "type": "boolean",
            "description": "Required for customer CSV/JSON uploads, not for the fixed built-in CC0 synthetic demo. This box is never automatically checked for your data.",
            "default": false
          },
          "aiProcessingConfirmed": {
            "title": "I agree to the disclosed AI processing",
            "type": "boolean",
            "description": "Required for your own review data; not for the fixed built-in synthetic demo. Cleaned text goes through Apify -> OpenRouter -> Azure/OpenAI. Explicitly check for customer content.",
            "default": false
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 1,
            "maximum": 5,
            "type": "number",
            "description": "Inclusive lower bound on the 1–5 star scale.",
            "default": 1
          },
          "maxRating": {
            "title": "Maximum rating",
            "minimum": 1,
            "maximum": 5,
            "type": "number",
            "description": "Inclusive upper bound. Default selects 1–3-star reviews. Not sentiment scoring.",
            "default": 3
          },
          "language": {
            "title": "Language selection",
            "enum": [
              "auto",
              "en",
              "es",
              "fr",
              "de",
              "tr"
            ],
            "type": "string",
            "description": "Auto uses a supplied row language or tentative rule detection. A selected language filters known other languages; undetermined text uses a disclosed assumption. Mixed text is excluded by a selected-language filter.",
            "default": "auto"
          },
          "maxReviews": {
            "title": "Maximum accepted reviews",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum unique, valid, selected reviews to deliver and charge. 1–10,000. The run event spending limit may lower this. Official model-gateway usage is separately metered; see README pricing.",
            "default": 1000
          },
          "minThemeReviews": {
            "title": "Minimum reviews for a recurring theme",
            "minimum": 2,
            "maximum": 50,
            "type": "integer",
            "description": "A candidate theme needs this many distinct analyzed reviews to be marked recurring. Isolated mentions remain visible.",
            "default": 2
          },
          "fieldMapping": {
            "title": "Optional export column mapping",
            "type": "object",
            "description": "Canonical-to-export names. Example: {\"id\":\"review_id\",\"rating\":\"stars\",\"text\":\"body\"}. Supported keys: id,text,rating,date,helpfulVotes,language,productId,source. Person/profile columns are ignored.",
            "default": {}
          },
          "csvDelimiter": {
            "title": "CSV delimiter",
            "enum": [
              ",",
              ";",
              "\t"
            ],
            "type": "string",
            "description": "Choose comma, semicolon, or tab for pasted/uploaded CSV.",
            "default": ","
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}