1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "trackingInputs": [
10 {
11 "trackingNumber": "LP00123456789012",
12 "orderId": "8182736455463721",
13 },
14 {
15 "trackingNumber": "CNABC0012345678",
16 "carrierHint": "Cainiao",
17 "countryHint": "PK",
18 },
19 ],
20 "sourcePriority": [
21 "cainiao_web",
22 "aliexpress_web",
23 "seventeen_track_web",
24 ],
25 "includeEventHistory": True,
26 "includeRawSourcePayload": False,
27 "includeDerivedStatus": True,
28 "maxEventsPerTracking": 50,
29 "outputMode": "dataset",
30 "outputKvStoreKey": "TRACKING_OUTPUT",
31 "requestTimeoutSecs": 45,
32 "maxConcurrency": 3,
33 "retriesPerSource": 2,
34 "challengeWaitSecs": 12,
35 "blockAssets": True,
36 "debugMode": False,
37 "saveHtmlSnapshot": False,
38 "saveScreenshot": False,
39 "useCarrierAutoDetect": True,
40 "cookiesText": "",
41 "cookiesJson": "",
42 "seventeenTrackApiKey": "",
43}
44
45
46run = client.actor("sovanza.inc/ali-express-tracking").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