> 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**](https://developers.oxylabs.io/products/cn/web-scraper-api/response-codes.md#api) - HTTP 状态码。HTTP 响应本身的状态，以及 `status_code` 每个已抓取页面在 `结果`.
* [**解析器**](https://developers.oxylabs.io/products/cn/web-scraper-api/response-codes.md#parsers) - `parse_status_code` 已解析的 `content` 结果中的（仅当 `parse` is `true`).
* [**云存储上传器**](https://developers.oxylabs.io/products/cn/web-scraper-api/response-codes.md#cloud-storage-uploader) – 作业对象的 `statuses` 数组中的条目，当结果上传到你的存储桶时。
* [**会话**](https://developers.oxylabs.io/products/cn/web-scraper-api/response-codes.md#sessions) - 会话相关代码。

有些目标也有自己的代码，例如 YouTube 视频状态（`11201`–`11211`）下列出，位于 **错误代码** 在 [YouTube 元数据](https://developers.oxylabs.io/api-targets/cn/video-and-social-media/youtube/youtube-metadata), [YouTube 字幕](https://developers.oxylabs.io/api-targets/cn/video-and-social-media/youtube/youtube-subtitles) 和 [YouTube 下载器](https://developers.oxylabs.io/api-targets/cn/video-and-social-media/youtube/youtube-downloader) 页面。

### 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>OK</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`，它保持 `完成`，所以请检查 `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>我们无法将作业结果上传到你的存储桶。</td></tr><tr><td><code>13102</code></td><td><code>没有这样的路径</code></td><td>我们找不到具有此名称的存储桶。请再检查一遍。</td></tr><tr><td><code>13103</code></td><td><code>访问被拒绝</code></td><td>存储桶没有所需权限。要了解如何授予我们所需的访问权限，请参见 <a href="https://developers.oxylabs.io/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.oxylabs.io/products/cn/web-scraper-api/response-codes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
