AI-bid CN
开发者

数据 API 文档

公开榜单接口免费开放、无需注册。订阅接口(历史数据 / 对比 / 导出)按配额计费。本 API 只读——排名不可购买,不存在任何写入接口。

版本 v2 · 最近更新:2026-09-21 · 基础地址 https://ai-bid.sbs

Developers

Data API documentation

The public leaderboard endpoint is free and open, no sign-up required. Subscription endpoints (history / comparison / export) are metered by quota. This API is read-only — rankings cannot be bought, and no write endpoint exists.

Version v2 · Updated 2026-09-21 · Base URL https://ai-bid.sbs

排名不可购买。本 API 只提供公开信号数据的读取;不存在「创建竞价」「占位」「修改名次」类接口——这不是未实现,而是产品设计上没有对应物。数据口径见公开方法论。

一、快速开始

所有请求使用 HTTPS,响应为 JSON,字符集 UTF-8。时间戳为 ISO 8601 字符串或 Unix 秒级整数。公开榜单接口不需要任何鉴权:

bash
curl https://ai-bid.sbs/api/ranking?limit=10

二、接口 · 榜单查询(已上线)

GET /api/ranking — 返回全部收录条目,按公开信号分降序排列(rank 字段已赋值)。响应缓存 60 秒(Cache-Control: public, max-age=60)。

参数类型必填说明
limitinteger否客户端截断条数;接口本身返回全量,分页在客户端完成
categorystring否分类 key;不过滤时返回全部分类(categories 字段含全表)
json
{
  "items": [
    {
      "id": "langchain",
      "name": "LangChain",
      "category": "agent-framework",
      "repo": "langchain-ai/langchain",
      "url": "https://github.com/langchain-ai/langchain",
      "homepage": "https://www.langchain.com",
      "stars": 98000,
      "forks": 15600,
      "score": 101900,
      "language": "Python",
      "pushedAt": "2026-09-20T10:00:00Z",
      "rank": 1
    }
  ],
  "categories": [ /* 6 个分类的 id/name/nameZh */ ],
  "signal": {
    "version": "1.0.0",
    "formula": "score = stars + 0.25 × forks",
    "forkWeight": 0.25
  },
  "updatedAt": "2026-09-21T02:00:00Z",
  "count": 36,
  "source": "snapshot+metrics",
  "attribution": "GitHub public API",
  "notice": null
}

signal 块随响应一起下发——公式版本与权重以它为准,客户端无需硬编码。source 为 snapshot(清单与指标都来自策展快照)或 snapshot+metrics(清单来自快照、指标来自每日自动刷新)。updatedAt 是当前数据实际对应的时点;notice 平时为 null,自动刷新异常时给出 { code, ageHours, at },用于如实提示数据偏旧。

三、响应字段

字段说明
id / name / category策展注册表中的稳定标识、展示名与分类
repo / url / homepageGitHub 仓库(owner/name)、仓库地址、官方站点(可能为 null)
stars / forks采集时点的公开信号原始值
score公开信号分 = stars + 0.25 × forks
rank全量排序后的名次(1 起);同分规则见方法论
pushedAt / language仓库最近推送时间与主语言(可能为 null)
updatedAt / source / notice数据时点、数据由哪一层构成、自动刷新异常提示(正常为 null)

四、订阅接口(待开通)

尚未开通。以下订阅接口(历史数据、批量对比、导出)在收单方完成开户后随订阅一起开放,届时本节将更新为正式规范并发布 API Key 管理入口。在此期间不存在任何需要付费才能调用的接口,也请勿向任何第三方购买"API Key"。

计划接口用途状态
GET /api/history/{id}条目信号与名次的历史序列待开通
POST /api/compare批量条目横向对比待开通
GET /api/export榜单与历史数据导出待开通

开通后:通过 Authorization: Bearer aib_live_… 头鉴权,按订阅档位计配额(见配额规则),超出配额返回 429。API Key 等同于账户凭据,仅存放于服务端,切勿写入前端代码或 Git 仓库。

五、错误码

HTTP含义处理建议
200正常(包括空榜——items 为空数组是有效响应)—
401订阅 API Key 无效或已吊销(仅订阅接口)重新签发 Key
403访问了不存在或未开放的资源核对本页文档
404路径不存在本 API 仅有本页列出的路径
429触发限流 / 超出配额按 Retry-After 退避
500服务内部错误提交工单

六、限流与配额

