{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Sentiment Tracker",
    "description": "Reddit sentiment analysis for brands: every Reddit mention of a brand or keyword scored positive, negative or neutral, with a sentiment % breakdown, a verdict and the top posts per keyword. For social listening. $0.79 per 1,000 mentions on Starter, 4.5x under the most-used Reddit scraper's price.",
    "version": "2.1",
    "x-build-id": "lHU7b8RUwURMohO8j"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~reddit-sentiment-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-reddit-sentiment-tracker",
        "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/deepmine~reddit-sentiment-tracker/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-reddit-sentiment-tracker",
        "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/deepmine~reddit-sentiment-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-reddit-sentiment-tracker",
        "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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords to Analyse",
            "minItems": 1,
            "type": "array",
            "description": "Brand names, product names, or topics to analyse on Reddit. Each keyword is searched independently — results show sentiment breakdown per keyword. A brand that is also an everyday word (Linear, Notion, Slack, Apple) matches the ordinary word too: add a word that gives it context, like \"Linear app\", set Match to Exact phrase, or restrict the subreddits below (for example productivity, SaaS).",
            "items": {
              "type": "string",
              "pattern": "\\S"
            }
          },
          "sortBy": {
            "title": "Sort Results By",
            "enum": [
              "new",
              "relevance",
              "top",
              "hot",
              "comments"
            ],
            "type": "string",
            "description": "How Reddit ranks the results returned for each keyword.\n\n• New — most recent mentions first. Best for catching fresh opinions.\n• Relevance — Reddit's own relevance ranking.\n• Top — highest-scored posts. Good for seeing what resonated most.\n• Hot — currently active discussions.\n• Most Comments — most-discussed threads.",
            "default": "new"
          },
          "timeFilter": {
            "title": "Time Window",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Only return mentions posted within this time window.",
            "default": "week"
          },
          "searchPosts": {
            "title": "Analyse Posts",
            "type": "boolean",
            "description": "Analyse Reddit posts (links, articles, discussions) that mention your keyword.",
            "default": true
          },
          "searchComments": {
            "title": "Analyse Comments",
            "type": "boolean",
            "description": "Also analyse individual comments mentioning your keywords. Catches opinions buried inside threads. Increases run time.",
            "default": false
          },
          "subredditFilter": {
            "title": "Restrict to Subreddits (optional)",
            "type": "array",
            "description": "Optionally restrict analysis to specific subreddits. Leave empty to search all of Reddit. Accepts any format: gaming, r/gaming, or full URL. Example for a software brand: productivity, SaaS, startups.",
            "items": {
              "type": "string",
              "pattern": "\\S"
            },
            "default": []
          },
          "maxResultsPerKeyword": {
            "title": "Max Results Per Keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of posts, and of comments, to analyse per keyword (each counted after your Minimum Upvote Score). More results = more accurate sentiment breakdown but longer run time.",
            "default": 100
          },
          "minScore": {
            "title": "Minimum Upvote Score",
            "minimum": 0,
            "type": "integer",
            "description": "Ignore mentions with fewer upvotes than this. Set to 0 to include brand-new posts with no votes yet.",
            "default": 0
          },
          "includeSummaryRows": {
            "title": "Summary Rows (free)",
            "type": "boolean",
            "description": "Saves one summary row per keyword (mentions, positive / negative / neutral ratios, average sentiment, top positive and negative mention) in the run's free Summary dataset (its link is in the OUTPUT record, summaryDataset). Summary rows are never charged: only mention rows are. The same summaries are always in the free SUMMARY record. Up to version 2.0.4 these rows came after the mentions in the results, at a row's price each.",
            "default": true
          },
          "matchMode": {
            "title": "Match",
            "enum": [
              "any",
              "all",
              "phrase"
            ],
            "type": "string",
            "description": "How closely a post or comment must match your keyword.\n\n• Reddit's match — whatever Reddit's search finds for the words (it also matches word stems and other fields, so some results only touch the keyword).\n• Every word — the post's title and text (or the comment) must hold every word of the keyword, in any order.\n• Exact phrase — the words in a row, as typed (case, punctuation and line breaks don't matter).\n\nResults that don't match aren't delivered and aren't charged. For a brand that is also an everyday word, Exact phrase with a context word (\"Linear app\") is the precise choice.",
            "default": "any"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Reddit answers Apify's datacenter proxy, so the default works for every plan. If you pick residential, the run still reads through datacenter and keeps residential for retries Reddit refuses there (charged to the run's own proxy traffic only when needed).",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}