> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/cn/web-scraper-api/response-codes.md).

# 响应码

了解网页爬虫API响应码，从成功和重定向状态到解析结果和错误说明。

网页爬虫API 会从服务的四个不同部分返回代码，每个代码都会出现在响应中的不同位置：

* [**API**](/products/cn/web-scraper-api/response-codes.md#api) - HTTP 状态码。HTTP 响应本身的状态，以及 `status_code` 在每个抓取页面的 `results`.
* [**解析器**](/products/cn/web-scraper-api/response-codes.md#parsers) - `parse_status_code` 在解析后的 `content` 结果的内容中（仅当 `parse` 为 `true`).
* [**云存储上传器**](/products/cn/web-scraper-api/response-codes.md#cloud-storage-uploader) – 作业对象中的 `statuses` 数组中的条目，当结果上传到你的存储时。
* [**会话**](/products/cn/web-scraper-api/response-codes.md#sessions) - 会话相关代码。

某些目标也有自己的代码，例如 YouTube 视频状态（`11201`–`11211`），这些代码列在 **错误代码** 在 [YouTube Metadata](/api-targets/cn/video-and-social-media/youtube/youtube-metadata.md), [YouTube Subtitles](/api-targets/cn/video-and-social-media/youtube/youtube-subtitles.md) 和 [YouTube Downloader](/api-targets/cn/video-and-social-media/youtube/youtube-downloader.md) 页面中。

### API

<table><thead><tr><th width="103.23558797355886">代码</th><th width="279.42175953228775">状态</th><th>描述</th></tr></thead><tbody><tr><td><code>200</code></td><td><code>正常</code></td><td>一切顺利，你得到了你请求的内容。</td></tr><tr><td><code>202</code></td><td><code>已接受</code></td><td>你的请求已被接受。</td></tr><tr><td><code>204</code></td><td><code>无内容</code></td><td>你正在尝试获取一个尚未完成的作业。</td></tr><tr><td><code>400</code></td><td><code>多个错误消息</code></td><td>请求结构错误：缺少必需参数、值无效/拼写错误，或值的类型错误。响应体中有更具体的错误消息。</td></tr><tr><td><code>401</code></td><td><p><code>未提供授权头</code></p><p><code>无效的授权头</code></p><p><code>未找到客户端</code></p></td><td>授权头缺失，或者你的登录凭据不正确。</td></tr><tr><td><code>403</code></td><td><code>禁止访问</code></td><td>你的账户没有访问此资源的权限。</td></tr><tr><td><code>404</code></td><td><code>未找到</code></td><td>你要查找的作业 ID 不存在，或者已不再可用。</td></tr><tr><td><code>422</code></td><td><code>无法处理的实体</code></td><td>你发送给我们的负载有问题。请确保它是有效的 JSON 对象。</td></tr><tr><td><code>429</code></td><td><code>请求过多</code></td><td>你已超过速率限制。请联系你的客户经理以提高限制。</td></tr><tr><td><code>500</code></td><td><code>内部服务器错误</code></td><td>我们这边遇到了一些问题。请稍后再试。我们大概已经注意到这些问题，不过你也可以联系我们并报告一下。</td></tr><tr><td><code>524</code></td><td><code>超时</code></td><td>服务不可用。</td></tr><tr><td><code>612</code></td><td><code>未定义的内部错误</code></td><td>出了些问题，我们未能成功处理你提交的作业。你可以免费重试，因为我们不会对 <code>faulted</code> 失败的作业收费。如果这样仍然不行，请联系我们。</td></tr><tr><td><code>613</code></td><td><code>重试次数过多后失败</code></td><td>出了些问题，我们未能成功处理你提交的作业。你可以免费重试，因为我们不会对 <code>faulted</code> 作业收费。如果这样仍然不行，请联系我们。</td></tr></tbody></table>

### 解析器

<table><thead><tr><th width="151.673345890383">代码</th><th width="210">状态</th><th>描述</th></tr></thead><tbody><tr><td><code>12000</code></td><td><code>成功</code></td><td>返回的解析内容完整，不应有缺失或损坏的字段。</td></tr><tr><td><code>12002</code></td><td><code>失败</code></td><td>我们无法完整解析该页面。目标网站的 HTML 结构可能发生了变化。</td></tr><tr><td><code>12003</code></td><td><code>不支持</code></td><td>你请求我们解析的网页不受支持。</td></tr><tr><td><code>12004</code></td><td><code>部分成功</code></td><td>我们能够解析页面的大部分内容。不过，少数字段缺失。</td></tr><tr><td><code>12005</code></td><td><code>部分成功</code></td><td>我们能够解析页面的大部分内容。不过，由于无法在 HTML 中找到某些字段，它们可能使用默认值。</td></tr><tr><td><code>12006</code></td><td><code>失败</code></td><td>发生意外错误。请告知我们你收到了此响应，我们会检查哪里出了问题。</td></tr><tr><td><code>12007</code></td><td><code>未知</code></td><td>未知的解析数据状态。实际结果可能从完全失败到完全成功不等。</td></tr><tr><td><code>12008</code></td><td><code>失败</code></td><td>解析后的内容缺失。</td></tr><tr><td><code>12009</code></td><td><code>失败</code></td><td>未找到产品。请检查你提交的 URL。</td></tr></tbody></table>

### 云存储上传器

这些代码会返回在 `statuses` 作业对象的数组中。上传失败不会更改作业的 `status`，它仍保持 `done`，因此请检查 `statuses` 结果是否未到达你的存储中。

<table><thead><tr><th width="156.30558722919042">代码</th><th width="208">状态</th><th>描述</th></tr></thead><tbody><tr><td><code>10001</code></td><td><code>意外异常</code></td><td>发生了错误。我们可能已经知道这个问题并正在修复。无论如何也请告知我们。</td></tr><tr><td><code>13000</code></td><td><code>上传成功</code></td><td>一切正常！</td></tr><tr><td><code>13001</code></td><td><code>上传失败</code></td><td>我们无法将作业结果上传到你的 bucket。</td></tr><tr><td><code>13102</code></td><td><code>路径不存在</code></td><td>我们找不到该名称的 bucket。请再检查一遍。</td></tr><tr><td><code>13103</code></td><td><code>访问被拒绝</code></td><td>bucket 没有所需权限。要了解如何授予我们所需访问权限，请参见 <a href="/products/cn/web-scraper-api/features/result-processing-and-storage/cloud-storage.md"><strong>这里</strong></a>.</td></tr></tbody></table>

### 会话

<table><thead><tr><th width="162">代码</th><th width="208">状态</th><th>描述</th></tr></thead><tbody><tr><td><code>15001</code></td><td><code>会话已过期</code></td><td>你尝试使用的会话已过期。现在你可以创建另一个具有相同 <code>session_id</code> 的会话（如果你愿意）。</td></tr><tr><td><code>15002</code></td><td><code>会话失败</code></td><td>会话创建失败。请重试。</td></tr><tr><td><code>15003</code></td><td><code>会话更新失败</code></td><td>会话更新失败。请重试。</td></tr></tbody></table>


---

# 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://developers.oxylabs.io/products/cn/web-scraper-api/response-codes.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.
