NB频道的公开只读数据接口:虚拟股票市值、评论、站点统计、实时粉丝数。适合友商、插件、脚本与一切想与 NB 频道互通的小伙伴。无需鉴权,随取随用。
Base URL: api.nb-channel.top| 端点 | 说明 |
|---|---|
GET /api/market | 全市场快照:公司列表 + 总市值 + 公司数?name=关键词 可选,按公司名模糊查询(最多 50 家) |
GET /api/market/<公司ID> | 单家公司市值 |
GET /api/market/<ID>/history?days=7 | 历史市值走势点(days 1~30) |
GET /api/market/export?format=csv | 全市场 CSV 导出 |
GET /api/comments | 最新评论(只读)?page=1&limit=20&page_path=comments-beta.html |
GET /api/stats | 接口用量统计(开发用) |
GET /api/bili-fans | B站实时粉丝数(官网首页数据条同源,约 30 秒缓存) |
# 命令行直接试 curl "https://api.nb-channel.top/api/market" # 全市场 curl "https://api.nb-channel.top/api/market?name=NB" # 找 NB 相关的公司 curl "https://api.nb-channel.top/api/market/1/history?days=7"
const m = await NBMarket.market(); console.log('总市值', m.total_market_value, '公司数', m.count);
浏览器直接用 <script src="js_example.js"></script> 即可获得全局 window.NBMarket;Node.js 与 Python 用法见各文件头部注释。