{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper + AI Viral Analysis, Creator Audit & Sentiment",
    "description": "Scrape TikTok videos with AI-powered viral analysis. Extract views, likes, comments, shares, sounds, hashtags. AI scores content for virality, audits creators for brand deals, and analyzes comment sentiment. 4 modes: search, profiles, hashtags, video URLs. Perfect for agencies, brands, and creators.",
    "version": "1.0",
    "x-build-id": "nTbjYQIw9olvlD6gh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/buseta~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-buseta-tiktok-scraper",
        "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/buseta~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-buseta-tiktok-scraper",
        "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/buseta~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-buseta-tiktok-scraper",
        "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": [
          "scrape_type"
        ],
        "properties": {
          "scrape_type": {
            "title": "Scraping mode",
            "enum": [
              "search",
              "profiles",
              "hashtags",
              "video_urls"
            ],
            "type": "string",
            "description": "How to find TikTok videos.\n\n- Search: Find videos by keyword\n- Profiles: Get all videos from specific creators\n- Hashtags: Get videos by hashtag\n- Video URLs: Scrape specific videos by URL",
            "default": "search"
          },
          "search": {
            "title": "Search keyword",
            "type": "string",
            "description": "Keyword to search for. Used in 'Search' mode."
          },
          "profiles": {
            "title": "Creator profiles",
            "type": "array",
            "description": "List of TikTok usernames (with or without @). Used in 'Profiles' mode.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "List of hashtags (without #). Used in 'Hashtags' mode.",
            "items": {
              "type": "string"
            }
          },
          "video_urls": {
            "title": "Video URLs",
            "type": "array",
            "description": "List of TikTok video URLs. Used in 'Video URLs' mode.",
            "items": {
              "type": "string"
            }
          },
          "max_videos": {
            "title": "Max videos",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of videos to scrape per search/profile/hashtag.",
            "default": 50
          },
          "get_comments": {
            "title": "Scrape comments",
            "type": "boolean",
            "description": "Extract comments from each video. Charged at $0.20 per 1,000 comments.",
            "default": false
          },
          "max_comments_per_video": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of comments to scrape per video.",
            "default": 30
          },
          "ai_content_analysis": {
            "title": "AI Viral Content Analysis",
            "type": "boolean",
            "description": "AI analyzes all scraped videos: which formats go viral, trending sounds, hook patterns, best posting times, engagement benchmarks. Charged at $2 per 1,000 videos.",
            "default": false
          },
          "ai_comment_sentiment": {
            "title": "AI Comment Sentiment (per video)",
            "type": "boolean",
            "description": "AI analyzes comments on each video: positive/negative split, what audiences love/hate, brand safety flags. Requires 'Scrape comments'. Charged at $20 per 1,000 videos.",
            "default": false
          },
          "ai_creator_audit": {
            "title": "AI Creator Audit (per profile)",
            "type": "boolean",
            "description": "AI audits each creator: engagement quality, audience authenticity (bot detection), brand fit score, sponsorship potential. Best with 'Profiles' mode. Charged at $30 per 1,000 creators.",
            "default": false
          },
          "proxy_config": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Recommended for TikTok scraping."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}