Skill: hunkim/daum-toy-search (version 1.0.0)

--- name: daum-toy-search description: High-performance, multi-source Korean search API aggregating Daum/Kakao News, Encyclopedia, and Web results in a Perplexity-compatible format. metadata: {"openclaw":{"emoji":"⚡","requires":{"bins":["node"],"env":["DAUM_TOY_SEARCH_API_KEY"]},"primaryEnv":"DAUM_TOY_SEARCH_API_KEY"}} --- # Daum Toy Search The `daum-toy-search` skill enables high-performance, multi-source Korean web search powered by the Daum/Kakao index. It is fully compatible with the Perplexity Search API format and includes intelligent 3x Jaccard reranking by default. ## Search ```bash node {baseDir}/scripts/search.mjs "query" node {baseDir}/scripts/search.mjs "query" -n 5 node {baseDir}/scripts/search.mjs "query" --sources news,web ``` ## Options - `-n <count>`: Target number of results (default: 10, max: 50). - `--sources <sources>`: Comma-separated list of sources to include (`news`, `dic`, `web`). Default is all three. - `--no-reranking`: Disable Jaccard keyword overlap reranker. ## Setup ```bash openclaw config set skills.entries.daum-toy-search.apiKey "your-api-key" ``` Notes: - Requires `DAUM_TOY_SEARCH_API_KEY` from your environment. - Sub-400ms average latency powered by Go concurrency. - Intelligent reranking automatically fetches 3x results and uses keyword overlap scoring. - Returns clean, fully structured JSON hits ready for AI agents. You can use `curl` to query the API from your OpenClaw agents: ```bash curl -s -X POST "https://daum-perplexity-search-adapter.toy.x.upstage.ai/search" \ -H "Authorization: Bearer $DAUM_TOY_SEARCH_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "인공지능 트렌드", "max_results": 5, "search_sources": ["news", "dic", "web"], "reranking": "on" }' ``` The response is a JSON object containing a `results` array with the search hits. ## Output Format The `search.mjs` script outputs concise, formatted Markdown suitable for direct ingestion by AI agents: ```markdown ## Search Results for "인공지능 트렌드" ### 1. [업스테이지, '솔라' 한국형 LLM 성능 입증](https://news.daum.net/...) **Source:** news | **Date:** 2026-03-09 업스테이지의 솔라 모델이 벤치마크 테스트에서... ```

path: scripts/search.mjs
content: #!/usr/bin/env node

function usage() {
    console.error(`Usage: search.mjs "query" [-n <count>] [--sources news,dic,web] [--no-reranking]`);
    process.exit(2);
}

const args = process.argv.slice(2);
if (args.length === 0 || args[0] === "-h" || args[0] === "--help") usage();

let query = "";
let max_results = 10;
let search_sources = ["news", "dic", "web"];
let reranking = "on";

for (let i = 0; i < args.length; i++) {
    if (args[i] === "-n" && i + 1 < args.length) {
        max_results = parseInt(args[++i], 10);
    } else if (args[i] === "--sources" && i + 1 < args.length) {
        search_sources = args[++i].split(",");
    } else if (args[i] === "--no-reranking") {
        reranking = "off";
    } else if (!args[i].startsWith("-")) {
        query = args[i];
    }
}

if (!query) usage();

const [REDACTED_SECRET];
if (!apiKey) {
    console.error("Error: DAUM_TOY_SEARCH_API_KEY environment variable is missing.");
    process.exit(1);
}

async function search() {
    const url = "https://daum-perplexity-search-adapter.toy.x.upstage.ai/search";
    const payload = {
        query: query,
        max_results: max_results,
        search_sources: search_sources,
        reranking: reranking
    };

    try {
        const response = await fetch(url, {
            method: "POST",
            headers: {
                "Authorization": `Bearer ${apiKey}`,
                "Content-Type": "application/json"
            },
            body: JSON.stringify(payload)
        });

        if (!response.ok) {
            console.error(`Error: API returned status ${response.status}`);
            const text = await response.text();
            console.error(text);
            process.exit(1);
        }

        const data = await response.json();

        // Output formatted Markdown for agents
        if (data.results && data.results.length > 0) {
            console.log(`## Search Results for "${query}"\n`);
            data.results.forEach((res, index) => {
                console.log(`### ${index + 1}. [${res.title}](${res.url})`);
                console.log(`**Source:** ${res.source} | **Date:** ${res.date}`);
                console.log(`${res.snippet}\n`);
            });
        } else {
            console.log("No results found.");
        }
    } catch (error) {
        console.error("Request failed:", error);
        process.exit(1);
    }
}

search().then(() => {
    // Done
}).catch(err => {
    console.error("Unhandled error:", err);
    process.exit(1);
});


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)