1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "startUrls": [
10 "https://www.tiktok.com/@billieeilish/video/7050551461734042926",
11 "https://www.tiktok.com/@rabbitbrandmy/photo/7553874290735729940",
12 "https://www.tiktok.com/@gordonramsayofficial",
13 "https://www.tiktok.com/search?q=Recipes",
14 "https://www.tiktok.com/tag/duet",
15 "https://www.tiktok.com/music/original-sound-Newcastle-United-7297730198175402784",
16 "https://www.tiktok.com/place/New-York-22535796481546927",
17 ],
18 "maxItems": 1000,
19 "keywords": [
20 "Artificial Intelligence",
21 "podcast",
22 ],
23 "dateRange": "DEFAULT",
24 "location": "US",
25 "sortType": "RELEVANCE",
26 "customMapFunction": "(object) => { return {...object} }",
27}
28
29
30run = client.actor("apidojo/tiktok-scraper").call(run_input=run_input)
31
32
33print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
34for item in client.dataset(run.default_dataset_id).iterate_items():
35 print(item)
36
37