跳转到主要内容
GET
/
v1
/
batches
/
{batch_id}
获取批次信息
curl --request GET \
  --url https://api.olostep.com/v1/batches/{batch_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "object": "<string>",
  "status": "<string>",
  "created": 123,
  "total_urls": 123,
  "completed_urls": 123,
  "parser": "<string>",
  "country": "<string>",
  "metadata": {
    "order_id": "12345",
    "customer_name": "John Doe",
    "priority": "high",
    "processed": "true"
  },
  "webhook": "<string>",
  "credits_consumed": 123,
  "cost_usd": 123
}
附加自定义数据: 使用 metadata 参数来存储与批次相关的键值对。详情请参见元数据

授权

Authorization
string
header
必填

Bearer认证头格式为Bearer ,其中是你的认证令牌。

路径参数

batch_id
string
必填

要获取信息的批次 ID。

响应

成功响应批次信息。

id
string

批处理 ID

object
string

对象的类型。此端点为 "batch"。

status
string

in_progresscompleted

created
number

创建的纪元时间

total_urls
number

批处理中 URL 的数量

completed_urls
number

已完成的 URL 数量

parser
string
country
string
metadata
object

用于存储对象附加信息的键值对集合。遵循Stripe的验证规则:最多50个键,键最多40个字符(不含方括号),值最多500个字符,所有值以字符串形式存储。

示例:
{
"order_id": "12345",
"customer_name": "John Doe",
"priority": "high",
"processed": "true"
}
webhook
string

用于接收完成通知的 Webhook URL

credits_consumed
integer | null

此请求消耗的积分数量。在执行完成后填充。积分是计费的真实来源。

cost_usd
number | null

此请求的估计成本(以美元计)。在执行完成后填充。根据消耗的积分和你的计划费率计算——99% 准确,但 credits_consumed 是权威值。