Skip to main content
POST
/
paas
/
v4
/
web_search
cURL
curl --request POST \
  --url https://api.z.ai/api/paas/v4/web_search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "search_engine": "search-prime",
  "search_query": "<string>",
  "count": 25,
  "search_domain_filter": "<string>",
  "search_recency_filter": "oneDay",
  "request_id": "<string>",
  "user_id": "<string>"
}'
{
  "id": "<string>",
  "created": 123,
  "search_result": [
    {
      "title": "<string>",
      "content": "<string>",
      "link": "<string>",
      "media": "<string>",
      "icon": "<string>",
      "refer": "<string>",
      "publish_date": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Use the following format for authentication: Bearer <your api key>

Headers

Accept-Language
enum<string>
default:en-US,en

Config desired response language for HTTP requests.

Available options:
en-US,en
Example:

"en-US,en"

Body

application/json
search_engine
enum<string>
default:search-prime
required

The search engine code to call. search-prime: Z.AI Premium Version Search Engine

Available options:
search-prime
Example:

"search-prime"

search_query
string
required

The content to be searched.

count
integer

The number of results to return Fillable range: 1-50, maximum 50 results per single search Default is 10 Supported search engines: search_pro_jina.

Required range: 1 <= x <= 50
search_domain_filter
string

Used to limit the scope of search results and only return content from specified whitelist domains. Whitelist: Directly enter the domain name (e.g., www.example.com) Supported search engines: search_pro_jina

search_recency_filter
enum<string>

Search for webpages within a specified time range. Default is noLimit Fillable values: oneDay: within one day oneWeek: within one week oneMonth: within one month oneYear: within one year noLimit: no limit (default) Supported search engines: search_pro_jina

Available options:
oneDay,
oneWeek,
oneMonth,
oneYear,
noLimit
request_id
string

User-provided unique identifier for distinguishing requests. If not provided, the platform will generate one.

user_id
string

Unique ID of the end user, helping the platform intervene in illegal activities, inappropriate content generation, or other abuses. ID length: 6 to 128 characters.

Response

Processing successful

id
string

Task ID.

created
integer

Request creation time, Unix timestamp in seconds.

search_result
object[]

Search results.

⌘I