1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "searchQuery": "AI",
10 "feeds": [
11 "top",
12 "new",
13 "best",
14 "ask",
15 "show",
16 "job",
17 ],
18 "recordTypes": [
19 "story",
20 "comment",
21 "job",
22 "poll",
23 "pollopt",
24 ],
25 "itemIds": [],
26 "enrichDetails": True,
27 "skipNoLeads": False,
28 "maxItems": 1,
29}
30
31
32run = client.actor("lentic_clockss/hacker-news-scraper").call(run_input=run_input)
33
34
35print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
36for item in client.dataset(run.default_dataset_id).iterate_items():
37 print(item)
38
39