1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "buyerQuery": "consumer product recalls",
10 "taskIntent": "buyer-ready-product-run",
11 "sourceMode": "startUrls",
12 "outputMode": "buyer-ready-records",
13 "startUrls": [
14 { "url": "https://www.cpsc.gov/Recalls" },
15 { "url": "https://api.fda.gov/food/enforcement.json?limit=10" },
16 { "url": "https://ec.europa.eu/safety-gate/#/screen/search" },
17 ],
18 "requestTimeoutSecs": 30,
19 "maxRequestRetries": 2,
20 "sinceLastRun": False,
21 "deltaMode": True,
22 "memberTimeoutSecs": 300,
23 "zentraOwnerQa": False,
24}
25
26
27run = client.actor("zentrafoundry/product-recall-unified-monitor").call(run_input=run_input)
28
29
30print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
31for item in client.dataset(run.default_dataset_id).iterate_items():
32 print(item)
33
34