1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "auditInput": {
9 "audit": {
10 "audit_id": "fixture-normal",
11 "as_of_date": "2026-09-03",
12 "marketplace": "US",
13 "currency": "USD",
14 "source_note": "constructed fixture; no seller data",
15 },
16 "report": {
17 "report_type": "sponsored_products_search_term",
18 "start_date": "2026-08-01",
19 "end_date": "2026-08-20",
20 "conversion_lag_days": 7,
21 },
22 "product": {
23 "vertical": "apparel",
24 "asin": "B0FIXTURE01",
25 "parent_asin": "B0PARENT01",
26 "category": "clothing_shoes_and_jewelry",
27 "apparel_segment": "tops",
28 "lifecycle": "evergreen",
29 "launch_stage": "growth",
30 "goal": "profit",
31 "price_per_order": 40,
32 "non_ad_variable_cost_per_order": 26,
33 "listing_status": "ready",
34 "featured_offer_status": "active",
35 "inventory_status": "in_stock",
36 "variation_health": "healthy",
37 "variation_theme": "size_color",
38 "cross_asin_orders_reviewed": True,
39 "variation_inventory": [
40 {
41 "child_asin": "B0FIXTURE01",
42 "size": "M",
43 "color": "black",
44 "inventory_status": "in_stock",
45 "listing_status": "ready",
46 "featured_offer_status": "active",
47 },
48 {
49 "child_asin": "B0FIXTURE02",
50 "size": "L",
51 "color": "black",
52 "inventory_status": "in_stock",
53 "listing_status": "ready",
54 "featured_offer_status": "active",
55 },
56 ],
57 },
58 "policy": {
59 "target_acos": 0.25,
60 "min_clicks_for_action": 10,
61 "min_orders_for_winner": 2,
62 "min_orders_for_expand": 2,
63 "max_clicks_without_order": 15,
64 "seasonal_replan_days": 14,
65 "high_bid_multiplier_warning": 4,
66 "allow_strategic_over_break_even": False,
67 "max_bid_change_pct": 20,
68 "max_budget_change_pct": 25,
69 },
70 "rows": [
71 {
72 "row_id": "exact-winner",
73 "campaign_id": "c-1",
74 "ad_group_id": "g-1",
75 "targeting_text": "women black travel shirt",
76 "customer_search_term": "women black travel shirt",
77 "advertised_asin": "B0FIXTURE01",
78 "purchased_asin": "B0FIXTURE01",
79 "match_type": "exact",
80 "relevance": "relevant",
81 "impressions": 1000,
82 "clicks": 50,
83 "spend": 20,
84 "sales": 120,
85 "orders": 3,
86 "base_bid": 0.65,
87 "daily_budget": 20,
88 "placement_adjustment_pct": 20,
89 "audience_adjustment_pct": 0,
90 "video_adjustment_pct": 0,
91 "bidding_strategy": "down_only",
92 },
93 {
94 "row_id": "broad-winner",
95 "campaign_id": "c-2",
96 "ad_group_id": "g-2",
97 "targeting_text": "women travel top",
98 "customer_search_term": "women black travel shirt",
99 "advertised_asin": "B0FIXTURE01",
100 "purchased_asin": "B0FIXTURE02",
101 "match_type": "broad",
102 "relevance": "relevant",
103 "impressions": 800,
104 "clicks": 40,
105 "spend": 18,
106 "sales": 80,
107 "orders": 2,
108 "bidding_strategy": "fixed",
109 },
110 {
111 "row_id": "converting-over-limit",
112 "campaign_id": "c-3",
113 "ad_group_id": "g-3",
114 "targeting_text": "women casual top",
115 "customer_search_term": "women casual black top",
116 "advertised_asin": "B0FIXTURE01",
117 "purchased_asin": "B0FIXTURE01",
118 "match_type": "phrase",
119 "relevance": "relevant",
120 "impressions": 600,
121 "clicks": 30,
122 "spend": 30,
123 "sales": 80,
124 "orders": 2,
125 "base_bid": 1.1,
126 "daily_budget": 30,
127 "placement_adjustment_pct": 50,
128 "audience_adjustment_pct": 0,
129 "video_adjustment_pct": 0,
130 "bidding_strategy": "fixed",
131 },
132 {
133 "row_id": "irrelevant-query",
134 "campaign_id": "c-4",
135 "ad_group_id": "g-4",
136 "targeting_text": "women tops",
137 "customer_search_term": "free sewing pattern software",
138 "advertised_asin": "B0FIXTURE01",
139 "match_type": "broad",
140 "relevance": "irrelevant",
141 "impressions": 500,
142 "clicks": 20,
143 "spend": 10,
144 "sales": 0,
145 "orders": 0,
146 "bidding_strategy": "down_only",
147 },
148 {
149 "row_id": "low-evidence",
150 "campaign_id": "c-5",
151 "ad_group_id": "g-5",
152 "targeting_text": "women travel shirt",
153 "customer_search_term": "women travel shirt",
154 "advertised_asin": "B0FIXTURE01",
155 "match_type": "exact",
156 "relevance": "relevant",
157 "impressions": 200,
158 "clicks": 5,
159 "spend": 3,
160 "sales": 0,
161 "orders": 0,
162 "bidding_strategy": "fixed",
163 },
164 ],
165 } }
166
167
168run = client.actor("ysoserious_h/amazon-us-apparel-ppc-decision-auditor").call(run_input=run_input)
169
170
171print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
172for item in client.dataset(run.default_dataset_id).iterate_items():
173 print(item)
174
175