1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "source_mode": "auto",
12 "search_query": "",
13 "profile_urls": [],
14 "max_items": 1000,
15 "since": "",
16 "until": "",
17 "search_sort": "Latest",
18 "all_words": [],
19 "any_words": [],
20 "exact_phrases": [],
21 "exclude_words": [],
22 "hashtags_any": [],
23 "hashtags_exclude": [],
24 "from_users": [],
25 "to_users": [],
26 "mentioning_users": [],
27 "lang": "",
28 "tweet_type": "all",
29 "verified_only": false,
30 "blue_verified_only": false,
31 "has_images": false,
32 "has_videos": false,
33 "has_links": false,
34 "has_mentions": false,
35 "has_hashtags": false,
36 "min_likes": 0,
37 "min_replies": 0,
38 "min_retweets": 0,
39 "place": "",
40 "geocode": "",
41 "near": "",
42 "within": ""
43};
44
45
46const run = await client.actor("altimis/scweet").call(input);
47
48
49console.log('Results from dataset');
50console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
51const { items } = await client.dataset(run.defaultDatasetId).listItems();
52items.forEach((item) => {
53 console.dir(item);
54});
55
56