1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "agentSkills": """apify/agent-skills
10# One skill per line โ owner/repo or a GitHub repo URL:
11# anthropics/skills
12# https://github.com/anthropics/skills""",
13 "nodeDependencies": """# One package@version per line (omit @version for latest):
14# zod@^3.0
15# axios""",
16 "pythonRequirements": """# One package per line:
17# requests==2.31.0
18# pandas""",
19 "initBashScript": """#!/bin/bash
20# Runs on startup. Uncomment or add your own:
21# apt-get update && apt-get install -y jq
22# mkdir -p /sandbox/data""",
23 "idleTimeoutSecs": 900,
24 "bridges": [{
25 "path": "/myapp",
26 "target": "http://127.0.0.1:3000/myapp",
27 }],
28}
29
30
31run = client.actor("apify/ai-code-sandbox").call(run_input=run_input)
32
33
34print("๐พ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
35for item in client.dataset(run["defaultDatasetId"]).iterate_items():
36 print(item)
37
38