import requests
# Set your UniSkill API Key
# 设置你的 UniSkill API 密钥
api_key = "YOUR_UNISKILL_API_KEY"
def perform_search(query):
# API endpoint for the search skill
# 搜索技能的 API 端点
url = "https://api.uniskill.ai/v1/search"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
payload = {
"query": query,
"count": 5,
"freshness": "week"
}
# Execute the request and handle the response
# 执行请求并处理返回结果
response = requests.post(url, json=payload, headers=headers)
return response.json()
results = perform_search("Latest news about AI Agents 2026")
print(results)