API Guide

/api/v1/candidates 标准增量调用

这页只解释标准调用流程,不会在浏览器里自动发送带 token 的请求。这里提到的 since 语义,当前统一映射成 updated_after

标准规则

标准 endpoint 形态:/api/v1/candidates?platform=facebook&updated_after=2026-04-01T00:00:00.000Z&sort=updated_time_asc&page_size=50

标准续拉终止条件:meta.next_cursor == null

第一次增量请求

curl -H "Authorization: Bearer $CUSTOMER_API_TOKEN" \
  "https://productsdev.com/api/v1/candidates?platform=facebook&updated_after=2026-04-01T00:00:00.000Z&sort=updated_time_asc&page_size=50"

继续下一页

curl -H "Authorization: Bearer $CUSTOMER_API_TOKEN" \
  "https://productsdev.com/api/v1/candidates?platform=facebook&updated_after=2026-04-01T00:00:00.000Z&sort=updated_time_asc&page_size=50&cursor=<meta.next_cursor>"

关键返回字段

什么时候再读 detail

列表只负责增量发现;如果要做 AI 深度分析,再按候选 ID 读取 detail。detail 路由仍然是 https://productsdev.com/api/v1/candidates/:candidateId

curl -H "Authorization: Bearer $CUSTOMER_API_TOKEN" \
  "https://productsdev.com/api/v1/candidates/<candidate-id>?include=raw_html"