{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Viral Hook Analyzer: Reels & Shorts Scraper + AI",
    "description": "Find the hooks behind the most viral TikToks, Instagram Reels and YouTube Shorts in any niche: the first 3 seconds, hook type, how each video beat its creator's average, why it works, templates and new hooks.",
    "version": "1.0",
    "x-build-id": "mofVJPEGirdNUlxZS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ingeniela~tiktok-viral-hook-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ingeniela-tiktok-viral-hook-analyzer",
        "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/ingeniela~tiktok-viral-hook-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-ingeniela-tiktok-viral-hook-analyzer",
        "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/ingeniela~tiktok-viral-hook-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-ingeniela-tiktok-viral-hook-analyzer",
        "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": {
          "platform": {
            "title": "Platform",
            "enum": [
              "tiktok",
              "instagram",
              "youtube"
            ],
            "type": "string",
            "description": "TikTok and YouTube Shorts give the spoken hook from subtitles. Instagram gives the caption; turn on 'Read on-screen text' to also read the text on the first frame.",
            "default": "tiktok"
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "TikTok hashtags without the # (for example: skincare, rutinadeskincare).",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "TikTok searches. Results are sorted by most liked.",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "Profiles or channels",
            "type": "array",
            "description": "Competitor accounts: TikTok or Instagram usernames, or YouTube channel links / @handles. Their most popular videos are analysed.",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Specific video URLs",
            "type": "array",
            "description": "Individual TikTok video links.",
            "items": {
              "type": "string"
            }
          },
          "videosPerSource": {
            "title": "Videos per hashtag, search or profile",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many videos to collect from each source.",
            "default": 30
          },
          "searchDateFilter": {
            "title": "Search date range",
            "enum": [
              "PAST_WEEK",
              "PAST_MONTH",
              "LAST_3_MONTHS",
              "LAST_6_MONTHS",
              "ALL_TIME"
            ],
            "type": "string",
            "description": "Only for search keywords: recent hooks reflect what works now.",
            "default": "LAST_3_MONTHS"
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Skip videos below this many views, so only proven hooks are studied.",
            "default": 10000
          },
          "includeAds": {
            "title": "Include ads",
            "type": "boolean",
            "description": "Keep sponsored videos in the analysis.",
            "default": false
          },
          "transcribeMissing": {
            "title": "Transcribe videos without subtitles",
            "type": "boolean",
            "description": "TikTok only: videos with no subtitles get transcribed (a small extra data cost). Off: their caption text is used as the hook.",
            "default": false
          },
          "scraperMaxCostUsd": {
            "title": "Max spend on data collection (USD)",
            "minimum": 1,
            "type": "integer",
            "description": "Upper limit for collecting the videos on your account.",
            "default": 5
          },
          "aiInsights": {
            "title": "AI insights",
            "type": "boolean",
            "description": "For each hook: why it works, a reusable template and 2 rewrites for your niche. Plus a playbook for the whole run.",
            "default": true
          },
          "readOnScreenText": {
            "title": "Read on-screen text (AI vision)",
            "type": "boolean",
            "description": "AI reads the words written on each video's cover / first frame. When a video has no spoken hook, that text becomes the hook. Needs AI (built-in or your key).",
            "default": false
          },
          "yourNiche": {
            "title": "Your niche",
            "type": "string",
            "description": "Who you create for, so rewrites fit you. Example: 'skincare with peptides for women 30+'."
          },
          "yourBrand": {
            "title": "Your brand (optional)",
            "type": "string",
            "description": "Brand name to use in the rewrites and hook ideas."
          },
          "reportLanguage": {
            "title": "Report language",
            "enum": [
              "es",
              "en"
            ],
            "type": "string",
            "description": "Language of the AI insights and the HTML report.",
            "default": "es"
          },
          "aiMaxVideos": {
            "title": "Max videos with AI insights",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "AI insights go to the most viewed videos first.",
            "default": 50
          },
          "aiProvider": {
            "title": "AI provider",
            "enum": [
              "auto",
              "anthropic",
              "openai",
              "openrouter",
              "gemini",
              "xai",
              "deepseek",
              "mistral"
            ],
            "type": "string",
            "description": "Which AI writes the insights. Add the matching key below, or leave all keys empty to use the built-in AI (billed per AI event).",
            "default": "auto"
          },
          "aiModel": {
            "title": "AI model (optional)",
            "type": "string",
            "description": "Leave empty for the default: claude-opus-5-5 on Anthropic, gpt-6.1-terra on OpenAI, anthropic/claude-sonnet-5.5 on OpenRouter. On OpenRouter you can use any model id from openrouter.ai/models."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key (optional)",
            "type": "string",
            "description": "Your own key from console.anthropic.com. With your own key (any provider), that provider bills you and AI events are not charged."
          },
          "openaiApiKey": {
            "title": "OpenAI API key (optional)",
            "type": "string",
            "description": "Your own key from platform.openai.com/api-keys."
          },
          "openrouterApiKey": {
            "title": "OpenRouter API key (optional)",
            "type": "string",
            "description": "Your own key from openrouter.ai/keys. One key, hundreds of models."
          },
          "geminiApiKey": {
            "title": "Google Gemini API key (optional)",
            "type": "string",
            "description": "Your own key from aistudio.google.com/apikey."
          },
          "xaiApiKey": {
            "title": "xAI (Grok) API key (optional)",
            "type": "string",
            "description": "Your own key from console.x.ai."
          },
          "deepseekApiKey": {
            "title": "DeepSeek API key (optional)",
            "type": "string",
            "description": "Your own key from platform.deepseek.com."
          },
          "mistralApiKey": {
            "title": "Mistral API key (optional)",
            "type": "string",
            "description": "Your own key from console.mistral.ai."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}