{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Competitor Engagement Leads",
    "description": "Find creators who engage with your competitors on TikTok. Paste a competitor's profile URL and get a qualified lead list of creators who comment on their videos — complete with emails, follower counts, and engagement rates. Built for influencer marketing agencies, D2C brands & TikTok Shop sellers.",
    "version": "0.1",
    "x-build-id": "eqeN6NTthLDUSieDz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/piquant_hare~tiktok-competitor-engagement-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-piquant_hare-tiktok-competitor-engagement-leads",
        "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/piquant_hare~tiktok-competitor-engagement-leads/runs": {
      "post": {
        "operationId": "runs-sync-piquant_hare-tiktok-competitor-engagement-leads",
        "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/piquant_hare~tiktok-competitor-engagement-leads/run-sync": {
      "post": {
        "operationId": "run-sync-piquant_hare-tiktok-competitor-engagement-leads",
        "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": [
          "competitorUrls"
        ],
        "properties": {
          "competitorUrls": {
            "title": "Competitor TikTok profile URLs",
            "type": "array",
            "description": "One or more TikTok profile URLs to analyze. Example: https://www.tiktok.com/@brandname",
            "items": {
              "type": "string"
            }
          },
          "maxVideos": {
            "title": "Max videos to analyze per competitor",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many of the competitor's most recent videos to scrape comments from. More videos = more leads but longer runtime and higher cost.",
            "default": 3
          },
          "maxCommentsPerVideo": {
            "title": "Max comments to scrape per video",
            "minimum": 10,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of comments to extract from each video. TikTok sorts by relevance, so top comments tend to be from more engaged/popular accounts.",
            "default": 30
          },
          "minFollowers": {
            "title": "Minimum follower count",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only include creators with at least this many followers. Set to 1000+ to filter out casual consumers and focus on actual creators/businesses.",
            "default": 500
          },
          "onlyWithEmail": {
            "title": "Only include profiles with email",
            "type": "boolean",
            "description": "If true, only output creators where an email was found (in bio or link-in-bio page). Reduces output size but ensures every lead is contactable.",
            "default": false
          },
          "enrichLinkInBio": {
            "title": "Crawl link-in-bio pages for emails",
            "type": "boolean",
            "description": "If true, visit each qualified creator's link-in-bio page (Linktree, Beacons, etc.) to find email addresses not visible in the TikTok bio itself. Increases runtime but significantly improves email discovery rate.",
            "default": true
          },
          "includeEngagementRate": {
            "title": "Compute engagement rate (extra cost)",
            "type": "boolean",
            "description": "If true, fetch several recent videos per QUALIFIED lead to estimate an engagement rate (avg likes+comments / followers). Adds upstream scraping cost but only for qualified leads. When off, engagement fields are left empty and the run is cheaper. The estimate is capped at 100%.",
            "default": false
          },
          "maxCommentersToScreen": {
            "title": "Max commenters to screen (0 = no limit)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional safety cap: only screen the top N most-engaged commenters (by how many of the competitor's videos they commented on) in the profile stage. Bounds cost on very large inputs. 0 means screen all unique commenters.",
            "default": 0
          },
          "maxLeads": {
            "title": "Max qualified leads per competitor (0 = no limit)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many qualified leads per competitor, so the cost of a run is predictable. The default of 10 keeps a first/trial run cheap (~$2-3). RAISE THIS (or set 0 for unlimited) for production runs to capture every qualified lead.",
            "default": 10
          },
          "bioKeywords": {
            "title": "Bio keyword filter (optional)",
            "type": "array",
            "description": "Only include creators whose bio contains at least one of these keywords. Useful for niche filtering. Example: ['fitness', 'gym', 'workout']. Leave empty to include all.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies are REQUIRED for TikTok. Datacenter proxies will be blocked immediately."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}