> ## Documentation Index
> Fetch the complete documentation index at: https://docs.querying.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 豆包 Doubao API：字节跳动中国网页聊天的回答与搜索结果

> 向字节跳动的中国网页聊天豆包提问，获取回答、它读取的搜索结果和搜索词。

`DOUBAO` 向 doubao.com 上的豆包网页聊天提问，联网搜索开启，不使用账号，也不需要登录。

| | |
| - | - |
| taskType | `DOUBAO` |
| 读取 | `prompt`（回退到 `query`） |
| 积分 | 1.25 |
| 国家 | \*\*忽略。\*\*每个任务都从中国大陆提问。 |

## 请求

豆包只在中国大陆为访客回答，因此每个任务都从中国大陆出口提问，`country` 不会改变这一点。可以省略它。

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "DOUBAO", "payload": { "prompt": "Which electric car brands are most reliable? Answer in English." } }'
```

## 响应

| 字段 | 类型 | 说明 |
| - | - | - |
| `text` | string | 回答。 |
| `markdown` | string | Markdown 格式的回答。无需任何标志即返回。 |
| `searchQueries` | string\[] | 豆包执行的搜索。 |
| `sources` | array | 豆包读取的搜索结果：`position`、`url`、`label` 和 `type`（`web` 或 `video`）。 |
| `images` | array | 随回答显示的图片（如有）。 |
| `videos` | array | 随回答显示的视频：`title`、`url`、`medium`、`image`、`thumbnail`、`image_width`、`image_height`。 |
| `rawResponse` | array | 流事件。仅在设置 `include.rawResponse` 时返回。 |

很多来源是抖音视频页面。回答正文不带引用标记：`sources` 列出的是豆包读取的内容，而不是它引用的内容。

例如：

```json theme={"theme":"css-variables"}
{
  "text": "Brands often rated most reliable include ...",
  "markdown": "Brands often rated most reliable include ...",
  "searchQueries": ["most reliable electric car brands"],
  "sources": [{ "position": 1, "url": "https://www.example.com/ev-reliability", "label": "EV reliability rankings", "type": "web" }]
}
```

## Include 标志

| 标志 | 效果 |
| - | - |
| `rawResponse` | 添加 `rawResponse`。 |

`markdown` 无需标志。`searchQueries`、`ads` 和 `shopping` 不起作用。`analysis` 会以 `422 VALIDATION_ERROR` 拒绝，`citationAnalysis` 以 `400 VALIDATION_ERROR` 拒绝，`html` 以 `422 EVIDENCE_UNSUPPORTED` 拒绝。见 [Markdown 与原始响应](/zh/engines/response-options.md)。

## 相关内容

* [豆包 Doubao 产品页](https://querying.ai/zh/engines/doubao)
* [千问 Qwen](/zh/engines/qwen.md)
* [引擎概览](/zh/engines/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.