{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Profile Scraper",
    "description": "Scrape TikTok profiles by analyzing followers, following, or direct lists. Extract 20+ data points including engagement, language, and performance metrics. Powerful filters help you find influencers and analyze competitors.",
    "version": "0.0",
    "x-build-id": "UD4pIb9gecyBN0RYn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/afanasenko~tiktok-profile-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-afanasenko-tiktok-profile-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/afanasenko~tiktok-profile-scraper/runs": {
      "post": {
        "operationId": "runs-sync-afanasenko-tiktok-profile-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/afanasenko~tiktok-profile-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-afanasenko-tiktok-profile-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": [
          "operationMode"
        ],
        "properties": {
          "operationMode": {
            "title": "1. Choose Operation Mode",
            "enum": [
              "analyzeFollowersFollowing",
              "analyzeSpecificAccounts",
              "analyzeEngagedAudience"
            ],
            "type": "string",
            "description": "Select the main function of the Actor."
          },
          "targetUsernames": {
            "title": "Target Accounts",
            "type": "array",
            "description": "Enter TikTok usernames or profile URLs (one per line). Works with 1 or multiple accounts. Free plan: up to 3 target accounts.",
            "default": [
              "willsmith"
            ],
            "items": {
              "type": "string"
            }
          },
          "analyzeFollowers": {
            "title": "Scrape Followers",
            "type": "boolean",
            "description": "Check to scrape the followers of target account(s).",
            "default": true
          },
          "analyzeFollowing": {
            "title": "Scrape Following",
            "type": "boolean",
            "description": "Check to scrape the accounts that target user(s) follow.",
            "default": false
          },
          "maxCount": {
            "title": "Max profiles to process (cost control)",
            "minimum": 0,
            "type": "integer",
            "description": "Limit how many profiles will be collected and analyzed. Each profile = one paid event. Set to 0 for no limit. Free plan: up to 100 profiles per run.",
            "default": 0
          },
          "specificUsernamesList": {
            "title": "List of Profiles to Analyze",
            "type": "array",
            "description": "Enter usernames or profile URLs to analyze directly (one per line).",
            "default": [
              "therock",
              "khaby.lame"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxCountList": {
            "title": "Max profiles to process from the list",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of profiles from your list to analyze. Set to 0 for no limit. Free plan: up to 100 profiles per run.",
            "default": 0
          },
          "engagedAudienceTargetUsernames": {
            "title": "Target Accounts",
            "type": "array",
            "description": "Enter TikTok accounts to discover their engaged audience (one per line). Free plan: up to 3 target accounts.",
            "default": [
              "willsmith"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxEngagedProfiles": {
            "title": "Max profiles to analyze",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of unique engaged profiles to collect and analyze. Set to 0 for no limit. Free plan: up to 100 profiles per run.",
            "default": 0
          },
          "extractEmail": {
            "title": "Extract Email",
            "type": "boolean",
            "description": "Searches for an email address in the user's bio.",
            "default": true
          },
          "extractWebsiteUrl": {
            "title": "Extract Website URL",
            "type": "boolean",
            "description": "Extract the website URL from the profile's bio link.",
            "default": true
          },
          "postExtractionMode": {
            "title": "Extract Post Captions",
            "enum": [
              "none",
              "recent",
              "popular"
            ],
            "type": "string",
            "description": "Choose whether to extract post captions and how to sort them.",
            "default": "none"
          },
          "numberOfPosts": {
            "title": "Number of posts to extract",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Specify how many posts to extract if extraction is enabled (max 20).",
            "default": 8
          },
          "keywords": {
            "title": "Filter by Keywords",
            "type": "array",
            "description": "Only process profiles containing **any** of these keywords. Not case-sensitive.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordLocation": {
            "title": "Search Keywords In",
            "enum": [
              "bio_or_name",
              "bio",
              "name",
              "posts",
              "anywhere"
            ],
            "type": "string",
            "description": "Choose where to look for the keywords.",
            "default": "bio_or_name"
          },
          "profileLanguages": {
            "title": "Filter by Profile Language",
            "enum": [
              "any",
              "English",
              "Spanish",
              "German",
              "French",
              "Russian",
              "Italian",
              "Portuguese",
              "Chinese",
              "Japanese",
              "Korean",
              "Arabic",
              "Hindi",
              "Indonesian",
              "Turkish",
              "Dutch",
              "Polish",
              "Swedish",
              "Ukrainian",
              "Thai",
              "Vietnamese",
              "Romanian",
              "Czech",
              "Greek",
              "Hungarian",
              "Finnish",
              "Norwegian",
              "Danish",
              "Hebrew"
            ],
            "type": "string",
            "description": "Only process profiles where the detected language matches your selection. Language is detected from post captions first (most accurate), with bio as a fallback. Profiles with very little text may show N/A.",
            "default": "any"
          },
          "minFollowers": {
            "title": "Follower Count Range: Min",
            "type": "integer",
            "description": "Set the minimum number of followers. Use 0 for no minimum.",
            "default": 0
          },
          "maxFollowers": {
            "title": "and Max",
            "type": "integer",
            "description": "Set the maximum number of followers. Use 0 for no maximum.",
            "default": 0
          },
          "minLikes": {
            "title": "Min Likes Count",
            "type": "integer",
            "description": "Set the minimum total number of likes across all profile videos.",
            "default": 0
          },
          "minMedianViews": {
            "title": "Min Median Views on Recent Videos",
            "type": "integer",
            "description": "Set a minimum median view count for the user's ~35 most recent videos. This provides a more stable metric than average views. Posts will be fetched for this calculation even if post extraction is turned off.",
            "default": 0
          },
          "minAvgShares": {
            "title": "Min Average Shares on Recent Videos",
            "type": "number",
            "description": "Set a minimum average share count for recent videos to find profiles with viral content. Leave at 0 to disable.",
            "default": 0
          },
          "minEngagementRatio": {
            "title": "Min Engagement Ratio (%)",
            "type": "number",
            "description": "Set a minimum engagement rate. The rate is calculated as ((avg. likes + avg. comments + avg. shares) / followers) * 100. Helps filter out profiles with inactive audiences.",
            "default": 0
          },
          "lastPostDays": {
            "title": "Filter by Last Post Date (Days Ago)",
            "type": "integer",
            "description": "Only scrape users who have posted within the last X days. For example, enter 30 to get profiles active in the last month. Leave at 0 to disable.",
            "default": 0
          },
          "accountType": {
            "title": "Filter by Account Type",
            "enum": [
              "any",
              "business",
              "personal"
            ],
            "type": "string",
            "description": "Filter by the profile's type.",
            "default": "any"
          },
          "mustBeVerified": {
            "title": "Filter by Verification",
            "type": "boolean",
            "description": "If checked, only process accounts that are verified.",
            "default": false
          },
          "filterForInfluencers": {
            "title": "Filter for Influencers Only (by Category)",
            "type": "boolean",
            "description": "If enabled, only profiles with a creator/influencer category (e.g., Public Figure, Musician, Artist, Creator) will pass. Filters out brands and uncategorized accounts.",
            "default": false
          },
          "categoryFilter": {
            "title": "Filter by Specific Business Category",
            "enum": [
              "any",
              "Public Figure",
              "Musician/Band",
              "Media & Entertainment",
              "Creator & Influencer",
              "Sports, Fitness & Outdoors",
              "Shopping & Retail",
              "Clothing & Accessories",
              "Beauty & Personal Care",
              "Food & Beverage",
              "Restaurants & Bars",
              "Travel & Tourism",
              "Art & Design",
              "Health & Wellness",
              "Education & Training",
              "Finance & Investing",
              "Technology & Computing",
              "Electronics",
              "Automotive",
              "Real Estate",
              "Home & Garden",
              "Pets & Animals",
              "Gaming",
              "Photography",
              "Non-Profit & Social Cause",
              "Government & Politics",
              "Others"
            ],
            "type": "string",
            "description": "Only process accounts that match a specific TikTok business category.",
            "default": "any"
          },
          "clearSavedData": {
            "title": "Start a Fresh Run",
            "type": "boolean",
            "description": "Check this to clear all saved data from previous runs. **Uncheck to resume a previous run from where it left off.**",
            "default": true
          },
          "maxBudgetUsd": {
            "title": "Max Budget (USD)",
            "type": "number",
            "description": "Set a maximum budget for this run. The actor will stop gracefully when this limit is reached. Set to 0 for default limits ($5 for free accounts, $1000 for paid).",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}