> For the complete documentation index see https://domscan.net/llms.txt. Markdown versions of every docs page are available by appending .md to the page URL.

Source: https://domscan.net/zh/docs/request-headers

# 请求标头

所有 API 请求都需要身份验证。免费注册以获取您的 API 密钥和每月 10,000 个免费额度。

- **Content-Type:** `application/json` (POST 请求必需)

- **Accept:** `application/json` (可选但推荐)

- **X-API-Key:** 您的 API 密钥（在 [/dashboard](https://domscan.net/zh/dashboard))

- **Authorization:** `Bearer your-api-key` (X-API-Key 的替代方案)

- **Idempotency-Key:** 可选，用于会扣除积分的 POST 请求。24 小时内使用相同密钥重试相同的请求，将返回已存储的响应并附带 `Idempotent-Replayed: true`，不会再次扣费。将同一密钥用于不同的请求会返回 422 `IDEMPOTENCY_KEY_REUSED`，在第一个请求仍在运行时发送重复请求会返回 409 `IDEMPOTENCY_IN_PROGRESS`。超过 1 MiB 的响应和已退款的错误不会被存储，因此重试会正常执行。密钥为 1 至 255 个可打印 ASCII 字符，例如 UUID。

- **DomScan-Naming:** 可选。`snake` 会将响应中所有 camelCase 键以 snake_case 返回，效果与 `naming=snake` 相同。如果两者同时发送，以查询参数为准。参见 [snake_case 键](https://domscan.net/docs/response-format#naming)。