接口配额说明
GET /api/ranking免费 · 缓存 60s公开数据,建议客户端自行缓存,勿高频轮询
订阅接口(开通后)按档位 · 次/月档位配额加载中… / Loading plan quotas…

配额规则与档位对照见配额规则;响应头 X-RateLimit-Remaining / X-RateLimit-Reset 将在订阅接口开通后提供。

Rankings cannot be bought. This API only serves reads of public signal data. There is no "create bid", "claim a slot", or "change rank" endpoint — not because it is unimplemented, but because the product has no such concept. See the public methodology.

1. Quick start

All requests use HTTPS. Responses are JSON, charset UTF-8. Timestamps are ISO 8601 strings or Unix seconds. The public leaderboard endpoint requires no authentication:

bash
curl https://ai-bid.sbs/api/ranking?limit=10

2. Endpoint · Leaderboard (live)

GET /api/ranking — returns all curated entries sorted by the public signal score (the rank field is pre-assigned). Responses are cached for 60 seconds (Cache-Control: public, max-age=60).

ParameterTypeRequiredNotes
limitintegerNoClient-side truncation hint; the endpoint returns the full set, paginate client-side
categorystringNoCategory key; when absent, all entries are returned (see the categories field)
json
{
  "items": [
    {
      "id": "langchain",
      "name": "LangChain",
      "category": "agent-framework",
      "repo": "langchain-ai/langchain",
      "url": "https://github.com/langchain-ai/langchain",
      "homepage": "https://www.langchain.com",
      "stars": 98000,
      "forks": 15600,
      "score": 101900,
      "language": "Python",
      "pushedAt": "2026-09-20T10:00:00Z",
      "rank": 1
    }
  ],
  "categories": [ /* 6 categories: id/name/nameZh */ ],
  "signal": {
    "version": "1.0.0",
    "formula": "score = stars + 0.25 × forks",
    "forkWeight": 0.25
  },
  "updatedAt": "2026-09-21T02:00:00Z",
  "count": 36,
  "source": "snapshot+metrics",
  "attribution": "GitHub public API",
  "notice": null
}

The signal block ships with every response — treat it as the source of truth for formula version and weights; do not hardcode them client-side. source is snapshot (both the list and the metrics come from the curated snapshot) or snapshot+metrics (list from the snapshot, metrics from the daily automatic refresh). updatedAt is the timestamp the current data actually corresponds to; notice is normally null and becomes { code, ageHours, at } when the automatic refresh is failing, so clients can tell that the data is old.

3. Response fields

FieldNotes
id / name / categoryStable id, display name, and category from the curated registry
repo / url / homepageGitHub repo (owner/name), repo URL, official site (may be null)
stars / forksRaw public signal values at collection time
scorePublic signal score = stars + 0.25 × forks
rankPosition after full sorting (1-based); tie-breaking in the methodology
pushedAt / languageRepo last-push timestamp and primary language (may be null)
updatedAt / source / noticeData timestamp, which layer the data comes from, and a stale-refresh notice (normally null)

4. Subscription endpoints & API keys

Key delivery is live. After you subscribe and pay, your API key is auto-provisioned against your subscription email — retrieve it on the "My access" page (access.html). The history / bulk-comparison / export subscription endpoints will open in a later iteration; rankings cannot be bought, payment only unlocks data access.

Planned endpointPurposeStatus
GET /api/history/{id}Historical signal and rank series for an entryNot yet open
POST /api/compareBulk side-by-side comparisonNot yet open
GET /api/exportBoard and history exportNot yet open

Once open: authenticate with Authorization: Bearer aib_live_…; quota follows your subscription tier (see the quota rules); over-quota requests return 429. An API key is account credential material — keep it server-side, never in front-end code or a Git repository.

5. Error codes

HTTPMeaningSuggested handling
200OK (an empty board is valid — items may be [])—
401Subscription API key invalid or revoked (subscription endpoints only)Issue a new key
403Requested resource does not exist or is not openCheck this document
404Unknown pathThis API only exposes the paths listed here
429Rate limited / over quotaBack off per Retry-After
500Internal server errorOpen a ticket

6. Rate limits & quotas

EndpointQuotaNotes
GET /api/rankingFree · 60s cachePublic data — cache it client-side and avoid high-frequency polling
Subscription endpoints (once open)Per tier · calls/monthLoading plan quotas… / 档位配额加载中…

Tier details are in the quota rules; the X-RateLimit-Remaining / X-RateLimit-Reset headers will be provided once subscription endpoints open.