{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Ad Hashtag Miner — hashtags that top ads actually use",
    "description": "TikTok's own Trending Hashtags page shows three rows and then asks you to log in. This Actor mines hashtags straight out of the ad copy on the public Top Ads board and ranks them by how many high-performing ads use them, with CTR and likes attached.",
    "version": "0.1",
    "x-build-id": "tbac3VeCo0LezhK0F"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/titan_coder~tiktok-ad-hashtag-miner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-titan_coder-tiktok-ad-hashtag-miner",
        "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/titan_coder~tiktok-ad-hashtag-miner/runs": {
      "post": {
        "operationId": "runs-sync-titan_coder-tiktok-ad-hashtag-miner",
        "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/titan_coder~tiktok-ad-hashtag-miner/run-sync": {
      "post": {
        "operationId": "run-sync-titan_coder-tiktok-ad-hashtag-miner",
        "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": {
          "cdpUrl": {
            "title": "Your own remote browser CDP URL (optional)",
            "type": "string",
            "description": "Optional. Leave EMPTY to use the built-in stealth anti-detect browser — no third-party account or key needed. Provide your own remote browser endpoint (ws:// or wss://, e.g. a Bright Data Scraping Browser) only if you prefer to route through your own. The backend is never switched automatically and is reported in the run's coverage."
          },
          "countryCodes": {
            "title": "Countries",
            "type": "array",
            "description": "Two-letter country codes to sweep, e.g. US, GB, DE. Each country is a separate slice of the board. Up to 28 (the source's own list).",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "periods": {
            "title": "Periods (days)",
            "type": "array",
            "description": "Which time windows to sweep: 7, 30 and/or 180. Each period is a separate slice, so [7,30] doubles the volume.",
            "default": [
              30
            ]
          },
          "orderBy": {
            "title": "Ranking",
            "enum": [
              "ctr",
              "impression",
              "for_you"
            ],
            "type": "string",
            "description": "How the board ranks ads. CTR and Reach are deterministic and repeatable; For You is personalised and its window rotates between runs.",
            "default": "ctr"
          },
          "maxPagesPerSlice": {
            "title": "Max pages per slice",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "1-5. The source hard-caps each slice at 100 ads (5 pages x 20), so 5 is the maximum useful value. The prefilled values are a deliberately cheap first run (one country, one period, one page) so you can see the shape of the data before you widen the sweep.",
            "default": 5
          },
          "webhookUrl": {
            "title": "Webhook URL (HTTPS)",
            "type": "string",
            "description": "Optional. Receives a JSON summary of the run. HTTPS only."
          },
          "minAdsPerHashtag": {
            "title": "Minimum ads per hashtag",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "A hashtag is returned only if it appears in at least this many distinct ads. 1 returns everything including one-off tags; 2 (the default) drops most noise. Hashtags below the threshold are dropped before they are returned and before they are billed.",
            "default": 2
          },
          "maxHashtags": {
            "title": "Max hashtags to return",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard stop for the run, applied after ranking by ad count. This is the number of rows you actually receive and pay for.",
            "default": 500
          },
          "allowPartial": {
            "title": "Return an incomplete ranking",
            "type": "boolean",
            "description": "The hashtag ranking is computed across every slice, so if a slice fails or its pagination breaks, the ranking is incomplete. By default such a run returns nothing. Turn this on to receive the incomplete ranking anyway: every row is then flagged isPartial and no per-row charge is made for it.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}