{
  "openapi": "3.0.1",
  "info": {
    "title": "Multi-Platform Viral Content Tracker",
    "description": "Track what's going viral on a topic across YouTube and Reddit in ONE run and ONE normalized schema. Ranked by viral velocity (engagement gained per hour). Stop stitching a separate scraper per platform. Pay per item.",
    "version": "0.1",
    "x-build-id": "BgspjeHrMtth260Cd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bovi~multi-platform-viral-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bovi-multi-platform-viral-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/bovi~multi-platform-viral-tracker/runs": {
      "post": {
        "operationId": "runs-sync-bovi-multi-platform-viral-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/bovi~multi-platform-viral-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-bovi-multi-platform-viral-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",
        "properties": {
          "keywords": {
            "title": "Topics / keywords",
            "type": "array",
            "description": "Topics to track, e.g. [\"ai agents\", \"home espresso\"]. Each is searched on every selected platform.",
            "items": {
              "type": "string"
            }
          },
          "subreddits": {
            "title": "Subreddits (for Reddit)",
            "type": "array",
            "description": "Subreddits to track for viral posts this week (without r/), e.g. [\"artificial\", \"singularity\"]. Reddit is tracked per-subreddit because reddit.com blocks free-text bot search. Leave empty to skip Reddit.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags (for TikTok)",
            "type": "array",
            "description": "TikTok hashtags for topic discovery — what is going viral on a THEME right now (without #), e.g. [\"homeespresso\", \"aiagents\"]. Fetched via a resilient browser tier. Leave empty to skip TikTok hashtag discovery.",
            "items": {
              "type": "string"
            }
          },
          "tiktokHandles": {
            "title": "TikTok handles",
            "type": "array",
            "description": "TikTok accounts to track (without @), e.g. [\"tiktok\"]. Returns their recent videos velocity-ranked. Leave empty to skip.",
            "items": {
              "type": "string"
            }
          },
          "instagramHandles": {
            "title": "Instagram handles",
            "type": "array",
            "description": "Instagram accounts to track (without @), e.g. [\"instagram\"]. Returns their recent posts/reels velocity-ranked. Instagram has no public hashtag search without login, so it is handle-only. Leave empty to skip.",
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Which platforms to track. Default: all supported. Each is fed by its own input (YouTube←keywords, Reddit←subreddits, TikTok←hashtags/tiktokHandles, Instagram←instagramHandles) and skips gracefully if its input is empty.",
            "items": {
              "type": "string",
              "enum": [
                "youtube",
                "reddit",
                "tiktok",
                "instagram"
              ],
              "enumTitles": [
                "YouTube",
                "Reddit",
                "TikTok",
                "Instagram"
              ]
            },
            "default": [
              "youtube",
              "reddit",
              "tiktok",
              "instagram"
            ]
          },
          "maxPerPlatform": {
            "title": "Max items per platform (per topic)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many items to pull from each platform for each topic before ranking.",
            "default": 25
          },
          "maxItems": {
            "title": "Max total items returned",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the ranked output across all platforms/topics. 0 = no cap (you are charged per returned item).",
            "default": 0
          },
          "sortBy": {
            "title": "Rank by",
            "enum": [
              "velocity_score",
              "engagement",
              "views",
              "likes",
              "comments",
              "posted_at"
            ],
            "type": "string",
            "description": "velocity_score = engagement per hour since posting (viral velocity); engagement = total interactions; or sort by views/likes/comments/recency.",
            "default": "velocity_score"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Used for YouTube, TikTok and Instagram (TikTok/Instagram reject datacenter IPs; Reddit's open API needs no proxy). Leave default RESIDENTIAL for reliable access.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}