ARActor Router
返回 catalog · 示例和 FAQ

Actor Router API

运行端点由 gateway API key 保护;目录和 schema 发现端点公开。你可以把它当成面向长任务 Apify Actors 的 OpenRouter-style 网关:发现、检查输入、启动运行、轮询状态、读取标准化结果。

发现

GET /v1
GET /v1/capabilities
GET /v1/actors?capability=social_profile_extraction&limit=20
GET /v1/models
GET /v1/schemas
GET /v1/actors/compass~crawler-google-places/schema
GET /v1/account/usage   # protected; Apify usage and limits

统一运行端点

POST /v1/runs
Authorization: Bearer <gateway_api_key>
Content-Type: application/json

{
  "actor": "compass/crawler-google-places",
  "input": { "searchString": "coffee near Austin", "maxCrawledPlaces": 1 },
  "max_total_charge_usd": 0.5,
  "wait_for_finish": 0
}

花钱前先 dry-run

POST /v1/runs
Authorization: Bearer <gateway_api_key>
Content-Type: application/json

{
  "actor": "compass/crawler-google-places",
  "input": { "searchString": "coffee near Austin", "maxCrawledPlaces": 1 },
  "max_total_charge_usd": 0.5,
  "dry_run": true
}

按能力运行,由网关选择 Actor

POST /v1/capabilities/social_profile_extraction/runs
Authorization: Bearer <gateway_api_key>
Content-Type: application/json

{
  "input": { "username": "openai", "maxItems": 25 },
  "max_total_charge_usd": 1,
  "wait_for_finish": 0
}

轮询和取结果

GET /v1/runs/{run_id}
GET /v1/runs/{run_id}/result?limit=100

# Backward-compatible aliases:
GET /v1/jobs/{run_id}
GET /v1/jobs/{run_id}/result?limit=100