1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "services": "marketing agency",
10 "location": "New York",
11 "sources": [
12 "google-maps",
13 "superbcompanies",
14 ],
15 "maxAgenciesPerSource": 50,
16 "preset": "none",
17 "mode": "list-builder",
18 "strategy": "balanced",
19 "outputMode": "raw",
20 "targetProfile": {
21 "services": [
22 "SEO",
23 "PPC",
24 ],
25 "minEmployees": 10,
26 "maxEmployees": 100,
27 "minRating": 4,
28 },
29 "includeEmails": False,
30 "previousDatasetId": "",
31 "proxyConfiguration": { "useApifyProxy": True },
32}
33
34
35run = client.actor("ryanclinton/agency-directory-scraper").call(run_input=run_input)
36
37
38print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
39for item in client.dataset(run["defaultDatasetId"]).iterate_items():
40 print(item)
41
42