1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "items",
10 "items": [
11 {
12 "name": "Acme AI",
13 "domain": "https://acme.ai",
14 "email": "hello@acme.ai",
15 "employeeCount": 42,
16 "sourceUrl": "https://example.com/acme",
17 },
18 {
19 "name": "Acme AI Inc.",
20 "domain": "acme.ai",
21 "email": "",
22 "employeeCount": "42",
23 "sourceUrl": "not a url",
24 },
25 {
26 "name": "Beta Tools",
27 "domain": "beta.tools",
28 "email": "sales@beta.tools",
29 "employeeCount": 12,
30 "sourceUrl": "https://example.com/beta",
31 },
32 {
33 "name": "",
34 "domain": "gamma.example",
35 "email": "bad-email",
36 "employeeCount": None,
37 "sourceUrl": "https://example.com/gamma",
38 },
39 {
40 "domain": "delta.example",
41 "email": "contact@delta.example",
42 "employeeCount": 8,
43 "sourceUrl": "https://example.com/delta",
44 },
45 ],
46 "requiredFields": [
47 "name",
48 "domain",
49 ],
50 "uniqueKeys": ["domain"],
51 "urlFields": [
52 "domain",
53 "sourceUrl",
54 ],
55 "emailFields": ["email"],
56}
57
58
59run = client.actor("rotvuvo/apify-dataset-release-qa-gate").call(run_input=run_input)
60
61
62print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
63for item in client.dataset(run["defaultDatasetId"]).iterate_items():
64 print(item)
65
66