1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "productKeywords": [
10 "email marketing",
11 "newsletter tool",
12 ],
13 "sourceMode": "list",
14 "offer": "Email marketing tool for Shopify stores",
15 "maxDiscoveryChargeUsd": 0.5,
16 "itemsList": [
17 {
18 "id": "1971839201584730112",
19 "url": "https://x.com/mayachenmakes/status/1971839201584730112",
20 "text": "Switching from Mailchimp, it's getting way too expensive for a 3k-subscriber list. What email marketing tool do other Shopify stores use?",
21 "createdAt": "Sat Sep 26 14:12:00 +0000 2026",
22 "lang": "en",
23 "likeCount": 14,
24 "replyCount": 1,
25 "retweetCount": 2,
26 "viewCount": 2310,
27 "isReply": False,
28 "isRetweet": False,
29 "conversationId": "1971839201584730112",
30 "searchTerm": "(\"Mailchimp alternative\" OR \"switching from Mailchimp\") -filter:nativeretweets -filter:links lang:en",
31 "authorId": "1402937745",
32 "authorUsername": "mayachenmakes",
33 "authorName": "Maya Chen (sample)",
34 "authorDescription": "Founder @threadandloom Β· handmade linen on Shopify Β· ecommerce nerd",
35 "authorFollowers": 2140,
36 "authorFollowing": 610,
37 "authorLocation": "Portland, OR",
38 "authorUrl": "https://threadandloom.example",
39 "authorCreatedAt": "Tue Mar 03 09:00:00 +0000 2015",
40 "authorIsBlueVerified": False,
41 "authorIsAutomated": False,
42 "authorProtected": False,
43 },
44 {
45 "id": "1971802655010341201",
46 "url": "https://x.com/jdrewbakes/status/1971802655010341201",
47 "text": "Can anyone recommend a newsletter tool that plays nice with Shopify? Need abandoned-cart emails without paying a fortune.",
48 "createdAt": "Sat Sep 26 11:47:00 +0000 2026",
49 "lang": "en",
50 "likeCount": 6,
51 "replyCount": 0,
52 "retweetCount": 0,
53 "viewCount": 880,
54 "isReply": True,
55 "inReplyToUsername": "shopify",
56 "isRetweet": False,
57 "conversationId": "1971797001882240000",
58 "searchTerm": "(\"can anyone recommend\" OR \"any recommendations\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
59 "authorId": "2291840012",
60 "authorUsername": "jdrewbakes",
61 "authorName": "Jordan Drew (sample)",
62 "authorDescription": "Owner at Drew's Bakehouse. Sourdough, Shopify and too much coffee. hello@drewsbakehouse.example",
63 "authorFollowers": 860,
64 "authorFollowing": 402,
65 "authorLocation": "Leeds, UK",
66 "authorCreatedAt": "Fri Jun 12 18:30:00 +0000 2020",
67 "authorIsBlueVerified": False,
68 "authorIsAutomated": False,
69 "authorProtected": False,
70 },
71 {
72 "id": "1971790112930027520",
73 "url": "https://x.com/kaylaships/status/1971790112930027520",
74 "text": "Our Klaviyo bill doubled this year and flows keep breaking. Seriously looking for a Klaviyo alternative for email marketing before our renewal in October.",
75 "createdAt": "Sat Sep 26 10:58:00 +0000 2026",
76 "lang": "en",
77 "likeCount": 41,
78 "replyCount": 3,
79 "retweetCount": 4,
80 "viewCount": 9120,
81 "isReply": False,
82 "isRetweet": False,
83 "conversationId": "1971790112930027520",
84 "searchTerm": "(\"Klaviyo alternative\" OR \"switching from Klaviyo\") -filter:nativeretweets -filter:links lang:en",
85 "authorId": "887123450",
86 "authorUsername": "kaylaships",
87 "authorName": "Kayla Ortiz (sample)",
88 "authorDescription": "Head of Growth at Northpeak Supply | DTC & ecommerce",
89 "authorFollowers": 5400,
90 "authorFollowing": 1210,
91 "authorLocation": "Austin, TX",
92 "authorUrl": "https://northpeak.example",
93 "authorCreatedAt": "Wed Jan 14 16:20:00 +0000 2015",
94 "authorIsBlueVerified": True,
95 "authorIsAutomated": False,
96 "authorProtected": False,
97 },
98 {
99 "id": "1971761830077370988",
100 "url": "https://x.com/priyamakes/status/1971761830077370988",
101 "text": "Any recommendations for a newsletter tool that is free until 500 subscribers? Launching my candle shop on Shopify next week.",
102 "createdAt": "Sat Sep 26 09:05:00 +0000 2026",
103 "lang": "en",
104 "likeCount": 3,
105 "replyCount": 0,
106 "retweetCount": 0,
107 "viewCount": 410,
108 "isReply": False,
109 "isRetweet": False,
110 "isQuoteStatus": True,
111 "quoted_tweet": { "text": "Launch week checklist for new Shopify stores: domain, payments, a welcome email." },
112 "conversationId": "1971761830077370988",
113 "searchTerm": "(\"can anyone recommend\" OR \"any recommendations\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
114 "authorId": "1500021987",
115 "authorUsername": "priyamakes",
116 "authorName": "Priya Nair (sample)",
117 "authorDescription": "Frontend developer. Building a tiny candle shop on the side.",
118 "authorFollowers": 310,
119 "authorFollowing": 280,
120 "authorLocation": "Toronto",
121 "authorCreatedAt": "Mon Mar 07 12:00:00 +0000 2022",
122 "authorIsBlueVerified": False,
123 "authorIsAutomated": False,
124 "authorProtected": False,
125 },
126 {
127 "id": "1971755002111823872",
128 "url": "https://x.com/benbuildsstuff/status/1971755002111823872",
129 "text": "We just launched our new email marketing tool for Shopify! 50% off with code LAUNCH50, link in bio",
130 "createdAt": "Sat Sep 26 08:38:00 +0000 2026",
131 "lang": "en",
132 "likeCount": 22,
133 "replyCount": 5,
134 "retweetCount": 6,
135 "viewCount": 4020,
136 "isReply": False,
137 "isRetweet": False,
138 "searchTerm": "(\"looking for\" OR \"best tool for\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
139 "authorId": "3301122334",
140 "authorUsername": "benbuildsstuff",
141 "authorName": "Ben Ruiz (sample)",
142 "authorDescription": "Building MailBloom, email for Shopify",
143 "authorFollowers": 1800,
144 "authorIsAutomated": False,
145 "authorProtected": False,
146 },
147 {
148 "id": "1971740188200001536",
149 "url": "https://x.com/lumenhomegoods/status/1971740188200001536",
150 "text": "We're hiring an email marketing manager for our Shopify brand! Remote, 3 days a week. DM me.",
151 "createdAt": "Sat Sep 26 07:39:00 +0000 2026",
152 "lang": "en",
153 "likeCount": 9,
154 "replyCount": 2,
155 "retweetCount": 3,
156 "viewCount": 1500,
157 "isReply": False,
158 "isRetweet": False,
159 "searchTerm": "(\"looking for\" OR \"need a\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
160 "authorId": "4410092211",
161 "authorUsername": "lumenhomegoods",
162 "authorName": "Lumen Home Goods (sample)",
163 "authorDescription": "Home goods, made slowly. Shopify store.",
164 "authorFollowers": 7400,
165 "authorIsAutomated": False,
166 "authorProtected": False,
167 },
168 {
169 "id": "1971722904455512064",
170 "url": "https://x.com/dealsdailyhq/status/1971722904455512064",
171 "text": "GIVEAWAY: RT and follow to win a 1-year newsletter tool subscription! #giveaway #shopify #email #marketing #ecommerce #win",
172 "createdAt": "Sat Sep 26 06:30:00 +0000 2026",
173 "lang": "en",
174 "likeCount": 120,
175 "replyCount": 64,
176 "retweetCount": 210,
177 "viewCount": 22000,
178 "isReply": False,
179 "isRetweet": False,
180 "searchTerm": "(\"looking for\" OR \"best tool for\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
181 "authorId": "5500112233",
182 "authorUsername": "dealsdailyhq",
183 "authorName": "Deals Daily (sample)",
184 "authorDescription": "Daily deals for makers",
185 "authorFollowers": 15800,
186 "authorIsAutomated": False,
187 "authorProtected": False,
188 },
189 {
190 "id": "1971710077431996416",
191 "url": "https://x.com/marcuswebb_ecom/status/1971710077431996416",
192 "text": "Not looking for recommendations, just venting: email marketing deliverability in 2026 is a mess.",
193 "createdAt": "Sat Sep 26 05:39:00 +0000 2026",
194 "lang": "en",
195 "likeCount": 33,
196 "replyCount": 12,
197 "retweetCount": 2,
198 "viewCount": 6100,
199 "isReply": False,
200 "isRetweet": False,
201 "searchTerm": "(\"sick of\" OR \"frustrated with\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
202 "authorId": "6612300441",
203 "authorUsername": "marcuswebb_ecom",
204 "authorName": "Marcus Webb (sample)",
205 "authorDescription": "Ecommerce consultant. I help Shopify brands grow retention.",
206 "authorFollowers": 12800,
207 "authorIsAutomated": False,
208 "authorProtected": False,
209 },
210 {
211 "id": "1971698830113120256",
212 "url": "https://x.com/shoptipsbot/status/1971698830113120256",
213 "text": "Looking for an email marketing tool? Here are 5 we tested for Shopify stores this month",
214 "createdAt": "Sat Sep 26 04:54:00 +0000 2026",
215 "lang": "en",
216 "likeCount": 2,
217 "replyCount": 0,
218 "retweetCount": 1,
219 "viewCount": 300,
220 "isReply": False,
221 "isRetweet": False,
222 "searchTerm": "(\"looking for\" OR \"best tool for\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
223 "authorId": "7700998811",
224 "authorUsername": "shoptipsbot",
225 "authorName": "Shop Tips Bot (sample)",
226 "authorDescription": "Automated tips for online stores",
227 "authorFollowers": 950,
228 "authorIsAutomated": True,
229 "authorProtected": False,
230 },
231 ],
232 "discoveryInput": {},
233}
234
235
236run = client.actor("rich_minds/twitter-lead-generation-ai").call(run_input=run_input)
237
238
239print(f"πΎ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
240for item in client.dataset(run.default_dataset_id).iterate_items():
241 print(item)
242
243