1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "input_text": "Apify is a platform for web scraping and data extraction. It enables you to automate anything you can do manually in a web browser. With Apify Actors, you can extract data from any website, process it, and store it in a format of your choice. Actors are serverless cloud programs that can do anything from scraping a single page to crawling an entire website. The headquarters is located in Prague, Czech Republic. I love using Apify because it saves me so much time and the community is great!",
10 "tasks": [
11 "summarization",
12 "sentiment",
13 "ner",
14 "classification",
15 ],
16}
17
18
19run = client.actor("valid_headlamp/ai-content-processor").call(run_input=run_input)
20
21
22print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
23for item in client.dataset(run["defaultDatasetId"]).iterate_items():
24 print(item)
25
26