{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Hashtag Views Scraper - Sounds, Profiles, Video Stats",
    "description": "68 columns per video, 59 filled on average, and 40 per profile, measured on live accounts with no proxy and no login. TikTok video metrics, TikTok hashtag views and captions to filter on; watch mode returns only new or changed videos, and unchanged items are not charged.",
    "version": "0.1",
    "x-build-id": "ozQhP4VbATsd0bc4z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/snow_leo_data~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-snow_leo_data-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/snow_leo_data~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-snow_leo_data-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/snow_leo_data~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-snow_leo_data-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",
        "properties": {
          "profiles": {
            "title": "TikTok profiles",
            "type": "array",
            "description": "Usernames or profile URLs: nasa, @nasa or https://www.tiktok.com/@nasa. Each profile returns one profile row with follower, like and video counts, plus the videos TikTok publishes on the public creator card (10-13 per profile, measured on eight accounts).",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Direct links to single videos, for example https://www.tiktok.com/@tiktok/video/7106594312292453675. Bare video IDs work too. These always come back fully detailed.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags without the # sign, for example funny. Returns the hashtag's own total views and total videos plus 10 videos carrying it.",
            "items": {
              "type": "string"
            }
          },
          "sounds": {
            "title": "Sounds",
            "type": "array",
            "description": "TikTok sound IDs or music URLs. Returns the sound and up to 6 videos using it.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on rows written to the dataset, so you never pay for more than you asked for. It limits the OUTPUT, not the crawl. Leave empty for a 50-row trial run.",
            "default": 0
          },
          "maxVideosPerSource": {
            "title": "Maximum videos per profile, hashtag or sound",
            "minimum": 0,
            "type": "integer",
            "description": "Quota per target, so one big account cannot eat the whole run. 0 means every video the public page offers.",
            "default": 0
          },
          "includeVideos": {
            "title": "Collect videos",
            "type": "boolean",
            "description": "Switch off to get only profile, hashtag and sound rows and skip every video page.",
            "default": true
          },
          "includeVideoDetails": {
            "title": "Full video metrics",
            "type": "boolean",
            "description": "Opens each video page for likes, comments, shares, saves, reposts, music, hashtags, mentions and video technicals. Off, a video costs about 4 KB of traffic and carries views only; on, about 89 KB and carries all 60 fields.",
            "default": true
          },
          "outputTypes": {
            "title": "Row types to keep",
            "type": "array",
            "description": "Which kinds of rows land in the dataset. Empty means all four.",
            "items": {
              "type": "string",
              "enum": [
                "profile",
                "video",
                "hashtag",
                "sound"
              ],
              "enumTitles": [
                "Profiles",
                "Videos",
                "Hashtags",
                "Sounds"
              ]
            },
            "default": [
              "profile",
              "video",
              "hashtag",
              "sound"
            ]
          },
          "minPlayCount": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Keep videos with at least this many views. Works even with full metrics off, because the view count is on the creator card already.",
            "default": 0
          },
          "minDiggCount": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep videos with at least this many likes. Likes only exist on the video page, so this switches full video metrics on for the run and says so in the log.",
            "default": 0
          },
          "minCommentCount": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Keep videos with at least this many comments. Also needs full video metrics and switches them on.",
            "default": 0
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Keep videos published on or after this date, YYYY-MM-DD. With full video metrics on, the exact publication time from the video page is used. With them off, the time is read out of the video ID: measured against the page on nine videos, six matched within 25 seconds and three drifted by 37 minutes to 18.5 hours, so treat it as day-level accuracy."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Keep videos published on or before this date, YYYY-MM-DD."
          },
          "textContains": {
            "title": "Caption contains",
            "type": "string",
            "description": "Keep videos whose caption or hashtags contain this text. Case is ignored."
          },
          "onlyNewOrChanged": {
            "title": "Watch mode: only new or changed",
            "type": "boolean",
            "description": "Remembers what earlier runs delivered and returns only items that are new or whose numbers moved, marked NEW or UPDATED in change_type. Built for scheduled monitoring: unchanged items are not returned and not charged.",
            "default": false
          },
          "emitUnchanged": {
            "title": "Also return unchanged items",
            "type": "boolean",
            "description": "In watch mode, return unchanged items too, marked UNCHANGED. They are charged like any other row.",
            "default": false
          },
          "compactOutput": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Only the columns that carry meaning, for AI agents and spreadsheets.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Drop empty fields",
            "type": "boolean",
            "description": "Leave empty columns out of every row instead of writing nulls.",
            "default": false
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many TikTok pages to open at once. Lower it if you see rate limiting.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}