1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "rows": [
10 {
11 "company": "Acme Robotics",
12 "website": "https://www.acme-robotics.example/?utm_source=newsletter",
13 "country": "DE",
14 "employees": 120,
15 "industry": "Robotics",
16 },
17 {
18 "company": "ACME Robotics GmbH",
19 "website": "acme-robotics.example",
20 "country": "DE",
21 "employees": 120,
22 "industry": "Robotics",
23 },
24 {
25 "company": "Bluefin Analytics",
26 "website": "https://bluefin-analytics.example/about",
27 "country": "GB",
28 "employees": 45,
29 "industry": "Software",
30 },
31 {
32 "company": "Cedar & Stone Builders",
33 "website": "http://cedarstone.example",
34 "country": "US",
35 "employees": 8,
36 "industry": "Construction",
37 },
38 {
39 "company": "Delta Freight Partners",
40 "website": "https://www.deltafreight.example/contact/",
41 "country": "NL",
42 "employees": 310,
43 "industry": "Logistics",
44 },
45 {
46 "company": "Bluefin Analytics Ltd",
47 "website": "https://BLUEFIN-ANALYTICS.example/?utm_campaign=q3",
48 "country": "GB",
49 "employees": 47,
50 "industry": "Software",
51 },
52 {
53 "company": "Evergreen Solar Co",
54 "website": "https://evergreen-solar.example",
55 "country": "ES",
56 "employees": 64,
57 "industry": "Energy",
58 },
59 {
60 "company": "Fjord Bio",
61 "website": "https://fjordbio.example/en/",
62 "country": "NO",
63 "employees": 5,
64 "industry": "Biotech",
65 },
66 {
67 "company": "Granite Data Systems",
68 "website": "https://granitedata.example/?utm_medium=cpc&page=2",
69 "country": "US",
70 "employees": 1500,
71 "industry": "Software",
72 },
73 {
74 "company": "Harbor Lane Coffee",
75 "website": "",
76 "country": "US",
77 "employees": 22,
78 "industry": "Food",
79 },
80 {
81 "company": "Delta Freight Partners B.V.",
82 "website": "deltafreight.example",
83 "country": "NL",
84 "employees": 305,
85 "industry": "Logistics",
86 },
87 ],
88 "normalizeUrlFields": ["website"],
89 "extractDomainFrom": "website",
90 "filters": [{
91 "field": "employees",
92 "op": "gte",
93 "value": 10,
94 }],
95 "dedupeFields": ["domain"],
96 "sortBy": "employees",
97 "sortDirection": "desc",
98 "exportFormats": ["csv"],
99}
100
101
102run = client.actor("saliga/dataset-merge-dedupe").call(run_input=run_input)
103
104
105print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
106for item in client.dataset(run.default_dataset_id).iterate_items():
107 print(item)
108
109