Docs
Web Search API Reference

Web Search API Reference

Provide web search capabilities to LLMs

Endpoint

POST https://api.websearch.plus/v1/web_search_plus

Authorization

Requires API Key in Authorization header using Bearer scheme:

Authorization: Bearer YOUR_API_KEY

Request Body

query

stringRequired
Search query, Maybe is from the LLM's tool_call. (1–200 characters)


search_context_size

stringOptional
Controls search depth: low, medium (default), or high. Affects number of results and pricing.

  • low: For some lightweight search needs, such as weathre, stock prices, etc.
  • medium: Can be applied to most search scenarios.
  • high: Being able to conduct in-depth searches on a topic.

options.result_type

stringOptional
Result type, list: returns structured, text: concatenates the contents of the list into text to meet the content parameter requirements of call_tool in LLM, making it convenient for developers to directly write the results into the method calling LLM

  • list: returns structured result as a list.
  • text: concatenates the list into a single string suitable for input of LLM tool calling.

options.language

stringOptional
Language of expected results (ISO-639-1), "en" is (default).

options.type

stringOptional
Search type: search (default) or news.

  • search: Search across the entire network.
  • news: Only search for reliable news sources, very suitable for searching real-time content.

options.qdr

stringOptional
Time filter: any (default), h, d, w, m, y.

  • any: Publication time unlimited.
  • h: Publication time within one hour.
  • d: Publication time within one day.
  • w: Publication time within one week.
  • m: Publication time within one month.
  • y: Publication time within one year.

options.mode

stringOptional
If smart, returns hybrid search result. If full, returns full content of web page. Default: smart.

  • smart: Hybrid search can intelligently filter out over 50% of low relevance content.
  • full: Returning the entire text content of the search results page may generate a large amount of redundant information.

Example Request

curl -X POST https://api.SourceMind.ai/v1/web_search_plus \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "latest news about LLM",
    "search_context_size": "medium",
    "options":{
      "language": "en",
      "mode": "smart",
      "type": "search",
      "return_type": "text",
      "qdr": "w"
    }'