Summary

Bocha Wanxiang is a knowledge search API platform built for AI applications. It returns structured, citable web results and model-generated answers that reduce hallucination in RAG and agent workflows.

Bocha Wanxiang: a knowledge search API built for AI applications

What it is

Bocha Wanxiang is the search API service offered by the Bocha AI open platform. It combines multimodal hybrid retrieval with semantic reranking to surface news, images, videos and encyclopedia-style content from an index of roughly ten billion web pages. It is aimed at AI agents, chatbots and RAG systems that need current world knowledge delivered as structured output, which reduces hallucination and keeps answers traceable to real sources.

Unlike a conventional web search endpoint, the response schema is reorganised around what language models actually consume: title, URL, snippet, site icon, publish time and images arrive in one payload, so teams do not have to write another cleaning layer. The platform bundles full web search, answer generation, semantic reranking and a hybrid search database, accepts natural-language queries, and reports a Web Search latency as low as 0.15 seconds. The operator states that data is not transferred outside mainland China and that results follow domestic security requirements, which matters for regulated deployments.

Main capabilities

  • Web Search API: natural-language search across the open web, returning structured fields such as title, URL, snippet, site icon, publish time and images. Up to 50 results per call, latency as low as 0.15 seconds.
  • AI Search API: hybrid retrieval with automatic structured data for vertical domains, plus model-generated answers, follow-up questions and streaming output. Returns multimodal references alongside a summarised answer.
  • Semantic Reranker API: a self-developed 80M-parameter Transformer that reranks candidates after BM25/RRF first-pass ordering, supports recall50@top_n50, and returns relevance scores so results better match what an LLM prefers to read.
  • Agent Search API: routes a question to a designated agent and returns a deeper answer with follow-up suggestions. The beta has closed; vertical use cases should move to AI Search.
  • Bocha Hybrid Search Database (BochaDB): keyword plus vector hybrid retrieval with built-in semantic reranking, giving RAG systems a single retrieval layer.
  • Balance API: check account balance and resource consumption in real time.

How to use it

  1. Register and get an API key. Sign up at https://open.bochaai.com/, claim the calling resource package and generate an API key in the console.
  2. Pick an integration path. Official REST API, model function calling compatible with OpenAI and LangChain, plugins for AI development platforms such as Tencent Yuanqi, Coze, DingTalk and Dify, or an MCP server.
  3. Call web search. Send a request to https://api.bocha.cn/v1/web-search with a natural-language query; you can constrain the time range, restrict domains and request text summaries.
  4. Switch to AI Search when you need an answer. It retrieves first and then produces a summarised answer with references; enable streaming in interactive products to cut time-to-first-token.
  5. Rerank your own candidates. Pass an existing candidate set to bocha-semantic-reranker, take the relevance scores and reorder before sending context to the model.
  6. Watch consumption. Wire up the balance endpoint and check quota regularly so a production launch does not stall on limits.

The API is RESTful JSON and authenticates with a Bearer token carrying your API key.

Where it fits

  • Conversational AI: give a chatbot live web access so answers carry citations instead of invented facts.
  • RAG question answering: use it as the retrieval layer that recalls structured, citable knowledge from the public web, alongside an internal knowledge base.
  • AI search products: build a conversational search experience with summaries, multimodal references and follow-up questions.
  • Agent development: add real-time information retrieval to an agent through function calling or a platform plugin.
  • Compliance-sensitive deployments: data stays inside mainland China, which suits domestic enterprise applications with strict content and data-flow requirements.

Limits and caveats

  • A single search returns at most 50 web results; paginate or split queries when you need broader coverage.
  • The 0.15 second figure refers to Web Search latency. AI Search has to generate an answer, so end-to-end time is longer; streaming improves perceived speed.
  • Agent Search is no longer in beta testing, so specialised vertical needs should use AI Search or a custom agent.
  • Retrieval quality depends on how the query is phrased and which sites are indexed. For long-tail, in-site or fast-moving topics, restrict domains and time ranges.
  • Results still need human or downstream verification and explicit citation; treat the API output as evidence, not as ground truth.
  • Pricing, quota and concurrency ceilings are set in the official console. Run a small load test before committing production traffic.

FAQ

How is this different from a standard web search API?

A standard endpoint returns a list of links. Bocha Wanxiang returns model-friendly structured fields plus semantic reranking and generated answers, targeting the hallucination and freshness problems in RAG and agent workflows.

Which integration options are available?

The official REST API, OpenAI- and LangChain-compatible function calling, plugins for Tencent Yuanqi, Coze, DingTalk and Dify, and an MCP server.

How is data compliance handled?

The operator states that data is not transferred outside mainland China and that results comply with domestic security rules. Confirm the exact terms and certifications with the vendor before relying on them.

Bocha Wanxiang: multimodal search and semantic reranking API for AI apps

Frequently asked questions

How is Bocha Wanxiang different from a standard search API?

A standard API returns links. Bocha Wanxiang returns model-friendly structured fields plus semantic reranking and generated answers, aimed at hallucination and freshness problems.

Which integration options are supported?

Official REST API, OpenAI- and LangChain-compatible function calling, plugins for Tencent Yuanqi, Coze, DingTalk and Dify, and an MCP server.

How does data compliance work?

The operator states that data is not transferred outside mainland China and results follow domestic security rules; confirm the exact terms with the vendor before relying on them.