1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "rows": [
10 {
11 "name": "Python Software Foundation",
12 "website": "https://www.python.org/",
13 "city": "Beaverton",
14 "source": "maps run 1",
15 },
16 {
17 "name": "Mozilla",
18 "website": "https://www.mozilla.org/en-US/",
19 "city": "San Francisco",
20 "source": "maps run 1",
21 },
22 {
23 "name": "Wikimedia Foundation",
24 "website": "https://wikimediafoundation.org",
25 "city": "San Francisco",
26 "source": "maps run 1",
27 },
28 {
29 "name": "Python Software Foundation ",
30 "website": "python.org",
31 "city": "Beaverton",
32 "source": "maps run 2",
33 },
34 {
35 "name": "Mozilla Foundation",
36 "website": "http://mozilla.org/en-US?utm_source=maps",
37 "city": "San Francisco",
38 "source": "maps run 2",
39 },
40 {
41 "name": "Apache Software Foundation",
42 "website": "https://www.apache.org/",
43 "city": "Wilmington",
44 "source": "maps run 2",
45 },
46 {
47 "name": "No website listed",
48 "website": "",
49 "city": "Unknown",
50 "source": "maps run 2",
51 },
52 ],
53 "dedupeBy": ["website"],
54}
55
56
57run = client.actor("stellalytics/dataset-merge-dedupe").call(run_input=run_input)
58
59
60print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
61for item in client.dataset(run.default_dataset_id).iterate_items():
62 print(item)
63
64