Smart Search

Smart Search

0calls

Want to integrate search functionality into your app? This endpoint helps you easily implement real-time web search.

POST
uapis.cn
/api/v1/search/aggregate
Body
query
string
required

Search query keyword, supports Chinese and English

site
string

Limit search to specific website, no need for site: prefix

filetype
string

Limit file type, no need for filetype: prefix. Supports pdf, doc, docx, ppt, pptx, xls, xlsx, txt, etc.

fetch_full
boolean

Whether to fetch full page content (will affect response time)

sort
string

Sorting method

time_range
string

Time range filter

Overview

UAPI Pro Search returns more relevant search results based on query content. You can search any keyword, or limit searches to specific websites or file types.

  • Real-time web search: Millisecond-level response, quickly returns search results
  • Smart ranking: Returns more relevant results based on query content
  • Time sorting: Supports sorting by publish time to get latest content
  • Time range filtering: Supports filtering results by day/week/month/year
  • Site search: Supports site: operator to search within specified websites
  • File type filtering: Supports filetype: operator to quickly find specific format files like PDF, Word, etc.

Request body

query
stringrequired

Search query keyword, supports Chinese and English

site
stringoptional

Limit search to specific website, no need for site: prefix

filetype
stringoptional

Limit file type, no need for filetype: prefix. Supports pdf, doc, docx, ppt, pptx, xls, xlsx, txt, etc.

fetch_full
booleanoptional

Whether to fetch full page content (will affect response time)

sort
stringoptional

Sorting method

time_range
stringoptional

Time range filter

Response

200 / OK

Search successful, returns intelligently sorted search results, matched search source information and request metadata

JSON
{
  // Executed search query
  "query": "What is the latest version of Go",
  // Total number of returned search results
  "total_results": 15,
  // Search results list
  "results": [
    {
      // Result title
      "title": "Go 1.26 Officially Released",
      // Result link
      "url": "https://go.dev/blog/go1.26",
      // Result summary/description
      "snippet": "On February 10, 2026, the Go team officially released Go version 1.26.",
      // Source domain
      "domain": "go.dev",
      "source": "uapi-searchv1",
      // Original ranking position
      "position": 1,
      // Composite score (0-1, already sorted)
      "score": 0.93,
      // Publish time (ISO 8601 format)
      "publish_time": "2026-02-10T00:00:00Z"
    }
  ],
  // Search engine information actually hit by this request
  "sources": [
    {
      // Search engine version
      "name": "uapi-searchv1",
      // Status of this search engine call
      "status": "success",
      // Number of results returned by this search engine
      "result_count": 15,
      // Time taken by this search engine (milliseconds)
      "elapsed_ms": 3675,
      // Domain name of the first result from this search source
      "first_result_host": "go.dev"
    }
  ],
  // Total time taken for this request (milliseconds)
  "process_time_ms": 3675,
  // Processing metadata for this request
  "metadata": {
    // Echo of request parameters actually effective on the server side
    "request_params": {
      // Actual search term executed
      "query": "What is the latest version of Go",
      // Actual number of results returned
      "limit": 10,
      // Actual page number in effect
      "page": 1,
      // Actual timeout in effect (milliseconds)
      "timeout_ms": 60000,
      // Actual sorting method in effect
      "sort": "relevance"
    },
    // Number of results removed after deduplication
    "dedupe_removed": 0,
    // Whether sorting reordering was performed
    "rerank_applied": true,
    // Number of results with additional content fetched
    "content_fetched": 0
  }
}

400 / Bad Request

Request parameter error

JSON
{
  "code": "INVALID_REQUEST",
  "message": "Invalid request parameter format"
}

401 / Unauthorized

Unauthorized

JSON
{
  "code": "UNAUTHORIZED",
  "message": "Invalid access token"
}

429 / Too Many Requests

Too many requests

JSON
{
  "code": "RATE_LIMIT_EXCEEDED",
  "message": "Too many requests, please try again later"
}

500 / Internal Server Error

Internal server error

JSON
{
  "code": "INTERNAL_ERROR",
  "message": "Internal server error"
}