{
  "openapi": "3.0.1",
  "info": {
    "title": "Subreddit Trend Finder",
    "description": "Catch trending Reddit posts before and as they go viral. Scans multiple subreddits simultaneously, scores content by real engagement velocity, and surfaces the fastest-rising posts ranked by momentum — not just raw upvotes. Built for marketers, social media managers, journalists, and creators.",
    "version": "1.0",
    "x-build-id": "vZJmpMHz9EjWGVAu5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sentry~subreddit-trend-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sentry-subreddit-trend-finder",
        "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/sentry~subreddit-trend-finder/runs": {
      "post": {
        "operationId": "runs-sync-sentry-subreddit-trend-finder",
        "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/sentry~subreddit-trend-finder/run-sync": {
      "post": {
        "operationId": "run-sync-sentry-subreddit-trend-finder",
        "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": [
          "subreddits"
        ],
        "properties": {
          "subreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Which subreddits to scan for trending content. Add one per line. Accepts any format — bare name (gaming), prefixed (r/gaming), or full URL (https://reddit.com/r/gaming). Duplicates are ignored automatically.",
            "items": {
              "type": "string"
            }
          },
          "fetchHot": {
            "title": "Include Hot posts",
            "type": "boolean",
            "description": "Include posts that are currently getting high engagement. Good for capturing what's already trending right now.",
            "default": true
          },
          "fetchRising": {
            "title": "Include Rising posts",
            "type": "boolean",
            "description": "Include posts that are gaining momentum unusually fast. This is the strongest signal for catching trends before they peak — recommended to keep on.",
            "default": true
          },
          "fetchNew": {
            "title": "Include New posts",
            "type": "boolean",
            "description": "Include recently posted content. Posts here that are already gaining early traction get surfaced as emerging trends.",
            "default": true
          },
          "postType": {
            "title": "Post Type",
            "enum": [
              "all",
              "links_only",
              "self_only"
            ],
            "type": "string",
            "description": "Filter which types of posts to include in results.\n\n• All posts — everything, mixed together\n• Links only — posts that point to an external article, image, or video\n• Text/self posts only — discussions and write-ups posted directly to the subreddit\n\nTo get both types but in separate output datasets, choose 'All posts' and enable 'Separate Datasets' below.",
            "default": "all"
          },
          "separateDatasets": {
            "title": "Separate Datasets for Links vs Text Posts",
            "type": "boolean",
            "description": "Only takes effect when Post Type is set to 'All posts'. When enabled, link posts and text/self posts are saved to two separate named datasets ('link-posts' and 'text-posts') instead of being mixed into one. Useful if you're piping the output into different workflows.",
            "default": false
          },
          "postsPerFeed": {
            "title": "Posts Per Source",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many posts to collect per content source per subreddit. Higher values give broader coverage and surface more potential trends, but take longer to run. Maximum is 100.",
            "default": 25
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "type": "integer",
            "description": "How many posts to include in the final output, ranked by trend score. All collected posts are scored first, then only the top N are saved. Increase this if you're scanning many subreddits and want more coverage.",
            "default": 50
          },
          "minScore": {
            "title": "Minimum Upvote Score",
            "minimum": 0,
            "type": "integer",
            "description": "Filters out posts with fewer upvotes than this threshold. Useful for cutting out brand-new posts with no traction yet that would otherwise add noise to results. Set to 0 to include everything.",
            "default": 5
          },
          "trackChanges": {
            "title": "Track Score Changes Between Runs",
            "type": "boolean",
            "description": "Turns on monitor mode. Each run records a snapshot of post scores, and subsequent runs include a 'scoreDelta' field showing how much each post has grown since the last snapshot.\n\nDesigned for use with Apify's scheduled runs (e.g. every 6 hours). The first run establishes the baseline — scoreDelta will be null. From the second run onward, deltas are populated.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for routing requests. Residential proxies are strongly recommended for reliable results. Defaults to Apify's residential proxy pool.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}