1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "video_urls": ["https://www.youtube.com/shorts/WhNzhnXO16c"],
10 "schema": {
11 "type": "object",
12 "properties": {
13 "product_name": {
14 "type": "string",
15 "description": "Name of the product shown",
16 },
17 "price": {
18 "type": "number",
19 "description": "Price shown or said, in dollars",
20 },
21 "claims": {
22 "type": "array",
23 "description": "What the video says about the product",
24 "items": {
25 "type": "string",
26 "description": "One claim",
27 },
28 },
29 },
30 },
31}
32
33
34run = client.actor("invideoiq/ai-video-analysis").call(run_input=run_input)
35
36
37print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
38for item in client.dataset(run.default_dataset_id).iterate_items():
39 print(item)
40
41