{
  "openapi": "3.0.1",
  "info": {
    "title": "Cross-Platform Trend Radar",
    "description": "One ranked view of what's trending across TikTok, YouTube, Google Trends and Reddit — with velocity, cross-platform overlap, a 0-100 heat score, and an optional AI 'what to make this week' digest.",
    "version": "0.1",
    "x-build-id": "knjeZDJIhahF4RF0J"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yasaslive~cptr-trend-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yasaslive-cptr-trend-radar",
        "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/yasaslive~cptr-trend-radar/runs": {
      "post": {
        "operationId": "runs-sync-yasaslive-cptr-trend-radar",
        "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/yasaslive~cptr-trend-radar/run-sync": {
      "post": {
        "operationId": "run-sync-yasaslive-cptr-trend-radar",
        "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": {
          "sourceTiktok": {
            "title": "TikTok Creative Center",
            "type": "boolean",
            "description": "Trending hashtags, songs and videos from TikTok's public Creative Center (no login; uses residential proxy).",
            "default": true
          },
          "sourceYoutube": {
            "title": "YouTube charts",
            "type": "boolean",
            "description": "Most-popular chart videos via the official YouTube Data API. Requires your free API key below — auto-disabled with a notice if the key is missing.",
            "default": true
          },
          "sourceGoogleTrends": {
            "title": "Google Trends",
            "type": "boolean",
            "description": "Trending searches from the public Google Trends RSS feed. No key needed.",
            "default": true
          },
          "sourceReddit": {
            "title": "Reddit rising (optional)",
            "type": "boolean",
            "description": "Rising posts via Reddit's OAuth API. Requires YOUR OWN Reddit app credentials below (Reddit closed keyless access in 2026) — you act as the API consumer under Reddit's terms.",
            "default": false
          },
          "geos": {
            "title": "Countries",
            "type": "array",
            "description": "ISO 3166-1 alpha-2 country codes, max 5. Each extra geo adds runtime and TikTok proxy cost roughly linearly.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerSource": {
            "title": "Max items per source",
            "minimum": 10,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on normalized items kept per source (10-500).",
            "default": 100
          },
          "youtubeApiKey": {
            "title": "YouTube Data API key",
            "type": "string",
            "description": "Free key from Google Cloud Console (YouTube Data API v3). This run uses ~12 of your 10,000 free daily quota units."
          },
          "youtubeCategories": {
            "title": "YouTube chart categories",
            "type": "array",
            "description": "Which most-popular charts to pull per country.",
            "items": {
              "type": "string",
              "enum": [
                "default",
                "music",
                "gaming",
                "film"
              ],
              "enumTitles": [
                "Overall",
                "Music",
                "Gaming",
                "Film"
              ]
            },
            "default": [
              "default",
              "music",
              "gaming"
            ]
          },
          "redditClientId": {
            "title": "Reddit app client ID",
            "type": "string",
            "description": "From your own Reddit app (reddit.com/prefs/apps, type 'script'). Only needed when the Reddit source is enabled."
          },
          "redditClientSecret": {
            "title": "Reddit app client secret",
            "type": "string",
            "description": "Secret of the same Reddit app."
          },
          "redditSubreddits": {
            "title": "Subreddits",
            "type": "array",
            "description": "Subreddits to read rising posts from (max 10).",
            "default": [
              "all",
              "popular"
            ],
            "items": {
              "type": "string"
            }
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Unlocks the AI 'what to make this week' digest (typically <$0.05 of your Anthropic credit per run). Without it, the run still delivers the ranked dataset."
          },
          "digestEnabled": {
            "title": "Generate AI digest",
            "type": "boolean",
            "description": "Turn the AI digest on/off (also requires the Anthropic key).",
            "default": true
          },
          "digestModel": {
            "title": "Digest model",
            "enum": [
              "claude-sonnet-5",
              "claude-opus-5",
              "claude-haiku-4-5"
            ],
            "type": "string",
            "description": "Claude model used for the digest, billed to your Anthropic key.",
            "default": "claude-sonnet-5"
          },
          "slackWebhookUrl": {
            "title": "Slack incoming webhook",
            "type": "string",
            "description": "https://hooks.slack.com/... URL. Digest and degradation alerts are posted here. Other hosts are rejected by design."
          },
          "emailTo": {
            "title": "Email digest to",
            "type": "string",
            "description": "Email address for the digest (sent via the official apify/send-mail actor on your account)."
          },
          "proxyConfiguration": {
            "title": "Proxy (TikTok only)",
            "type": "object",
            "description": "Used exclusively for TikTok Creative Center. Residential is strongly recommended; other sources connect directly.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "snapshotStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store holding last-run snapshots for velocity. Reuse the same name across schedules; deleting it only costs one run of velocity data.",
            "default": "trend-radar-state"
          },
          "healthcheck": {
            "title": "Healthcheck mode",
            "type": "boolean",
            "description": "Runs installation checks only (input validation, Google Trends reachability, state-store round-trip). No scraping, no proxy, no digest.",
            "default": false
          },
          "debugScreenshots": {
            "title": "Debug screenshots",
            "type": "boolean",
            "description": "On TikTok failure/block, save screenshots + response metadata to the run's key-value store under DEBUG/.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}