1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "serviceCategory": "digital-marketing",
10 "location": "United States",
11 "maxAgencies": 50,
12 "directorySources": [
13 "clutch",
14 "sortlist",
15 "agencyspotter",
16 "designrush",
17 ],
18 "emailTemplate": """Hi {{firstName}},
19
20I came across {{companyName}} and was impressed by your work in {{topService}}.
21
22I'd love to explore whether we might be a fit to work together.
23
24Would you have 15 minutes for a quick call this week?
25
26Best,
27[Your name]
28
29---
30To unsubscribe: {{unsubscribeLink}}""",
31 "emailSubject": "Quick question for {{companyName}}",
32 "finalStep": "none",
33 "proxyConfiguration": { "useApifyProxy": True },
34}
35
36
37run = client.actor("ryanclinton/agency-lead-gen-pipeline").call(run_input=run_input)
38
39
40print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
41for item in client.dataset(run["defaultDatasetId"]).iterate_items():
42 print(item)
43
44