{
  "openapi": "3.0.1",
  "info": {
    "title": "Sentiment Analysis - Reviews, Reddit & Comments to Insights",
    "description": "Sentiment analysis of reviews, Reddit posts and comments you already have: per text sentiment, product issue, product names and exact sentences, plus AI issue analysis and issue clusters (on by default). 1,000 texts: about $17.60 on BRONZE, $1.60 rules only. Reads Actor datasets and CSV.",
    "version": "0.1",
    "x-build-id": "wdBt1ZA71AsLHVnc3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ntriqpro~sentiment-analysis-product-insights/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ntriqpro-sentiment-analysis-product-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/ntriqpro~sentiment-analysis-product-insights/runs": {
      "post": {
        "operationId": "runs-sync-ntriqpro-sentiment-analysis-product-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/ntriqpro~sentiment-analysis-product-insights/run-sync": {
      "post": {
        "operationId": "run-sync-ntriqpro-sentiment-analysis-product-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": "Datasets of other Actors",
            "type": "array",
            "description": "IDs of datasets in your Apify account (for example the results of a Reddit, app review or comment scraper run). They are read with this run's own token; the run-start fee pays for reading the first 1,000 rows of all sources together, each further 1,000 rows read is a rows-read event (paid plans). Common text fields are found by themselves (text, body, content, reviewText, review, comment, selftext, caption, message…); notice and summary rows of other Actors are left out. A Reddit post with a title and a body is analysed as one text.",
            "items": {
              "type": "string"
            }
          },
          "csvUrls": {
            "title": "CSV, JSON or JSONL file addresses",
            "type": "array",
            "description": "Public http(s) addresses of files with one text per row (a support-ticket export, a review export…). CSV needs a header row; headers are matched without letter case, spaces or underscores (\"Review Text\" = reviewText). Up to 20 MB a file; its rows count as rows read (the first 1,000 rows of all sources are in the run-start fee). Addresses inside private networks are refused.",
            "items": {
              "type": "string"
            }
          },
          "texts": {
            "title": "Texts",
            "type": "array",
            "description": "Texts pasted here, one per entry. In JSON you can also give objects: { \"text\": \"…\", \"url\": \"…\", \"id\": \"…\", \"date\": \"…\" }. Rows with different ids are different texts even when their words are the same; the AI analyses one wording once.",
            "items": {
              "type": "string"
            }
          },
          "textField": {
            "title": "Text field name (optional)",
            "type": "string",
            "description": "The field that holds the text, when it has a name we do not find by ourselves. Tried before the common names."
          },
          "productHints": {
            "title": "Your product and feature names",
            "type": "array",
            "description": "Names you want texts sorted by (for example \"battery\", \"app\", \"camera\", \"충전기\"). A text that names one gets it in `targets`; the AI and the clusters use the names the text itself writes. Up to 30, each up to 60 characters.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Language of the texts",
            "enum": [
              "auto",
              "en",
              "ko"
            ],
            "type": "string",
            "description": "\"auto\" reads each text with the English and the Korean word lists; \"en\" or \"ko\" uses one list only. The AI reads any language.",
            "default": "auto"
          },
          "aiInsights": {
            "title": "AI analysis (beta, paid plans)",
            "type": "boolean",
            "description": "For each text: up to three product issues, each with its category, the product or feature it is about, a one-line summary and the exact passage of the text it rests on. The AI reads the whole text the row holds (up to 5,000 characters). On by default. Charged per checked analysis (insight-extracted, $0.016 on BRONZE): 1,000 texts with it on cost about $17.60 on BRONZE (run start + rules + AI), $1.60 with it off. Answers that fail our checks are thrown away and not charged. When on, the texts are sent to the Anthropic API (United States) with e-mail addresses and phone numbers removed. Free plan: locked (no model is asked).",
            "default": true
          },
          "aiMaxTexts": {
            "title": "Most texts analysed by AI",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Paid plans. The first this many texts of the run get an AI analysis; the rest keep the rule verdict.",
            "default": 1000
          },
          "clusters": {
            "title": "Issue clusters (paid plans)",
            "type": "boolean",
            "description": "On by default. After the texts: one row for each problem that 3 or more texts raise - the same category, the same product name (or none named) and the same issue topic (battery life, overheating, charging, crashes…) - with how many, their share, their sentiment, 1 to 3 quotes and source links. Charged per cluster row (issue-cluster, $0.04 on BRONZE; the default 50 rows at most add $2.00). Free plan: no cluster is made; the preview row gives the bound a paid run can reach (maxClusters), not a count of your texts.",
            "default": true
          },
          "maxClusters": {
            "title": "Most cluster rows",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Paid plans. The largest clusters first.",
            "default": 50
          },
          "maxTexts": {
            "title": "Most texts a run",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Paid plans: up to 20,000 (default 1,000). Free plan: 1, whatever is set here; the free preview uses this value to estimate this run and how many runs the whole input takes. Texts are counted after duplicates are removed; every run stays within its maximum charge. When the input holds more, the run's last rows give the startAt of the next run.",
            "default": 1000
          },
          "maxItemsPerSource": {
            "title": "Most rows read from one dataset or file",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows read from each dataset or text file. A source with more rows is cut here; the run's summary row says so for that source (`readCut: \"maxItemsPerSource\"`). Rows read past the first 1,000 of all sources together are charged as `rows-read` (paid plans, per 1,000 or part).",
            "default": 20000
          },
          "startAt": {
            "title": "Start at text",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "To go on from an earlier run of the same input: the texts before this place (in input order, each once, counted as the run counts them) are passed over - not analysed or charged as texts. The earlier run's input-limit row and status give the exact value (nextStartAt). The passed-over rows are still read and count as rows read. 0: from the first text.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}