1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "id": "1900000000000000001",
14 "url": "https://x.com/i/status/1900000000000000001",
15 "text": "Notion keeps logging me out on iOS since the last update. Third time today. @sample_user1 same for you?",
16 "createdAt": "2026-10-27T09:12:00Z",
17 "likeCount": 14,
18 "retweetCount": 2,
19 "replyCount": 5,
20 "viewCount": 2100,
21 "lang": "en"
22 },
23 {
24 "id": "1900000000000000002",
25 "url": "https://x.com/i/status/1900000000000000002",
26 "text": "Is there a way to export a whole Notion workspace to Markdown with the folder structure intact?",
27 "createdAt": "2026-10-27T14:40:00Z",
28 "likeCount": 3,
29 "retweetCount": 0,
30 "replyCount": 2,
31 "viewCount": 640,
32 "lang": "en"
33 },
34 {
35 "id": "1900000000000000003",
36 "url": "https://x.com/i/status/1900000000000000003",
37 "text": "Moved my notes from Evernote to Obsidian this weekend. Local files and the graph view are worth it.",
38 "createdAt": "2026-10-28T08:05:00Z",
39 "likeCount": 41,
40 "retweetCount": 6,
41 "replyCount": 9,
42 "viewCount": 5400,
43 "lang": "en"
44 },
45 {
46 "id": "1900000000000000004",
47 "url": "https://x.com/i/status/1900000000000000004",
48 "text": "Notion AI meeting notes just saved me an hour. Please add offline mode next!",
49 "createdAt": "2026-10-28T16:30:00Z",
50 "likeCount": 22,
51 "retweetCount": 3,
52 "replyCount": 1,
53 "viewCount": 3000,
54 "lang": "en"
55 },
56 {
57 "id": "1900000000000000005",
58 "url": "https://x.com/i/status/1900000000000000005",
59 "text": "I reject the notion that mornings are for productivity.",
60 "createdAt": "2026-10-28T18:00:00Z",
61 "likeCount": 5,
62 "retweetCount": 0,
63 "replyCount": 0,
64 "viewCount": 300,
65 "lang": "en"
66 }
67 ],
68 "brandNames": [
69 "Notion",
70 "Notion AI",
71 "@NotionHQ"
72 ],
73 "competitors": [
74 "Obsidian | @obsdmd",
75 "Evernote"
76 ],
77 "topicContext": "Note-taking and productivity apps"
78};
79
80
81const run = await client.actor("seasons-ai/tweets-to-brand-pulse").call(input);
82
83
84console.log('Results from dataset');
85console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
86const { items } = await client.dataset(run.defaultDatasetId).listItems();
87items.forEach((item) => {
88 console.dir(item);
89});
90
91