跳转到主要内容
POST
Cancel a Scraper Studio job
永久停止 Bright Data Scraper Studio 作业。作业将转为 canceled 状态并停止处理其余输入。 该端点不接受请求体,成功时返回纯文本响应体 OK,而非 JSON。请按文本读取响应,不要对其调用 JSON 解析器。
取消操作是永久性的。已取消的作业无法恢复。已采集的数据可能仍然可用,具体取决于运行状态和交付设置。如需临时停止作业,请使用暂停 Scraper Studio 作业

作业状态行为

已完成的作业无法暂停、恢复或取消。

如何查找作业 ID

使用作业列表端点查找您要取消的作业 ID:
将返回的 id 值用作 job_id 路径参数。完整参数列表请参见列出 Scraper Studio 作业

何时使用该端点

  • 停止使用错误输入集触发的作业,避免为整次运行付费
  • 取消生成的子页面远超预期的失控作业,无需等待出现 too_many_pages 错误
  • 在重新触发同一爬虫的修正运行之前清除卡住的作业
作业被取消时仍在队列中的页面会报告 aborted_page 错误代码。完整目录请参见 Scraper Studio 错误代码

相关

授权

Authorization
string
header
必填

Use your Bright Data API Key as a Bearer token in the Authorization header.

How to authenticate:

  1. Obtain your API Key from the Bright Data account settings at https://brightdata.com/cp/setting/users
  2. Include the API Key in the Authorization header of your requests
  3. Format: Authorization: Bearer YOUR_API_KEY

Example:

Learn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication

路径参数

job_id
string
必填

ID of the job to cancel

响应

Job canceled successfully

The response is of type string.