{
  "openapi": "3.0.1",
  "info": {
    "title": "TrendPilot — TikTok Scraper & Creator Leads",
    "description": "Extract TikTok videos, hashtags, profiles, comments, sounds, and search results with automated lead, viral, and brand fit scoring.",
    "version": "1.0",
    "x-build-id": "ZQ8tCsQFvguPZZjec"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/orbitai~trend-pilot-tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-orbitai-trend-pilot-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/orbitai~trend-pilot-tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-orbitai-trend-pilot-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/orbitai~trend-pilot-tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-orbitai-trend-pilot-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": [
          "runMode",
          "startUrls"
        ],
        "properties": {
          "runMode": {
            "title": "Run Mode",
            "enum": [
              "creatorLeads",
              "viralReport",
              "competitorMonitoring",
              "contentCalendar",
              "custom"
            ],
            "type": "string",
            "description": "Select the B2B outcome template. Maps to preconfigured filters and outputs.",
            "default": "custom"
          },
          "legacyCompatibilityMode": {
            "title": "Legacy Compatibility Mode",
            "type": "boolean",
            "description": "If active, output will mimic legacy scraper output structures.",
            "default": false
          },
          "preserveLegacyFields": {
            "title": "Preserve Legacy Fields",
            "type": "boolean",
            "description": "If true, legacy fields are preserved alongside enriched fields.",
            "default": true
          },
          "outputPreset": {
            "title": "Output Preset Layout",
            "enum": [
              "rawCompatible",
              "rawPlusInsights",
              "creatorLeadList",
              "viralVideoReport",
              "competitorReport",
              "contentCalendar",
              "agencyClientReport",
              "commentInsights",
              "trendRadar"
            ],
            "type": "string",
            "description": "Output layout format (rawCompatible, rawPlusInsights, creatorLeadList, viralVideoReport, competitorReport, contentCalendar, agencyClientReport, commentInsights, trendRadar).",
            "default": "rawCompatible"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "TikTok URLs (profiles, hashtags, videos, search queries) to start crawling.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "hashtags": {
            "title": "Hashtags List",
            "type": "array",
            "description": "List of hashtags to scrape (without '#').",
            "default": []
          },
          "profiles": {
            "title": "Profiles List",
            "type": "array",
            "description": "List of TikTok profile usernames (without '@').",
            "default": []
          },
          "searchQueries": {
            "title": "Search Queries List",
            "type": "array",
            "description": "List of search terms to query on TikTok.",
            "default": []
          },
          "searchSection": {
            "title": "Search Tab Section",
            "enum": [
              "top",
              "video",
              "profile"
            ],
            "type": "string",
            "description": "Select whether to scrape Top results, Videos, or Profiles for search queries.",
            "default": "top"
          },
          "maxProfilesPerQuery": {
            "title": "Max Profiles Per Query",
            "type": "integer",
            "description": "Number of profiles to extract per search query.",
            "default": 10
          },
          "searchSort": {
            "title": "Search Sorting Method",
            "enum": [
              "relevance",
              "latest",
              "likes"
            ],
            "type": "string",
            "description": "Sort order of search results.",
            "default": "relevance"
          },
          "searchDate": {
            "title": "Search Date Range Filter",
            "enum": [
              "all",
              "day",
              "week",
              "month",
              "three_months",
              "six_months"
            ],
            "type": "string",
            "description": "Filter search results by upload date range.",
            "default": "all"
          },
          "postURLs": {
            "title": "Post/Video URLs",
            "type": "array",
            "description": "Direct URLs to TikTok posts to scrape.",
            "default": []
          },
          "musicURLs": {
            "title": "Music URLs",
            "type": "array",
            "description": "Direct music/sound URLs to scrape.",
            "default": []
          },
          "soundIDs": {
            "title": "Sound IDs",
            "type": "array",
            "description": "List of TikTok Sound IDs.",
            "default": []
          },
          "profileScrapeSections": {
            "title": "Profile Scrape Sections",
            "type": "array",
            "description": "Profile tab sections to scrape (supported values: posts, liked, bookmarked).",
            "items": {
              "type": "string"
            },
            "default": [
              "posts"
            ]
          },
          "profileSorting": {
            "title": "Profile Post Sorting",
            "enum": [
              "latest",
              "popular"
            ],
            "type": "string",
            "description": "Sort order of posts collected from profiles.",
            "default": "latest"
          },
          "excludePinnedPosts": {
            "title": "Exclude Pinned Posts",
            "type": "boolean",
            "description": "If true, pinned posts will be ignored.",
            "default": false
          },
          "limitPerPage": {
            "title": "Limit Per Section",
            "type": "integer",
            "description": "Number of videos to scrape per profile, hashtag, or search query.",
            "default": 100
          },
          "dateFilterStart": {
            "title": "Date Filter Start",
            "type": "string",
            "description": "Scrape profile videos published after this date (YYYY-MM-DD).",
            "default": ""
          },
          "dateFilterEnd": {
            "title": "Date Filter End",
            "type": "string",
            "description": "Scrape profile videos published before this date (YYYY-MM-DD).",
            "default": ""
          },
          "minHearts": {
            "title": "Min Hearts (Likes)",
            "type": "integer",
            "description": "Only scrape videos with hearts (likes) greater than or equal to this.",
            "default": 0
          },
          "maxHearts": {
            "title": "Max Hearts (Likes)",
            "type": "integer",
            "description": "Only scrape videos with hearts (likes) less than this.",
            "default": 0
          },
          "maxFollowers": {
            "title": "Max Followers",
            "type": "integer",
            "description": "Maximum number of followers to fetch.",
            "default": 0
          },
          "maxFollowing": {
            "title": "Max Following Profiles",
            "type": "integer",
            "description": "Maximum number of following profiles to fetch.",
            "default": 0
          },
          "scrapeRelatedVideos": {
            "title": "Scrape Related Videos",
            "type": "boolean",
            "description": "Collect related/recommended videos from the sidebar of target video URLs.",
            "default": false
          },
          "maxRelatedVideosPerPost": {
            "title": "Max Related Videos Per Post",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Limit of related videos to crawl per post.",
            "default": 20
          },
          "scrapeFollowers": {
            "title": "Scrape Profile Followers",
            "type": "boolean",
            "description": "Collect followers of target profiles where publicly visible.",
            "default": false
          },
          "scrapeFollowing": {
            "title": "Scrape Profile Following",
            "type": "boolean",
            "description": "Collect following lists of target profiles where publicly visible.",
            "default": false
          },
          "maxFollowersPerProfile": {
            "title": "Max Followers Per Profile",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Limit followers to fetch per profile.",
            "default": 100
          },
          "maxFollowingPerProfile": {
            "title": "Max Following Per Profile",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Limit following list to fetch per profile.",
            "default": 100
          },
          "maxItems": {
            "title": "Max Items To Scrape",
            "minimum": 1,
            "type": "integer",
            "description": "Overall maximum items to return in default dataset.",
            "default": 20
          },
          "maxCommentsPerPost": {
            "title": "Max Comments Per Post",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum comments to fetch per video post.",
            "default": 50
          },
          "minViews": {
            "title": "Minimum Video Views",
            "type": "integer",
            "description": "Exclude videos with views below this count.",
            "default": 0
          },
          "minLikes": {
            "title": "Minimum Video Likes",
            "type": "integer",
            "description": "Exclude videos with likes below this count.",
            "default": 0
          },
          "scrapeComments": {
            "title": "Scrape Comments",
            "type": "boolean",
            "description": "Enables comment extraction.",
            "default": false
          },
          "scrapeCommentReplies": {
            "title": "Scrape Comment Replies",
            "type": "boolean",
            "description": "Enables extracting replies to top-level comments.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max Replies Per Comment",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum replies to collect for each parent comment.",
            "default": 10
          },
          "maxTopLevelCommentsPerPost": {
            "title": "Max Top-Level Comments Per Post",
            "type": "integer",
            "description": "Limit top-level comments fetched per post (excluding reply threads).",
            "default": 0
          },
          "includeCommentAuthors": {
            "title": "Include Comment Authors",
            "type": "boolean",
            "description": "Includes username/nickname of comment authors.",
            "default": true
          },
          "includeCommentSentiment": {
            "title": "Include Comment Sentiment",
            "type": "boolean",
            "description": "Calculates sentiment labels for comments.",
            "default": false
          },
          "extractPainPoints": {
            "title": "Extract Pain Points",
            "type": "boolean",
            "description": "Extract B2B pain points from user comments.",
            "default": false
          },
          "extractBuyingSignals": {
            "title": "Extract Buying Signals",
            "type": "boolean",
            "description": "Extract B2B buying signals from comments.",
            "default": false
          },
          "extractQuestions": {
            "title": "Extract User Questions",
            "type": "boolean",
            "description": "Extract questions asked in comments.",
            "default": false
          },
          "viralityWeight": {
            "title": "Virality Score Weight",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Weight of play velocity in scoring (0 to 1).",
            "default": 0.4
          },
          "creatorWeight": {
            "title": "Creator Authority Weight",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Weight of creator followers and verification (0 to 1).",
            "default": 0.3
          },
          "brandSafetyThreshold": {
            "title": "Brand Safety Threshold",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Exclude videos with safety scores below this (0 to 1).",
            "default": 0.5
          },
          "audienceKeywords": {
            "title": "Niche/Audience Keywords",
            "type": "array",
            "description": "Audience keyword filters.",
            "default": []
          },
          "shouldDownloadVideos": {
            "title": "Download Videos",
            "type": "boolean",
            "description": "If true, saves video files to Key-Value Store.",
            "default": false
          },
          "shouldDownloadCovers": {
            "title": "Download Video Covers",
            "type": "boolean",
            "description": "Save post covers to Key-Value Store.",
            "default": false
          },
          "shouldDownloadAvatars": {
            "title": "Download Creator Avatars",
            "type": "boolean",
            "description": "Save author avatars to Key-Value Store.",
            "default": false
          },
          "shouldDownloadMusicCovers": {
            "title": "Download Music Covers",
            "type": "boolean",
            "description": "Save music track covers to Key-Value Store.",
            "default": false
          },
          "shouldDownloadSlideshowImages": {
            "title": "Download Slideshow Images",
            "type": "boolean",
            "description": "Save slideshow image slides to Key-Value Store.",
            "default": false
          },
          "maxVideoDurationSecs": {
            "title": "Max Video Duration (Seconds)",
            "type": "integer",
            "description": "Maximum video length in seconds.",
            "default": 60
          },
          "mediaStoragePrefix": {
            "title": "Media Storage Prefix",
            "type": "string",
            "description": "Namespace folder name for downloaded media keys.",
            "default": "trendpilot"
          },
          "shouldDownloadSubtitles": {
            "title": "Download Subtitles",
            "type": "boolean",
            "description": "Save public subtitle tracks to Key-Value Store.",
            "default": false
          },
          "extractTranscripts": {
            "title": "Extract Text Transcripts",
            "type": "boolean",
            "description": "Normalize subtitle tracks into paragraph transcripts.",
            "default": false
          },
          "transcriptLanguage": {
            "title": "Transcript Language Target",
            "type": "string",
            "description": "Language code to target for transcripts.",
            "default": "auto"
          },
          "includeTranscriptInOutput": {
            "title": "Include Transcript In Output",
            "type": "boolean",
            "description": "Add the raw transcript text directly to dataset items.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify proxy settings.",
            "default": {
              "useApifyProxy": true
            }
          },
          "proxyCountryCode": {
            "title": "Proxy Country Target",
            "type": "string",
            "description": "ISO 2-letter country code for targeted proxies.",
            "default": ""
          },
          "useApifyProxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Enable default Apify proxy allocation.",
            "default": true
          },
          "scraperEngine": {
            "title": "Scraper Engine",
            "enum": [
              "trendPilot",
              "legacyCompatible",
              "externalFallback",
              "customActor"
            ],
            "type": "string",
            "description": "Scraping engine option.",
            "default": "trendPilot"
          },
          "fallbackActorId": {
            "title": "Fallback Actor ID",
            "type": "string",
            "description": "Actor slug/id to call for fallback.",
            "default": ""
          },
          "fallbackOnFailure": {
            "title": "Fallback On Failure",
            "type": "boolean",
            "description": "If true, falls back to fallbackActorId if native extraction fails.",
            "default": true
          },
          "customActorId": {
            "title": "Custom Actor ID",
            "type": "string",
            "description": "Custom actor ID.",
            "default": ""
          },
          "maxRetries": {
            "title": "Max Scraper Retries",
            "type": "integer",
            "description": "Maximum number of page download retries.",
            "default": 3
          },
          "debugMode": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Enables verbose logging.",
            "default": false
          },
          "llmProvider": {
            "title": "AI LLM Provider",
            "enum": [
              "openai",
              "anthropic",
              "google"
            ],
            "type": "string",
            "description": "Select LLM provider for analysis.",
            "default": "openai"
          },
          "openAiApiKey": {
            "title": "OpenAI API Key",
            "type": "string",
            "description": "OpenAI API key."
          },
          "anthropicApiKey": {
            "title": "Anthropic API Key",
            "type": "string",
            "description": "Anthropic API key."
          },
          "googleApiKey": {
            "title": "Google Gemini API Key",
            "type": "string",
            "description": "Gemini API key."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}