{
  "openapi": "3.0.1",
  "info": {
    "title": "ALL-IN-ONE market sentiment marker",
    "description": "Type in a brand, get one number back. Scans Instagram, TikTok, YouTube and the news, classifies every voice, and returns a single Market Sentiment Index (-100 to +100) plus competitor benchmarks. Free news tier, no API key.",
    "version": "0.0",
    "x-build-id": "AeXU4p2pBdHb52Qe6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/angseesiang~all-in-one-market-sentiment-marker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-angseesiang-all-in-one-market-sentiment-marker",
        "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/angseesiang~all-in-one-market-sentiment-marker/runs": {
      "post": {
        "operationId": "runs-sync-angseesiang-all-in-one-market-sentiment-marker",
        "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/angseesiang~all-in-one-market-sentiment-marker/run-sync": {
      "post": {
        "operationId": "run-sync-angseesiang-all-in-one-market-sentiment-marker",
        "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": [
          "brand"
        ],
        "properties": {
          "brand": {
            "title": "Brand / product / company",
            "type": "string",
            "description": "The brand, product, company or topic you want to measure sentiment for. This is the only required field."
          },
          "keywords": {
            "title": "Search keywords",
            "uniqueItems": true,
            "type": "array",
            "description": "Extra search terms used for news and for TikTok/YouTube search. Defaults to the brand name. Add product lines, slogans or misspellings to widen the net.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "uniqueItems": true,
            "type": "array",
            "description": "Hashtags used to discover Instagram and TikTok posts (without the `#`). Defaults to the brand name with spaces stripped.",
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "Platforms to scan",
            "uniqueItems": true,
            "type": "array",
            "description": "Which channels to listen to. **News is free.** Instagram, TikTok and YouTube each call a paid public Actor, billed to your account — see the README for costs.",
            "items": {
              "type": "string",
              "enum": [
                "news",
                "instagram",
                "tiktok",
                "youtube"
              ],
              "enumTitles": [
                "News — Google News (free, no extra cost)",
                "Instagram — posts + comments (paid Actor)",
                "TikTok — posts + comments (paid Actor)",
                "YouTube — videos + comments (paid Actor)"
              ]
            },
            "default": [
              "news"
            ]
          },
          "competitors": {
            "title": "Competitors to benchmark",
            "uniqueItems": true,
            "type": "array",
            "description": "Optional. Each competitor is scored the same way (via news) so you get a side-by-side sentiment comparison against your brand.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerPlatform": {
            "title": "Max posts per platform",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many posts/videos to discover per social platform. Drives cost — each post's comments are then scraped.",
            "default": 10
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many comments to collect from each discovered post/video.",
            "default": 50
          },
          "maxNewsPerQuery": {
            "title": "Max news headlines per keyword",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many news headlines to pull per keyword (and per competitor). Free.",
            "default": 50
          },
          "maxItems": {
            "title": "Maximum dataset items",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on rows pushed to the dataset. `0` = no limit. The sentiment marker row is always written first.",
            "default": 0
          },
          "includeRawItems": {
            "title": "Include raw posts / comments / headlines",
            "type": "boolean",
            "description": "Also output every individual post, comment and headline with its own sentiment label. Turn off if you only want the scores.",
            "default": true
          },
          "sentimentEngine": {
            "title": "Sentiment engine",
            "enum": [
              "lexicon",
              "llm"
            ],
            "type": "string",
            "description": "**Lexicon** is fast, free and deterministic (no API key). **LLM** additionally re-checks the items the lexicon calls neutral, using your own OpenAI-compatible key.",
            "default": "lexicon"
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Only used when the engine is set to LLM. Your key is used to re-classify ambiguous items and is never stored."
          },
          "llmModel": {
            "title": "LLM model",
            "type": "string",
            "description": "Model name for the LLM refine step.",
            "default": "gpt-4o-mini"
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy for the direct (news) requests. Usually unnecessary.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}