---
title: "知识搜索"
method: POST
path: "/knowledge-search"
tags: ["问答"]
---

# 知识搜索

`POST /knowledge-search`

在知识库中搜索（不使用LLM总结）

## Query parameters

- `resource_urls` 'handle' | 'public'

## Request body

- InternalHandlerSessionSearchKnowledgeRequest
  - `knowledge_base_id` string — Single knowledge base ID (for backward compatibility)
  - `knowledge_base_ids` string[] — IDs of knowledge bases to search (multi-KB support)
  - `knowledge_ids` string[] — IDs of specific knowledge (files) to search
  - `mentioned_items` InternalHandlerSessionMentionedItemRequest[] — Optional scoped tag mentions
    - `id` string
    - `kb_id` string — Parent knowledge base for file/tag mentions
    - `kb_name` string — Display name for parent KB
    - `kb_type` string — "document" or "faq" (only for kb type)
    - `name` string
    - `service_id` string — Parent MCP service for MCP tool mentions
    - `skill_name` string — Preloaded agent skill name
    - `type` string — "kb", "file", "tag", "mcp", "skill"
  - `query` string, required — Query text to search for
  - `tag_ids` string[] — Tag IDs for filtering within a single KB

## Response `200`

搜索结果

- object

## Other responses

- `400` — 请求参数错误

---

[API](https://skmtc.net/tencentblueking/apis/weknora-api.md) · [All operations](https://skmtc.net/tencentblueking/apis/weknora-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tencentblueking/weknora-api/revisions/6e297e21afca/schema)
