POST
/batch/extract
批量提取多个页面

使用 AI 同时从多个 URL 提取结构化数据。

使用场景:

  • 从多个页面抓取产品目录
  • 从搜索结果页面提取数据
  • 批量处理列表或目录页面
  • 大规模收集竞品情报

工作原理:

  1. 提交最多 50 个 URL 和单个 Schema
  2. 立即获得任务 ID 响应
  3. 所有 URL 使用相同 Schema 提取
  4. 轮询状态或接收 Webhook 通知
  5. 一次性获取所有结构化结果

功能特性:

  • 相同 Schema 应用于所有 URL
  • 并行处理提升速度
  • 每个 URL 独立错误处理
  • 支持 Webhook 通知

授权

YOUR_API_KEY
授权Bearer <token>

在 Thunderbit Dashboard 获取 API key。请求头格式:Authorization: Bearer YOUR_API_KEY

位置: header

请求体

application/json

TypeScript Definitions

Use the request body type in TypeScript.

urls*string[]必填

要提取数据的 URL 列表,最多 50 个

示例:
[
  "https://example.com/product/1",
  "https://example.com/product/2",
  "https://example.com/product/3"
]
schema*object必填

JSON Schema 格式的数据结构定义

示例:
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "price": {
      "type": "number"
    },
    "rating": {
      "type": "number"
    }
  }
}
timeoutnumber默认值:60000

每个请求的超时时间(毫秒),默认 30000

webhookobject

Webhook 回调配置,任务完成时通知。查看 Webhooks 指南 了解回调负载、请求头和 HMAC-SHA256 签名验证。

展开子属性
urlstring

Webhook callback URL, must be HTTPS

secretstring

HMAC-SHA256 secret for signature verification. When set, each webhook request includes an X-Webhook-Signature header

示例:whsec_your_secret_key
headersobject

Custom headers (reserved for future use, not yet implemented by the server).

示例:
{
  "X-Custom-Auth": "your-token"
}
renderModestring默认值:"none"

JavaScript rendering mode applied to every URL: none (default, fastest), basic, or full.

取值范围"none" | "basic" | "full"

响应

application/json

Success response

successboolean
示例:
true
dataobject
展开子属性
idstring
示例:batch_ext_xyz789
statusstring
取值范围"PENDING" | "PROCESSING" | "COMPLETED" | "FAILED" | "CANCELLED" | "UNKNOWN"
示例:PROCESSING
totalinteger
示例:
3
completedinteger
示例:
0
creditsUsedinteger
示例:
0
createdAtstring

Timestamp when the job was created

completedAtstring

Timestamp when the job completed (null if still processing)