{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Reels & TikTok Hooks and Scripts",
    "description": "Find which Reels and TikTok hooks beat each account's median, then get original scripts for your brand. Works on Instagram Reel or TikTok Scraper datasets.",
    "version": "0.2",
    "x-build-id": "tzkixgzdJt5F1PtHJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seasons-ai~competitor-content-hooks/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seasons-ai-competitor-content-hooks",
        "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/seasons-ai~competitor-content-hooks/runs": {
      "post": {
        "operationId": "runs-sync-seasons-ai-competitor-content-hooks",
        "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/seasons-ai~competitor-content-hooks/run-sync": {
      "post": {
        "operationId": "run-sync-seasons-ai-competitor-content-hooks",
        "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": {
          "datasetId": {
            "title": "Scraper dataset (Instagram Reels or TikTok)",
            "type": "string",
            "description": "Pick the dataset of your Instagram Reel Scraper run (apify/instagram-reel-scraper) or TikTok Scraper run (clockworks/tiktok-scraper or clockworks/tiktok-profile-scraper) on brand or creator accounts. The source is detected per item, so a merged dataset works too. For TikTok, run the scraper with \"Download videos\" on: without it TikTok items carry no video file. Through the API, pass the run's defaultDatasetId. The Actor only reads it. Leave empty to use Items or Items URL instead."
          },
          "videoStoreId": {
            "title": "TikTok video store (only if TikTok videos are private)",
            "type": "string",
            "description": "Only for TikTok: the key-value store where the TikTok scraper saved the downloaded videos (by default that scraper run's own key-value store, or the store named in its videoKvStoreIdOrName). Pick it when your account keeps storages private, so this run may read the videos; through the API pass the run's defaultKeyValueStoreId. Read-only. Leave empty for Instagram, or when your storages are readable by ID."
          },
          "items": {
            "title": "Items (fallback)",
            "type": "array",
            "description": "Video items as JSON, in the Instagram Reel Scraper format (videoUrl or downloadedVideo, caption, videoPlayCount / likesCount / commentsCount, timestamp, ownerUsername, url) or the TikTok Scraper format (mediaUrls or videoMeta.downloadAddr, text, playCount / diggCount / commentCount / shareCount, createTime, authorMeta.name, videoMeta.duration, webVideoUrl). Used when no dataset is picked. The prefill is a 3-reel synthetic demo."
          },
          "itemsUrl": {
            "title": "Items URL (fallback)",
            "type": "string",
            "description": "Link to a JSON export of an Instagram Reel Scraper or TikTok Scraper dataset (an array of items). Used when neither a dataset nor items are given."
          },
          "maxReels": {
            "title": "Maximum videos to analyse",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on videos (reels or TikToks) analysed in this run (the first N in the dataset). Each analysed video is one charge.",
            "default": 30
          },
          "transcribeSeconds": {
            "title": "Seconds of speech to transcribe",
            "minimum": 30,
            "maximum": 60,
            "type": "integer",
            "description": "How much of each video's start is transcribed (30-60 s). The hook is read from the first 3 seconds.",
            "default": 60
          },
          "brandBrief": {
            "title": "Your brand brief",
            "type": "string",
            "description": "Who you are, what you sell, audience, tone of voice, the goal of the videos (follows, sign-ups, sales) and anything to avoid. Required when Number of scripts is above 0."
          },
          "scriptsCount": {
            "title": "Number of scripts",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many original short-video scripts (Reels / TikTok / Shorts) to write from the winning patterns (0 = analysis only). Each script is one charge.",
            "default": 5
          },
          "scriptLanguage": {
            "title": "Script language",
            "type": "string",
            "description": "Language of the scripts and takeaways, for example English, German, Spanish.",
            "default": "English"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}