集蜂云平台API
  1. 采集器
集蜂云平台API
  • 采集器
    • 运行采集器
      POST
    • 获取运行日志
      GET
    • 运行列表
      GET
  • 任务
    • 创建一个定时任务
      POST
    • 更新调度时间
      PUT
    • 任务调度启停
      PUT
    • 获取任务列表
      GET
    • 运行任务
      POST
    • 更新任务
      PUT
    • 获取任务详情
      GET
  • 数据
    • 获取数据列表
      GET
    • 获取采集的数据
      GET
    • 下载键值对文件
      GET
  • 数据接口
    • 获取抖音视频详情
      POST
    • 获取XHS笔记详情
      POST
    • 获取B站视频评论
      POST
  1. 采集器

运行采集器

POST
/v1/scrapers/{scraperId}/run

请求参数

Path 参数
scraperId
string 
必需
采集器的 id ,例如 网页内容采集器(https://console.beeize.com/template/3x6ue1v3tccnlqukc),scraperId 为 3x6ue1v3tccnlqukc
Header 参数
beeize-api-token
string 
可选
beeize-api-token 在设置页面能找到
示例值:
xxxxxxx
Body 参数application/json
input
object 
必需
input 对应采集的输入,可以参考采集的【输入】的 Josn 视图,不同的采集器输入不一样
runOptions
object 
必需
buildTag
string 
必需
构建标签, 默认 latest 就可以了
timeoutSecs
integer 
必需
超时时间,运行超过超时时间,会自动强制停止,建议配置大一些
memoryMbytes
integer 
必需
运行的内存配置,建议配 2048
示例
{
    "input": {
        "key": "value",
        "proxyConfig": {
            "proxyType": "RESIDENTIAL",
            "countryCode": "CN"
        }
    },
    "runOptions": {
        "buildTag": "latest",
        "timeoutSecs": 300,
        "memoryMbytes": 1024
    }
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1/scrapers//run' \
--header 'beeize-api-token: xxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
    "input": {
        "key": "value",
        "proxyConfig": {
            "proxyType": "RESIDENTIAL",
            "countryCode": "CN"
        }
    },
    "runOptions": {
        "buildTag": "latest",
        "timeoutSecs": 300,
        "memoryMbytes": 1024
    }
}'

返回响应

🟢200成功
application/json
Body
code
integer 
必需
msg
string 
必需
data
object 
必需
id
string 
运行 Id
必需
createAt
string 
创建时间
必需
updateAt
string 
更新时间
必需
scraperId
string 
采集器 id
必需
serviceId
string 
用户 id
必需
status
string 
运行状态
必需
input
object 
运行的输入
必需
proxyConfig
object 
代理配置
必需
timeoutSec
integer 
超时时间
必需
buildId
string 
采集器构建 id
必需
buildVersion
string 
采集器构建版本
必需
origin
string 
来源
必需
memory
integer 
内存配置
必需
logId
string 
日志 id
必需
jobId
string 
job id
必需
kvStoreId
string 
键值对 id
必需
datasetId
string 
数据集 id
必需
requestQueueId
string 
采集器队列 id
必需
deleteFlag
boolean 
必需
示例
{
    "code": 0,
    "msg": "",
    "data": {
        "id": "zx6ue1uo13g7uhzvj",
        "createAt": "2024-09-04 16:38:58",
        "updateAt": "2024-09-04 16:38:58",
        "deleteFlag": false,
        "scraperId": "mm5733d6hznnyyefr",
        "serviceId": "yv55vjm2zjvsaphlr",
        "status": "CREATED",
        "input": {
            "urls": ["https://www.baidu.com/"],
            "white_list":["/news"],
            "black_list":["/news"], 
            "level": 2, 
            "max_page": 100, 
            "proxyConfig": {
                "proxyType": "NO_PROXY",
                "countryCode": "",
                "ownProxyUrls": []
            }
        },
        "proxyConfig": {
            "countryCode": "cn",
            "proxyType": "RESIDENTIAL"
        },
        "timeoutSec": 600,
        "buildId": "v068wlhypy9473tyv",
        "buildVersion": "0.0.10",
        "origin": "WEB",
        "memory": 2048,
        "logId": "si6ue1uo13g7udjgr",
        "jobId": "si6ue1uo13g7udjgr",
        "kvStoreId": "e36ue1uo13g7ufjvv",
        "datasetId": "ie6ue1uo13g7uezu2",
        "requestQueueId": "tw6ue1uo13g7ug80h"
    }
}
修改于 2024-09-23 07:00:53
下一页
获取运行日志
Built with