快速搜索
curl --request GET \
--url https://api.pipellm.ai/v1/websearch/simple-search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pipellm.ai/v1/websearch/simple-search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pipellm.ai/v1/websearch/simple-search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pipellm.ai/v1/websearch/simple-search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}快速搜索
更快的搜索摘要,不做页面抽取。
GET
/
v1
/
websearch
/
simple-search
快速搜索
curl --request GET \
--url https://api.pipellm.ai/v1/websearch/simple-search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pipellm.ai/v1/websearch/simple-search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pipellm.ai/v1/websearch/simple-search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pipellm.ai/v1/websearch/simple-search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}当你只想更快拿到搜索结果,而不需要页面抽取、向量检索和重排序时,使用这条路由。
Endpoint
| 方法 | 端点 |
|---|---|
GET | https://api.pipellm.ai/v1/websearch/simple-search |
认证
Authorization: Bearer $PIPELLM_API_KEY
查询参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
q | string | 是 | 搜索关键词 |
请求示例
curl -X GET "https://api.pipellm.ai/v1/websearch/simple-search?q=最新AI新闻" \
-H "Authorization: Bearer $PIPELLM_API_KEY"
响应结构
{
"code": 200,
"message": "ok",
"took_ms": 950,
"data": {
"answerBox": {
"title": "Latest AI news",
"snippet": "..."
},
"organic": [
{
"title": "AI News",
"link": "https://example.com",
"snippet": "Latest updates..."
}
]
}
}
说明
- 这条路由代理到内部
/api/simple-search。 - 它会更快返回结果,但不会通过深度检索补充
contexts。 - 每次成功请求价格为 $0.01,并以内部模型名
websearch记录。 - PipeLLM 会根据路由自动确定模型名,客户端不需要传入。
相关文档
深度搜索
需要更丰富上下文时,使用检索和重排序
新闻搜索
搜索近期新闻,而不是通用网页结果
WebSearch 总览
查看产品总览和完整路由矩阵
此页面对您有帮助吗?