跳到正文
更新日志新功能

推出 Search

Search
通过 POST /v1/search 发送的“热泵在寒冷地区如何工作”搜索:带网站标志和分数的 3 个页面,突出显示答案部分的第一个页面段落,以及 FRAMES 正确率 Pro Search 68.5% 和 Search 66.5%

一次调用即可为智能体加上网页搜索:每条结果都附带页面中回答搜索词的段落,每次搜索 0.5 积分。

获得的结果

  • results:按分数排序、最多 10 个与搜索词匹配的页面,每条带有 url、title、snippet 和 0 到 1 的相关度 score。
  • text:每个页面中回答搜索词的段落,每条最多 10,000 个字符,可直接交给模型。
  • 页面声明时还会带有 publishedDate 和 siteName。
  • 也可以通过 querying.ai MCP 服务器的 web_search 工具以同样价格使用,适用于 Claude Code、Codex、Cursor 等 MCP 客户端。

工作原理

向 POST /v1/search 发送搜索词后,请求会一直保持,直到结果在同一个响应中返回。智能体一次请求就能拿到上下文,省去再去抓取每个页面的第二次调用。

用 type 选择搜索方式,默认是 standard。pro 会覆盖更多网页,为需要多个来源的问题更仔细地挑选段落,约 4 秒返回。两种方式都可以用 site:、-site:、after: 和 before: 运算符缩小范围。超过 30 秒仍在运行的搜索会返回任务,结果用 GET /v1/async/task/{id} 读取。

2026 年 11 月 15 日用 200 道 FRAMES 题目测得:模型只依据 Search 结果作答的正确率为 66.5%,依据 Pro Search 结果为 68.5%。测量方法和完整对比见 Search 页面:https://querying.ai/agent-search

FRAMES 正确率与每 1,000 次搜索的价格:querying.ai Search 66.5%、$0.50,Pro Search 68.5%、$2.00,Parallel fast 63.5%、$1.00,Parallel advanced 70.0%、$5.00,Exa 68.0%、$7.00,Tavily basic 48.5%、$5.00,Tavily advanced 53.5%、$10.00,Firecrawl 43.5%、$1.20
在 100 道公司新闻题目上获得 1,000 个正确答案的成本:querying.ai Search $0.51,Parallel fast $1.00,Firecrawl $1.26,querying.ai Pro Search $2.02,Parallel advanced $5.00,Tavily basic $5.10,Exa $7.07,Tavily advanced $10.20

应用场景

  • 用一次工具调用,为编码或研究智能体提供带页面正文的网页搜索。
  • 让聊天机器人的回答基于最新页面,并把每个段落的 url 作为来源展示。
  • 用 includeDomains 只在可信网站中搜索,或用 after: 只搜索近期页面。

发送请求

在 Authorization 请求头中带上 API 密钥发送请求。

curl -X POST https://api.querying.ai/v1/search \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "how do heat pumps work in cold climates",
    "type": "pro",
    "numResults": 3,
    "contents": { "text": { "maxCharacters": 500 } }
  }'

请求字段

querystring必填
搜索词,最多 400 个字符。支持 site:example.com、-site:example.com、after:YYYY-MM-DD 和 before:YYYY-MM-DD 运算符。
typestring
standard 或 pro。pro 会为需要多个来源的问题做更深入的搜索。默认 standard。
numResultsinteger
返回的结果数量,1 到 10,默认 5。
contents.text.maxCharactersinteger
每条结果在 text 中携带的页面文字数,200 到 10,000,默认 2,000。
userLocationstring
需要某一市场的结果时填写的两位国家代码。留空时按搜索词的语言以最快速度搜索。
includeDomainsarray
最多 20 个主机名。只返回这些网站及其子域名上的结果。
excludeDomainsarray
最多 20 个要从结果中排除的主机名。
idempotencyKeystring
你为请求设定的 ID。每个键在账户内对应一个任务,因此重试发送后仍是同一个任务。

响应

响应如下,已截取部分内容。

JSON
{
  "success": true,
  "task": {
    "id": "…",
    "taskType": "SEARCH",
    "status": "COMPLETED",
    "createdAt": "…",
    "latencyMs": 4063
  },
  "credits": { "creditsToCharge": 2, "creditsCharged": 2 },
  "response": {
    "query": "how do heat pumps work in cold climates",
    "source": "all",
    "type": "pro",
    "results": [
      {
        "url": "https://www.carrier.com/us/en/residential/hvac-resources/heat-pumps/cold-climate-heat-pump/",
        "title": "Cold Climate Heat Pump Systems | Efficient Heating in Extreme …",
        "snippet": "In the winter, heat pumps work in cold weather by extracting thermal energy from the outdoor air and transferring it …",
        "text": "## Do cold climate heat pumps work?\n\nA heat pump is a versatile, year-round system that heats and cools your home by moving heat energy rather than generating it. In the winter, heat pumps work in cold weather by extracting thermal energy from the outdoor air and transferring it indoors.\n\n…",
        "score": 1,
        "publishedDate": "2026-09-15T11:03:00.000Z"
      },
      {
        "url": "https://www.mitsubishicomfort.com/articles/mythbusters-heat-pumps-for-extreme-cold-climates",
        "title": "Heat Pumps in Extreme Cold Climates | Mitsubishi Electric HVAC US",
        "snippet": "In cold climates, heat pumps typically experience a decrease in pressure, refrigerant flow rate and operational …",
        "text": "## Myth: Heat Pumps Are Only for Mild and Warm Climates\n\nHow do they work? In cold climates, heat pumps typically experience a decrease in pressure, refrigerant flow rate and operational capacity. …",
        "score": 0.8333,
        "publishedDate": "2026-10-19T12:06:06.108Z"
      },
      {
        "url": "https://homes.rewiringamerica.org/articles/heating-and-cooling/heat-pumps-cold-weather",
        "title": "Do heat pumps work in cold climates? - Rewiring America",
        "snippet": "…",
        "text": "In heating mode, heat pumps go into reverse and pump heat from the air outside your home to the inside. …",
        "score": 0.6667
      }
    ]
  }
}
task.statusstring
依次为 QUEUED、PROCESSING,最终为附带回答的 COMPLETED 或附带 error 的 FAILED。
credits.creditsChargedinteger
已完成任务扣除的积分。失败的任务为 0。
response.resultsarray
按分数排序的页面,每条带有 url、title、snippet、text 和 score,页面声明时还带有 publishedDate 和 siteName。
response.results[].textstring
页面中回答搜索词的段落,按页面顺序排列,标题为 # 行,列表项为 - 行。
response.results[].scorenumber
0 到 1 的相关度,在同一个响应内比较。

价格

积分在搜索完成时扣除:standard 搜索 0.5 积分,pro 搜索 2 积分。在 Max 套餐中,1,000 次 standard 搜索为 $0.50。新账户附带 500 个免费积分,相当于 1,000 次 standard 搜索。套餐见 https://querying.ai/pricing 。

更多更新

接收最新消息

通过邮件接收产品更新。

RSS 订阅