{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper - Videos, Accounts, Hashtags by Keyword",
    "description": "Search TikTok by keyword or hashtag and get every matching video and account as data: caption, author and follower count, views, likes, comments, shares, sound, hashtags and media URLs. Filter by date, likes and paid posts, and download the videos, covers and avatars.",
    "version": "0.1",
    "x-build-id": "eOJCwloO3Hef9Xj0v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~tiktok-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-tiktok-search-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/s-r~tiktok-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s-r-tiktok-search-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/s-r~tiktok-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-tiktok-search-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": [
          "search"
        ],
        "properties": {
          "search": {
            "title": "Search terms",
            "type": "array",
            "description": "One per line. Exactly what you would type into TikTok's search box.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Searched alongside the terms above. The leading # is added for you, so 'coffee' and '#coffee' do the same thing.",
            "items": {
              "type": "string"
            }
          },
          "search_section": {
            "title": "What to return",
            "enum": [
              "videos",
              "accounts",
              "both"
            ],
            "type": "string",
            "description": "Videos, the accounts that match the same search, or both. Accounts come out of the same request as the videos, so asking for both costs no extra fetching."
          },
          "max_videos_per_keyword": {
            "title": "Maximum videos per term",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "TikTok serves roughly 200 unique videos per keyword before it stops, so asking for more returns what exists."
          },
          "max_profiles_per_query": {
            "title": "Maximum accounts per term",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only used when accounts are requested. TikTok returns a handful of account cards per search, so high numbers return what exists."
          },
          "results_per_page": {
            "title": "Results per request",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many results to ask for per request. Lower means more requests for the same total."
          },
          "sort_by": {
            "title": "Order the results",
            "enum": [
              "relevance",
              "likes",
              "views",
              "comments",
              "shares",
              "date",
              "oldest"
            ],
            "type": "string",
            "description": "Orders the rows this run collected, not TikTok's index: the endpoint ignores its own sort_type parameter (measured), so this sorts after the fetch and 'relevance' keeps TikTok's ranking untouched. 'date' is newest first, 'oldest' is oldest first."
          },
          "oldest_post_date": {
            "title": "Posted on or after",
            "type": "string",
            "description": "YYYY-MM-DD, a full ISO timestamp, or a relative window such as '7 days' or '3 months'. Drops videos published before this date; a date-only day is included whole. Filtered after the fetch, because TikTok ignores its publish_time parameter (measured), so a narrow window reads more pages than it re."
          },
          "newest_post_date": {
            "title": "Posted on or before",
            "type": "string",
            "description": "Same formats as the field above. Drops videos published after this date; the whole of a date-only day is included. Also applied after the fetch, for the same reason as the field above."
          },
          "min_likes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Drop videos with fewer likes than this. Applied after the fetch, like every filter here."
          },
          "max_likes": {
            "title": "Maximum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Drop videos with more likes than this. Useful for finding small accounts rather than the same viral posts."
          },
          "exclude_ads": {
            "title": "Exclude paid posts",
            "type": "boolean",
            "description": "Drop rows TikTok marks as advertising."
          },
          "scrape_additional_author_meta": {
            "title": "Extra author fields",
            "type": "boolean",
            "description": "Adds the author's bio, avatar, region, following count and total likes. Free: the fields are already in the response."
          },
          "scrape_related_search_words": {
            "title": "Related search words",
            "type": "boolean",
            "description": "Also collect the suggestions TikTok shows under the search box for each term. Written to the key-value store as 'related_search_words'. Free."
          },
          "should_download_videos": {
            "title": "Download the videos",
            "type": "boolean",
            "description": "Stores the MP4 in the run's key-value store and puts a public link on the row. TikTok's raw media links return 403 to anyone who pastes them elsewhere, which is why downloading is the only way to get a link that works."
          },
          "should_download_covers": {
            "title": "Download the thumbnails",
            "type": "boolean",
            "description": "Stores each video's thumbnail in the key-value store and puts a public link on the row."
          },
          "should_download_avatars": {
            "title": "Download the author avatars",
            "type": "boolean",
            "description": "Stores the author's or account's profile picture and puts a public link on the row."
          },
          "should_download_music_covers": {
            "title": "Download the sound covers",
            "type": "boolean",
            "description": "Stores the artwork of the sound used in the video."
          },
          "should_download_slideshow_images": {
            "title": "Download slideshow images",
            "type": "boolean",
            "description": "Photo posts have no video at all. This stores each image instead."
          },
          "max_media_downloads": {
            "title": "Maximum files to download",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "A ceiling across every download option, so a large search cannot turn into a large bill by accident."
          },
          "video_kv_store_id_or_name": {
            "title": "Key-value store for the files",
            "type": "string",
            "description": "Name of a named key-value store to write downloads into. Leave empty to use the run's own store, which Apify deletes after the usual retention window."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code. Sent as TikTok's region on every request, and pins the proxy exit country when one is configured. The region parameter alone sat inside TikTok's own result volatility (measured 2026-09-24), so route through a proxy when the market matters.",
            "default": "us"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Two-letter language code for the search.",
            "default": "en"
          },
          "proxy_country_code": {
            "title": "Search from this country",
            "type": "string",
            "description": "Two-letter code pinning where the request should appear to come from, overriding the exit country taken from the Country field. Leave empty to pin the exit to the Country field itself."
          },
          "searchSection": {
            "title": "Legacy searchSection",
            "type": "string",
            "description": "Compatibility name for search_section. Kept so saved tasks and API calls written before the rename keep working. search_section wins if both are set."
          },
          "maxVideosPerKeyword": {
            "title": "Legacy maxVideosPerKeyword",
            "type": "integer",
            "description": "Compatibility name for max_videos_per_keyword. Kept so saved tasks and API calls written before the rename keep working. max_videos_per_keyword wins if both are set."
          },
          "maxProfilesPerQuery": {
            "title": "Legacy maxProfilesPerQuery",
            "type": "integer",
            "description": "Compatibility name for max_profiles_per_query. Kept so saved tasks and API calls written before the rename keep working. max_profiles_per_query wins if both are set."
          },
          "resultsPerPage": {
            "title": "Legacy resultsPerPage",
            "type": "integer",
            "description": "Compatibility name for results_per_page. Kept so saved tasks and API calls written before the rename keep working. results_per_page wins if both are set."
          },
          "sortBy": {
            "title": "Legacy sortBy",
            "type": "string",
            "description": "Compatibility name for sort_by. Kept so saved tasks and API calls written before the rename keep working. sort_by wins if both are set."
          },
          "oldestPostDate": {
            "title": "Legacy oldestPostDate",
            "type": "string",
            "description": "Compatibility name for oldest_post_date. Kept so saved tasks and API calls written before the rename keep working. oldest_post_date wins if both are set."
          },
          "newestPostDate": {
            "title": "Legacy newestPostDate",
            "type": "string",
            "description": "Compatibility name for newest_post_date. Kept so saved tasks and API calls written before the rename keep working. newest_post_date wins if both are set."
          },
          "leastDiggs": {
            "title": "Legacy leastDiggs",
            "type": "integer",
            "description": "Compatibility name for min_likes. Kept so saved tasks and API calls written before the rename keep working. min_likes wins if both are set."
          },
          "mostDiggs": {
            "title": "Legacy mostDiggs",
            "type": "integer",
            "description": "Compatibility name for max_likes. Kept so saved tasks and API calls written before the rename keep working. max_likes wins if both are set."
          },
          "excludeAds": {
            "title": "Legacy excludeAds",
            "type": "boolean",
            "description": "Compatibility name for exclude_ads. Kept so saved tasks and API calls written before the rename keep working. exclude_ads wins if both are set."
          },
          "scrapeAdditionalAuthorMeta": {
            "title": "Legacy scrapeAdditionalAuthorMeta",
            "type": "boolean",
            "description": "Compatibility name for scrape_additional_author_meta. Kept so saved tasks and API calls written before the rename keep working. scrape_additional_author_meta wins if both are set."
          },
          "scrapeRelatedSearchWords": {
            "title": "Legacy scrapeRelatedSearchWords",
            "type": "boolean",
            "description": "Compatibility name for scrape_related_search_words. Kept so saved tasks and API calls written before the rename keep working. scrape_related_search_words wins if both are set."
          },
          "shouldDownloadVideos": {
            "title": "Legacy shouldDownloadVideos",
            "type": "boolean",
            "description": "Compatibility name for should_download_videos. Kept so saved tasks and API calls written before the rename keep working. should_download_videos wins if both are set."
          },
          "shouldDownloadCovers": {
            "title": "Legacy shouldDownloadCovers",
            "type": "boolean",
            "description": "Compatibility name for should_download_covers. Kept so saved tasks and API calls written before the rename keep working. should_download_covers wins if both are set."
          },
          "shouldDownloadAvatars": {
            "title": "Legacy shouldDownloadAvatars",
            "type": "boolean",
            "description": "Compatibility name for should_download_avatars. Kept so saved tasks and API calls written before the rename keep working. should_download_avatars wins if both are set."
          },
          "shouldDownloadMusicCovers": {
            "title": "Legacy shouldDownloadMusicCovers",
            "type": "boolean",
            "description": "Compatibility name for should_download_music_covers. Kept so saved tasks and API calls written before the rename keep working. should_download_music_covers wins if both are set."
          },
          "shouldDownloadSlideshowImages": {
            "title": "Legacy shouldDownloadSlideshowImages",
            "type": "boolean",
            "description": "Compatibility name for should_download_slideshow_images. Kept so saved tasks and API calls written before the rename keep working. should_download_slideshow_images wins if both are set."
          },
          "maxMediaDownloads": {
            "title": "Legacy maxMediaDownloads",
            "type": "integer",
            "description": "Compatibility name for max_media_downloads. Kept so saved tasks and API calls written before the rename keep working. max_media_downloads wins if both are set."
          },
          "videoKvStoreIdOrName": {
            "title": "Legacy videoKvStoreIdOrName",
            "type": "string",
            "description": "Compatibility name for video_kv_store_id_or_name. Kept so saved tasks and API calls written before the rename keep working. video_kv_store_id_or_name wins if both are set."
          },
          "proxyCountryCode": {
            "title": "Legacy proxyCountryCode",
            "type": "string",
            "description": "Compatibility name for proxy_country_code. Kept so saved tasks and API calls written before the rename keep working. proxy_country_code wins if both are set."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}