Skip to main content

Overview

The uniskill_search skill allows your agent to retrieve the latest information from the internet. It is specifically optimized to filter out ads and irrelevant noise, returning only high-value structured data optimized for Large Language Models (LLMs).

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.

Response Headers

Every request to the UniSkill Gateway returns standard headers to help you track your usage and limits:
HeaderDescription
X-RateLimit-LimitYour maximum allowed requests per minute (RPM).
X-RateLimit-RemainingRemaining requests allowed in the current minute window.
X-UniSkill-BalanceYour remaining account credit balance.
X-UniSkill-ConsumedCredits consumed by the current request.
X-UniSkill-StatusOperation status (Success or Error).
X-UniSkill-Request-IDUnique identifier for debugging and support.

Error Handling

Status CodeErrorDescription
401UnauthorizedInvalid or missing API key.
402Payment RequiredInsufficient credits to perform the operation.
429Too Many RequestsRate limit exceeded for your tier.
502Bad GatewayUpstream service error (e.g., third-party API timeout).

Code Examples

import requests

# Set your UniSkill API Key
api_key = "YOUR_UNISKILL_API_KEY"

def perform_search(query):
    # API endpoint for the search skill
    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)