1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "conversionGoal": "lead_submission",
10 "pages": [
11 {
12 "pageId": "lead-home",
13 "url": "https://example.com/offer",
14 "ok": True,
15 "adPromise": "Book a 15 minute product walkthrough",
16 "verifiedTrustEvidence": False,
17 "findings": [
18 {
19 "id": "fetch",
20 "status": "PASS",
21 "message": "The page returned HTTP 200.",
22 },
23 {
24 "id": "message_match",
25 "status": "WARN",
26 "message": "Ad copy token overlap was 40 percent.",
27 },
28 {
29 "id": "cta",
30 "status": "WARN",
31 "message": "Seven possible calls to action were detected.",
32 },
33 {
34 "id": "form_length",
35 "status": "WARN",
36 "message": "The selected form contains ten required fields.",
37 },
38 {
39 "id": "trust_signals",
40 "status": "FAIL",
41 "message": "No supported trust signal type was detected.",
42 },
43 {
44 "id": "analytics",
45 "status": "PASS",
46 "message": "An analytics script was detected in HTML.",
47 },
48 ],
49 },
50 {
51 "pageId": "contact",
52 "url": "https://example.com/contact",
53 "ok": False,
54 "findings": [
55 {
56 "id": "fetch",
57 "status": "FAIL",
58 "message": "The page could not be fetched.",
59 },
60 {
61 "id": "cta",
62 "status": "FAIL",
63 "message": "The supplied audit has no recognized CTA.",
64 },
65 ],
66 },
67 ],
68}
69
70
71run = client.actor("danielmichalek/landing-page-ab-hypothesis-generator").call(run_input=run_input)
72
73
74print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
75for item in client.dataset(run.default_dataset_id).iterate_items():
76 print(item)
77
78