1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "urls": [
10 "https://en.wikipedia.org/wiki/Markdown",
11 "https://docs.python.org/3/tutorial/introduction.html",
12 "https://www.propublica.org/article/3m-forever-chemicals-pfas-pfos-inside-story",
13 ],
14 "render": False,
15 "respectRobotsTxt": True,
16 "timeoutSecs": 30,
17 "userAgent": "Mozilla/5.0 (compatible; AgentFetchBot/1.0; +https://apify.com/omargnagy/agent-fetch-markdown)",
18 "includeLinks": True,
19 "includeArticleJson": False,
20 "maxMarkdownChars": 120000,
21}
22
23
24run = client.actor("omargnagy/agent-fetch-markdown").call(run_input=run_input)
25
26
27print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
28for item in client.dataset(run.default_dataset_id).iterate_items():
29 print(item)
30
31