> For the complete documentation index, see [llms.txt](https://docs.exoclick.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exoclick.com/rtb/zh/fa-bu-shang/exoclick-rtb/bid-request.md).

# ExoClick RTB 出价请求

ExoClick RTB 出价请求使用 JSON 进行 POST，使用 URL 进行 GET。POST 不允许使用 XML 请求。

## 竞价请求头

* **ExoClick RTB 版本 HTTP 头**: `x-exadsrtb-version: 1.0`
* **Keep-Alive HTTP 头**: `Connection: Keep-Alive`
* **内容 JSON**: `Content-Type: application/json`
* **数据编码头**: `Accept-Encoding`

### 竞价请求对象

| 属性                | 必填？           | 描述                                                                                                                      |
| ----------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `id`              | 是             | 唯一竞价请求 ID（字符串）                                                                                                          |
| `ip`              | 是             | 用户的 IP 地址（字符串）                                                                                                          |
| `language`        | 是             | 浏览器语言，使用 ISO-639-1 两位字母代码（字符串）                                                                                          |
| `remove_addr`     | 否             | 用户的主 IP 地址（字符串）                                                                                                         |
| `x_forwarded_for` | 否             | 用户的 X-FORWARDED-FOR IP 地址；若未设置则为空（字符串）                                                                                  |
| `type`            | 是             | 请求类型。可以是 “banner”、“popunder”、"direct\_link"、"email\_click"\*、“push\_notification” 或 "in\_page\_push\_notification"（字符串） |
| `ua`              | 是             | 浏览器用户代理（字符串）                                                                                                            |
| `url`             | 是             | 将展示广告的页面完整 URL（字符串）                                                                                                     |
| `user_id`         | 是             | 唯一用户 ID（字符串）                                                                                                            |
| `sub`             | 否             | 这应该是一个 6 到 10 位数字：Sub ID 开头不要使用零。                                                                                       |
| `export`          | 是             | 响应类型。可以是 "json" 或 "xml"（字符串）                                                                                            |
| `keyword`         | 否             | 关键词可用于确保广告位获得正确类型的广告。关键词应为由逗号分隔的单词字符串。                                                                                  |
| `size`            | banner\*\* 必填 | 发布商广告类型尺寸（字符串）                                                                                                          |
| `el`              | 否             | Base64 编码的电子邮件。仅适用于 Email Clicks 和 Direct Link（字符串）                                                                     |

***

**注意：**

* `"email_click"` 作为类型仅需在 GET 请求中指定。
* 在 Push 请求中，如果省略 size，默认值将为 `192x192` 以保持向后兼容。
* Sub ID 应为 1 到 [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32.maxvalue?view=net-5.0)：Sub ID 开头不要使用零。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.exoclick.com/rtb/zh/fa-bu-shang/exoclick-rtb/bid-request.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
