Skip to main content

Overview

uniskill_search 技能允许你的 Agent 检索互联网上的最新信息。它经过专门优化,能够过滤掉广告和无关的噪音,仅返回对大模型(LLM)最有价值的结构化数据。

Credit Cost

  • Cost: 10 credits per call.
  • Rollover: Unused credits from your subscription rollover indefinitely.

Input Parameters

ParameterTypeRequiredDescription
querystringYesThe search query string.
countnumberNoNumber of results to return (Default: 5, Max: 20).
freshnessstringNoTime range for results: day, week, month, or year.

Code Examples

按照规范,变量名使用全英文,关键逻辑使用中文注释。
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)