1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "noteUrls": [
10 "https://xhslink.com/o/5oTNHv9d7Mw",
11 "https://www.xiaohongshu.com/explore/64103fc0000000001203fc58?xsec_token=ABiKahsJveydyvyBLdalMttmQTGgGUAErs4_WU0a6AMd4=&xsec_source=pc_feed",
12 "https://www.xiaohongshu.com/explore/64a0deac000000001300e8e3?xsec_token=AB7F7OTfM7z8Wy4FYWzkdUpmeBqtq7wAs7eKjLY2EHzyg=&xsec_source=pc_feed",
13 "https://www.xiaohongshu.com/explore/64a76143000000001e013522?xsec_token=ABiZBO7VhFKBtbIJuwS1YLbZ-rdIwyS6laUKxwY1CuEvA=&xsec_source=pc_feed",
14 "https://www.xiaohongshu.com/explore/64a8e1d3000000002b03c038?xsec_token=AB8_h7dEM0cSPGLiVTqaQ16NB-M1GGOA8M_rjDO5Buo8A=&xsec_source=pc_feed",
15 "https://www.xiaohongshu.com/explore/64a14e7c000000001300eafc?xsec_token=ABAPu45bW13_SwHPWPuws4uC3mEuxrH2OHd2yWx7ylbcQ=&xsec_source=pc_feed",
16 "https://www.xiaohongshu.com/explore/64a5526f0000000016027c31?xsec_token=ABAGtrrS0w5pLKIte2XwU4DAt4KwrEdYScQx6mqB3v59o=&xsec_source=pc_feed",
17 "https://www.xiaohongshu.com/explore/64a4ff18000000002b038e8c?xsec_token=AB-cltee2fqQDTX7_NEj1kolrsporjEzE0vcbmR83q9KM=&xsec_source=pc_feed",
18 "https://www.xiaohongshu.com/explore/64aa3d0f000000001c01991c?xsec_token=AB6IVlhKW3peH0kdrjKXPwlw5-bxtft9aUZlRFHeLk3Fk=&xsec_source=pc_feed",
19 "https://www.xiaohongshu.com/explore/64a7e6170000000023036717?xsec_token=ABiZBO7VhFKBtbIJuwS1YLbYJrxR7ErNmFxmHh1JyDbMI=&xsec_source=pc_feed",
20 "https://www.xiaohongshu.com/explore/64a77e06000000002301e833?xsec_token=ABiZBO7VhFKBtbIJuwS1YLbaDSgH0bBpLHj3WBIcA6q8c=&xsec_source=pc_feed",
21 ],
22 "keywords": ["咖啡"],
23}
24
25
26run = client.actor("silentflow/rednote-detail-scraper").call(run_input=run_input)
27
28
29print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
30for item in client.dataset(run.default_dataset_id).iterate_items():
31 print(item)
32
33