1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "datasetIds": [],
10 "csvUrls": [],
11 "inlineRecords": [
12 {
13 "businessName": "Acme Coffee Roasters",
14 "email": "Hello@AcmeCoffee.com",
15 "phone": "(415) 555-2671",
16 "city": "San Francisco",
17 },
18 {
19 "name": "Acme Coffee",
20 "emails": ["hello@acmecoffee.com"],
21 "website": "https://www.acmecoffee.com",
22 "city": "San Francisco",
23 },
24 {
25 "businessName": "Bluebird Bakery",
26 "email": "info@bluebirdbakery.co",
27 "phoneNumber": "+1 212 555 0188",
28 },
29 {
30 "title": "Bluebird Bakery",
31 "email": "INFO@bluebirdbakery.co",
32 "website": "bluebirdbakery.co",
33 },
34 {
35 "name": "Sunrise Yoga Studio",
36 "email": "contact@sunriseyoga.com",
37 "city": "Austin",
38 },
39 ],
40 "dedupeKeys": ["email"],
41 "mergeStrategy": "most_complete",
42 "defaultCountry": "US",
43}
44
45
46run = client.actor("jurassic_jove/lead-deduplicator-merger").call(run_input=run_input)
47
48
49print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
50for item in client.dataset(run["defaultDatasetId"]).iterate_items():
51 print(item)
52
53