1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "rows": [
10 {
11 "id": "demo-product-0",
12 "url": "https://example.com/products/0",
13 "title": "红色棉质短袖 M",
14 "price": "¥12.5-15.0/件",
15 "supplierId": "demo-supplier-0",
16 "demo": True,
17 },
18 {
19 "id": "demo-product-1",
20 "url": "https://example.com/products/1",
21 "title": "蓝色不锈钢水杯 500ml",
22 "price": "≥100件 ¥9.8",
23 "supplierId": "demo-supplier-1",
24 "demo": True,
25 },
26 {
27 "id": "demo-product-2",
28 "url": "https://example.com/products/2",
29 "title": "黑色塑料收纳箱 L",
30 "price": "¥80/箱",
31 "supplierId": "demo-supplier-2",
32 "demo": True,
33 },
34 {
35 "id": "demo-product-3",
36 "url": "https://example.com/products/3",
37 "title": "红色棉质短袖 M",
38 "price": "¥0/个",
39 "supplierId": "demo-supplier-3",
40 "demo": True,
41 },
42 {
43 "id": "demo-product-4",
44 "url": "https://example.com/products/4",
45 "title": "蓝色不锈钢水杯 500ml",
46 "price": "¥25/套",
47 "supplierId": "demo-supplier-0",
48 "demo": True,
49 },
50 {
51 "id": "demo-product-5",
52 "url": "https://example.com/products/5",
53 "title": "黑色塑料收纳箱 L",
54 "price": "¥4.5/kg",
55 "supplierId": "demo-supplier-1",
56 "demo": True,
57 },
58 {
59 "id": "demo-product-6",
60 "url": "https://example.com/products/6",
61 "title": "红色棉质短袖 M",
62 "price": "¥12.5-15.0/件",
63 "supplierId": "demo-supplier-2",
64 "demo": True,
65 },
66 {
67 "id": "demo-product-7",
68 "url": "https://example.com/products/7",
69 "title": "蓝色不锈钢水杯 500ml",
70 "price": "≥100件 ¥9.8",
71 "supplierId": "demo-supplier-3",
72 "demo": True,
73 },
74 {
75 "id": "demo-product-8",
76 "url": "https://example.com/products/8",
77 "title": "黑色塑料收纳箱 L",
78 "price": "¥80/箱",
79 "supplierId": "demo-supplier-0",
80 "demo": True,
81 },
82 {
83 "id": "demo-product-9",
84 "url": "https://example.com/products/9",
85 "title": "红色棉质短袖 M",
86 "price": "¥0/个",
87 "supplierId": "demo-supplier-1",
88 "demo": True,
89 },
90 {
91 "id": "demo-product-10",
92 "url": "https://example.com/products/10",
93 "title": "蓝色不锈钢水杯 500ml",
94 "price": "¥25/套",
95 "supplierId": "demo-supplier-2",
96 "demo": True,
97 },
98 {
99 "id": "demo-product-11",
100 "url": "https://example.com/products/11",
101 "title": "黑色塑料收纳箱 L",
102 "price": "¥4.5/kg",
103 "supplierId": "demo-supplier-3",
104 "demo": True,
105 },
106 {
107 "id": "demo-product-12",
108 "url": "https://example.com/products/12",
109 "title": "红色棉质短袖 M",
110 "price": "¥12.5-15.0/件",
111 "supplierId": "demo-supplier-0",
112 "demo": True,
113 },
114 {
115 "id": "demo-product-13",
116 "url": "https://example.com/products/13",
117 "title": "蓝色不锈钢水杯 500ml",
118 "price": "≥100件 ¥9.8",
119 "supplierId": "demo-supplier-1",
120 "demo": True,
121 },
122 {
123 "id": "demo-product-14",
124 "url": "https://example.com/products/14",
125 "title": "黑色塑料收纳箱 L",
126 "price": "¥80/箱",
127 "supplierId": "demo-supplier-2",
128 "demo": True,
129 },
130 {
131 "id": "demo-product-15",
132 "url": "https://example.com/products/15",
133 "title": "红色棉质短袖 M",
134 "price": "¥0/个",
135 "supplierId": "demo-supplier-3",
136 "demo": True,
137 },
138 {
139 "id": "demo-product-16",
140 "url": "https://example.com/products/16",
141 "title": "蓝色不锈钢水杯 500ml",
142 "price": "¥25/套",
143 "supplierId": "demo-supplier-0",
144 "demo": True,
145 },
146 {
147 "id": "demo-product-17",
148 "url": "https://example.com/products/17",
149 "title": "黑色塑料收纳箱 L",
150 "price": "¥4.5/kg",
151 "supplierId": "demo-supplier-1",
152 "demo": True,
153 },
154 {
155 "id": "demo-product-18",
156 "url": "https://example.com/products/18",
157 "title": "红色棉质短袖 M",
158 "price": "¥12.5-15.0/件",
159 "supplierId": "demo-supplier-2",
160 "demo": True,
161 },
162 {
163 "id": "demo-product-19",
164 "url": "https://example.com/products/19",
165 "title": "蓝色不锈钢水杯 500ml",
166 "price": "≥100件 ¥9.8",
167 "supplierId": "demo-supplier-3",
168 "demo": True,
169 },
170 {
171 "id": "demo-product-20",
172 "url": "https://example.com/products/20",
173 "title": "黑色塑料收纳箱 L",
174 "price": "¥80/箱",
175 "supplierId": "demo-supplier-0",
176 "demo": True,
177 },
178 {
179 "id": "demo-product-21",
180 "url": "https://example.com/products/21",
181 "title": "红色棉质短袖 M",
182 "price": "¥0/个",
183 "supplierId": "demo-supplier-1",
184 "demo": True,
185 },
186 {
187 "id": "demo-product-22",
188 "url": "https://example.com/products/22",
189 "title": "蓝色不锈钢水杯 500ml",
190 "price": "¥25/套",
191 "supplierId": "demo-supplier-2",
192 "demo": True,
193 },
194 {
195 "id": "demo-product-23",
196 "url": "https://example.com/products/23",
197 "title": "黑色塑料收纳箱 L",
198 "price": "¥4.5/kg",
199 "supplierId": "demo-supplier-3",
200 "demo": True,
201 },
202 {
203 "id": "demo-product-24",
204 "url": "https://example.com/products/24",
205 "title": "红色棉质短袖 M",
206 "price": "¥12.5-15.0/件",
207 "supplierId": "demo-supplier-0",
208 "demo": True,
209 },
210 {
211 "id": "demo-product-25",
212 "url": "https://example.com/products/25",
213 "title": "蓝色不锈钢水杯 500ml",
214 "price": "≥100件 ¥9.8",
215 "supplierId": "demo-supplier-1",
216 "demo": True,
217 },
218 {
219 "id": "demo-product-26",
220 "url": "https://example.com/products/26",
221 "title": "黑色塑料收纳箱 L",
222 "price": "¥80/箱",
223 "supplierId": "demo-supplier-2",
224 "demo": True,
225 },
226 {
227 "id": "demo-product-27",
228 "url": "https://example.com/products/27",
229 "title": "红色棉质短袖 M",
230 "price": "¥0/个",
231 "supplierId": "demo-supplier-3",
232 "demo": True,
233 },
234 {
235 "id": "demo-product-28",
236 "url": "https://example.com/products/28",
237 "title": "蓝色不锈钢水杯 500ml",
238 "price": "¥25/套",
239 "supplierId": "demo-supplier-0",
240 "demo": True,
241 },
242 {
243 "id": "demo-product-0",
244 "url": "https://example.com/products/0",
245 "title": "黑色塑料收纳箱 L",
246 "price": "¥4.5/kg",
247 "supplierId": "demo-supplier-1",
248 "demo": True,
249 },
250 ],
251 "fieldMap": {},
252 "targetCurrencies": [
253 "USD",
254 "EUR",
255 ],
256 "deduplicate": True,
257 "includePinyin": True,
258 "includeTraditional": True,
259 "maxItems": 30,
260}
261
262
263run = client.actor("zinin/1688-taobao-product-dataset-normalizer").call(run_input=run_input)
264
265
266print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
267for item in client.dataset(run.default_dataset_id).iterate_items():
268 print(item)
269
270