查询我的 Worker
方法: GET
端点: /api/v2/workers
认证: 支持 Authorization: Bearer <YOUR_API_KEY>、api-key: <YOUR_API_KEY> 和 ?token=<YOUR_API_KEY>。推荐优先使用 Bearer token。
GET
/api/v2/workersList current user workersAuthenticationRequired
Stored only in this browser tab. Sent only to https://openapi.coreclaw.com.
Parameters
Optional
Page number, 1-based. `offset=1` is page 1, `offset=2` is page 2; `offset=0` is accepted as page 1. Out-of-range pages return an empty list. Constraints: default `1`; minimum 0.
Optional
Page size. Constraints: default `20`; range 1-100.
Optional
Keyword for title, slug, or path.
Request BodyNot applicable
No JSON request body. Fill the path or query parameters above.
什么时候使用这个接口
Section titled “什么时候使用这个接口”用于查询当前认证用户可使用的 Worker。
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
offset | 否 | integer | 页码,从 1 开始。offset=1 为第 1 页,offset=2 为第 2 页;offset=0 兼容作为第 1 页。超出总页数时返回空列表。 约束:默认 1;最小 0。 |
limit | 否 | integer | 每页返回数量;列表和结果接口的 limit 上限为 100。 约束:默认 20;范围 1-100。 |
keyword | 否 | string | 按标题、slug 或 path 搜索。 |
curl -X GET "https://openapi.coreclaw.com/api/v2/workers?offset=1&limit=20&keyword=coffee" \ -H "Authorization: Bearer YOUR_API_KEY"{ "code": 0, "data": { "scraper": [ { "description": "Demo worker description", "name": "demo-worker", "path": "owner~demo-worker", "slug": "demo-worker", "title": "Demo Worker", "username": "owner" } ] }, "message": "success", "request_id": "req-123"}- API v2 同时支持 Bearer token、旧版
api-key请求头和 query token;新集成建议优先使用 Bearer token。
HTTP 响应
Section titled “HTTP 响应”| HTTP 状态 | 应用代码 | 含义 |
|---|---|---|
200 | 0 | 请求成功。 |
400 | 11000 | 请求参数不合法。 |
401 | 12001 | 认证缺失或无效。 |
404 | 11004 | 目标资源不存在。 |
422 | 11000 | 请求语义或字段校验未通过。 |
429 | 13000 | 请求过于频繁。 |
500 | 10000 | 服务端内部错误。 |