@apicity/thesportsdb

中文文档
0.26.0发布于 2026/11/05MITTypeScriptES Module近 30 天下载 3612

TheSportsDB V1和V2体育数据API提供商.

中文使用文档
文档目录48 节
  1. 安装
  2. 快速启动
  3. V2 认证
  4. 业务说明
  5. 搜索示例
  6. 玩家查询示例
  7. API 参考
  8. 全部
  9. 所有国家
  10. 全联盟
  11. 所有运动
  12. 事件结果
  13. 活动日
  14. 大事记
  15. 事件记录
  16. 下一个事件
  17. 下个事件
  18. 事件过去的同事
  19. 事件季节
  20. 事件tv
  21. 过滤器
  22. 列表
  23. 生命轴
  24. 查询
  25. 查找所有显示器
  26. 寻找合同
  27. 搜索活动
  28. 浏览事件
  29. 侦察队
  30. 仰望荣誉
  31. 搜索线
  32. 寻找里程碑
  33. 搜索玩家
  34. 寻找玩家
  35. 寻找时间线
  36. 查询Tv
  37. 玩家结果
  38. 时间表
  39. 搜索
  40. 搜索所有线索
  41. 搜索 AllSeasons
  42. 搜索全部小组
  43. 搜索事件
  44. 搜索文件名称
  45. 搜索层
  46. 搜索小组
  47. 搜索视频
  48. 许可证

@apicity/thesportsdb (中文(简体) )

npm dependencies TypeScript docs

TheSportsDB V1和V2体育数据API提供商.

运行时间依赖性 :

  • zod@^4.6.6 - 请求对端点方法附加计划如下: .schema; 响应计划导出

安装

npm install @apicity/thesportsdb
# or
pnpm add @apicity/thesportsdb

快速启动

import { createTheSportsDB } from "@apicity/thesportsdb";

const thesportsdb = createTheSportsDB({ apiKey: process.env.THESPORTSDB_API_KEY });

V2 认证

V1 调用默认值到 TheSportsDB 免费 123 在 URL 路径中键 apiKey 省略。 V2是纯溢价的,发送同样 apiKey 内 页:1 X-API-KEY 页眉; 如果没有配置密钥, V2 方法会本地抛出 .

const thesportsdb = createTheSportsDB({
  apiKey: process.env.THESPORTSDB_API_KEY!,
});

const teams = await thesportsdb.v2.search.team({
  teamName: "Manchester United",
});

V1保费电话,相同 apiKey 选项已编码为 路径段而不是标题 :

const premiumV1 = createTheSportsDB({
  apiKey: process.env.THESPORTSDB_API_KEY!,
});

const broadcasts = await premiumV1.v1.eventstv({
  channel: "Peacock_Premium",
});

业务说明

所有已执行的 TheSportsDB 端点只读 GET 打电话 这个 提供者不会暴露突变终点.

已执行的 API 表面没有平面参数 。 上游 答复使用针对端点的包装阵列和记录结果 限制; 空和无结果的包装仍可代表 null 或者说 空数组.

非-2xx 响应抛出 TheSportsDBError 与 status 并解析 body 如果可能的话。 费率限制答复保持其上游 429 状况和身体。 V2 方法丢出一个本地 401 在无时获取前 apiKey 配置为 X-API-KEY 认证.

搜索示例

SportsDB V1 使用免费 123 默认键。 过 apiKey 仅限 当你有高额钥匙时.

import { createTheSportsDB } from "@apicity/thesportsdb";

const thesportsdb = createTheSportsDB();

const teams = await thesportsdb.v1.searchTeams({
  team: "Arsenal",
});

const events = await thesportsdb.v1.searchEvents({
  event: "Arsenal_vs_Chelsea",
  season: "2016-2017",
  date: "2015-04-26",
});

const filename = await thesportsdb.v1.searchFilename({
  filename: "English_Premier_League_2015-04-26_Arsenal_vs_Chelsea",
});

const players = await thesportsdb.v1.searchPlayers({
  player: "Danny Welbeck",
});

const venues = await thesportsdb.v1.searchVenues({
  venue: "Wembley",
});

无结果 V1 搜索保存 TheSportsDB 已失效的包装阵列, 例如 { teams: null } 或者说 { player: null }。 。 。 .

玩家查询示例

玩家寻找,荣誉,前团队,里程碑,合同,结果,以及 统计路径使用 TheSportsDB 的数字播放器 id.

import { createTheSportsDB } from "@apicity/thesportsdb";

const thesportsdb = createTheSportsDB({
  apiKey: process.env.THESPORTSDB_API_KEY,
});

const player = await thesportsdb.v1.lookupplayer({ idPlayer: 34145937 });
const honours = await thesportsdb.v1.lookuphonours({ idPlayer: 34147178 });
const stats = await thesportsdb.v1.lookupplayerstats({ idPlayer: 34146304 });

无结果响应保留 TheSportsDB 的包装键 null 数值,例如 { players: null }。 。 。 .

V1在URL路径中使用了API密钥. 提供者对公众违约 免费密钥 123; 通过 apiKey 用你自己的钥匙. V2使用同样的 apiKey 选项 X-API-KEY 标题为 备查 thesportsdb.v2。 。 。 .

const league = await thesportsdb.v1.lookup.league({ idLeague: 4328 });
const table = await thesportsdb.v1.lookup.table({
  idLeague: 4328,
  season: "2020-2021",
});
const team = await thesportsdb.v1.lookup.team({ idTeam: 133604 });

const nextLeagueEvents = await thesportsdb.v2.schedule.next.league({
  idLeague: 4328,
});
const liveSoccer = await thesportsdb.v2.livescore.bySport({
  sport: "soccer",
});

V2是纯溢价的,发送同样 apiKey 作为 X-API-KEY 头曰. V2 搜索方法名称映射路径段 :

const player = await thesportsdb.v2.lookup.player({ idPlayer: 34172575 });
const lineup = await thesportsdb.v2.lookup.eventLineup({
  idEvent: 1937584,
});
const highlights = await thesportsdb.v2.lookup.eventHighlights({
  idEvent: 2044892,
});

API 参考

84个端点分出40个组. 每个方法都映射出上游的 URL 路径 .

全部

GET thesportsdb.v2.all.countries

GET https://www.thesportsdb.com/api/v2/json/all/countries

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.all.countries();

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.all.leagues

GET https://www.thesportsdb.com/api/v2/json/all/leagues

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.all.leagues();

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.all.sports

GET https://www.thesportsdb.com/api/v2/json/all/sports

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.all.sports();

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

所有国家

GET thesportsdb.v1.allCountries

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/all_countries.php

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.allCountries();

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

全联盟

GET thesportsdb.v1.allLeagues

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/all_leagues.php

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.allLeagues();

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

所有运动

GET thesportsdb.v1.allSports

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/all_sports.php

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.allSports();

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

事件结果

GET thesportsdb.v1.eventResults

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/eventresults.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.eventResults({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

活动日

GET thesportsdb.v1.eventsday

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/eventsday.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.eventsday({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

大事记

GET thesportsdb.v1.eventshighlights

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/eventshighlights.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.eventshighlights({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

事件记录

GET thesportsdb.v1.eventslast

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/eventslast.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.eventslast({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

下一个事件

GET thesportsdb.v1.eventsnext

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/eventsnext.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.eventsnext({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

下个事件

GET thesportsdb.v1.eventsnextleague

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/eventsnextleague.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.eventsnextleague({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

事件过去的同事

GET thesportsdb.v1.eventspastleague

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/eventspastleague.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.eventspastleague({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

事件季节

GET thesportsdb.v1.eventsseason

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/eventsseason.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.eventsseason({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

事件tv

GET thesportsdb.v1.eventstv

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/eventstv.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.eventstv({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

过滤器

GET thesportsdb.v2.filter.tv.channel

GET https://www.thesportsdb.com/api/v2/json/filter/tv/channel/{channel}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.filter.tv.channel({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.filter.tv.channelid

GET https://www.thesportsdb.com/api/v2/json/filter/tv/channelid/{idChannel}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.filter.tv.channelid({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.filter.tv.country

GET https://www.thesportsdb.com/api/v2/json/filter/tv/country/{country}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.filter.tv.country({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.filter.tv.day

GET https://www.thesportsdb.com/api/v2/json/filter/tv/day/{date}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.filter.tv.day({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.filter.tv.sport

GET https://www.thesportsdb.com/api/v2/json/filter/tv/sport/{sport}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.filter.tv.sport({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

列表

GET thesportsdb.v2.list.players

GET https://www.thesportsdb.com/api/v2/json/list/players/{idTeam}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.list.players({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.list.seasonposters

GET https://www.thesportsdb.com/api/v2/json/list/seasonposters/{idLeague}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.list.seasonposters({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.list.seasons

GET https://www.thesportsdb.com/api/v2/json/list/seasons/{idLeague}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.list.seasons({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.list.teams

GET https://www.thesportsdb.com/api/v2/json/list/teams/{idLeague}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.list.teams({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

生命轴

GET thesportsdb.v2.livescore.all

GET https://www.thesportsdb.com/api/v2/json/livescore/all

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.livescore.all();

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.livescore.byLeague

GET https://www.thesportsdb.com/api/v2/json/livescore/{leagueId}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.livescore.byLeague({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.livescore.bySport

GET https://www.thesportsdb.com/api/v2/json/livescore/{sport}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.livescore.bySport({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

查询

GET thesportsdb.v2.lookup.event

GET https://www.thesportsdb.com/api/v2/json/lookup/event/{idEvent}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.event({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.eventHighlights

GET https://www.thesportsdb.com/api/v2/json/lookup/event_highlights/{idEvent}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.eventHighlights({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.eventLineup

GET https://www.thesportsdb.com/api/v2/json/lookup/event_lineup/{idEvent}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.eventLineup({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.eventResults

GET https://www.thesportsdb.com/api/v2/json/lookup/event_results/{idEvent}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.eventResults({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.eventStats

GET https://www.thesportsdb.com/api/v2/json/lookup/event_stats/{idEvent}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.eventStats({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.eventTimeline

GET https://www.thesportsdb.com/api/v2/json/lookup/event_timeline/{idEvent}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.eventTimeline({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.eventTv

GET https://www.thesportsdb.com/api/v2/json/lookup/event_tv/{idEvent}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.eventTv({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.league

GET https://www.thesportsdb.com/api/v2/json/lookup/league/{idLeague}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.league({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.player

GET https://www.thesportsdb.com/api/v2/json/lookup/player/{idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.player({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.playerContracts

GET https://www.thesportsdb.com/api/v2/json/lookup/player_contracts/{idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.playerContracts({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.playerHonours

GET https://www.thesportsdb.com/api/v2/json/lookup/player_honours/{idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.playerHonours({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.playerMilestones

GET https://www.thesportsdb.com/api/v2/json/lookup/player_milestones/{idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.playerMilestones({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.playerResults

GET https://www.thesportsdb.com/api/v2/json/lookup/player_results/{idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.playerResults({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.playerStats

GET https://www.thesportsdb.com/api/v2/json/lookup/player_stats/{idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.playerStats({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.playerTeams

GET https://www.thesportsdb.com/api/v2/json/lookup/player_teams/{idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.playerTeams({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.team

GET https://www.thesportsdb.com/api/v2/json/lookup/team/{idTeam}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.team({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.teamEquipment

GET https://www.thesportsdb.com/api/v2/json/lookup/team_equipment/{idTeam}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.teamEquipment({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.lookup.venue

GET https://www.thesportsdb.com/api/v2/json/lookup/venue/{idVenue}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.lookup.venue({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v1.lookup.equipment

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookupequipment.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookup.equipment({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v1.lookup.league

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookupleague.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookup.league({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v1.lookup.table

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookuptable.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookup.table({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v1.lookup.team

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookupteam.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookup.team({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v1.lookup.venue

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookupvenue.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookup.venue({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

查找所有显示器

GET thesportsdb.v1.lookupAllPlayers

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookup_all_players.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookupAllPlayers({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

寻找合同

GET thesportsdb.v1.lookupcontracts

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookupcontracts.php?id={idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookupcontracts({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

搜索活动

GET thesportsdb.v1.lookupEvent

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookupevent.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookupEvent({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

浏览事件

GET thesportsdb.v1.lookupEventStats

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookupeventstats.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookupEventStats({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

侦察队

GET thesportsdb.v1.lookupformerteams

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookupformerteams.php?id={idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookupformerteams({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

仰望荣誉

GET thesportsdb.v1.lookuphonours

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookuphonours.php?id={idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookuphonours({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

搜索线

GET thesportsdb.v1.lookupLineup

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookuplineup.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookupLineup({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

寻找里程碑

GET thesportsdb.v1.lookupmilestones

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookupmilestones.php?id={idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookupmilestones({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

搜索玩家

GET thesportsdb.v1.lookupplayer

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookupplayer.php?id={idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookupplayer({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

寻找玩家

GET thesportsdb.v1.lookupplayerstats

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookupplayerstats.php?id={idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookupplayerstats({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

寻找时间线

GET thesportsdb.v1.lookupTimeline

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookuptimeline.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookupTimeline({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

查询Tv

GET thesportsdb.v1.lookupTv

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/lookuptv.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.lookupTv({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

玩家结果

GET thesportsdb.v1.playerresults

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/playerresults.php?id={idPlayer}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.playerresults({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

时间表

GET thesportsdb.v2.schedule.full.team

GET https://www.thesportsdb.com/api/v2/json/schedule/full/team/{idTeam}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.schedule.full.team({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.schedule.league

GET https://www.thesportsdb.com/api/v2/json/schedule/league/{idLeague}/{season}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.schedule.league({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.schedule.next.league

GET https://www.thesportsdb.com/api/v2/json/schedule/next/league/{idLeague}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.schedule.next.league({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.schedule.next.team

GET https://www.thesportsdb.com/api/v2/json/schedule/next/team/{idTeam}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.schedule.next.team({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.schedule.next.venue

GET https://www.thesportsdb.com/api/v2/json/schedule/next/venue/{idVenue}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.schedule.next.venue({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.schedule.previous.league

GET https://www.thesportsdb.com/api/v2/json/schedule/previous/league/{idLeague}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.schedule.previous.league({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.schedule.previous.team

GET https://www.thesportsdb.com/api/v2/json/schedule/previous/team/{idTeam}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.schedule.previous.team({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.schedule.previous.venue

GET https://www.thesportsdb.com/api/v2/json/schedule/previous/venue/{idVenue}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.schedule.previous.venue({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.search.event

GET https://www.thesportsdb.com/api/v2/json/search/event/{eventName}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.search.event({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.search.league

GET https://www.thesportsdb.com/api/v2/json/search/league/{leagueName}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.search.league({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.search.player

GET https://www.thesportsdb.com/api/v2/json/search/player/{playerName}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.search.player({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.search.team

GET https://www.thesportsdb.com/api/v2/json/search/team/{teamName}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.search.team({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

GET thesportsdb.v2.search.venue

GET https://www.thesportsdb.com/api/v2/json/search/venue/{venueName}

成本等级 : cheap

上游区域

const res = await thesportsdb.get.v2.search.venue({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

搜索所有线索

GET thesportsdb.v1.searchAllLeagues

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/search_all_leagues.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.searchAllLeagues({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

搜索 AllSeasons

GET thesportsdb.v1.searchAllSeasons

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/search_all_seasons.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.searchAllSeasons({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

搜索全部小组

GET thesportsdb.v1.searchAllTeams

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/search_all_teams.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.searchAllTeams({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

搜索事件

GET thesportsdb.v1.searchEvents

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/searchevents.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.searchEvents({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

搜索文件名称

GET thesportsdb.v1.searchFilename

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/searchfilename.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.searchFilename({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

搜索层

GET thesportsdb.v1.searchPlayers

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/searchplayers.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.searchPlayers({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

搜索小组

GET thesportsdb.v1.searchTeams

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/searchteams.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.searchTeams({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

搜索视频

GET thesportsdb.v1.searchVenues

GET https://www.thesportsdb.com/api/v1/json/{apiKey}/searchvenues.php{query}

成本等级 : cheap

上游区域

const res = await thesportsdb.v1.searchVenues({ /* ... */ });

资料来源: packages/provider/thesportsdb/src/thesportsdb.ts

部分 辣点 单相机.

许可证

麻省理工学院——见 自由主义。 。 。 .

版本与发布记录

@apicity/thesportsdb 共发布 59 个版本,首次发布于 2026/06/24;过去 12 个月发布了 59 个版本。

版本发布日期距今
0.26.0latest2026/11/051 天前
0.25.02026/11/033 天前
0.24.12026/11/024 天前
0.24.02026/11/014 天前
0.23.12026/11/015 天前
0.23.02026/11/015 天前

关于 @apicity/thesportsdb 的常见问题

@apicity/thesportsdb 是什么?

TheSportsDB V1和V2体育数据API提供商.

如何安装 @apicity/thesportsdb?

在项目目录运行 npm install @apicity/thesportsdb,或使用 pnpm add / yarn add / bun add。

@apicity/thesportsdb 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@apicity/thesportsdb 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@apicity/thesportsdb 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@apicity/thesportsdb 可以商用吗?

@apicity/thesportsdb 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@apicity/thesportsdb 的下载量有多少?

根据 npm 官方下载统计,@apicity/thesportsdb 在 2026/10/06 – 2026/11/04 这 30 天内被下载 3,612 次,日均约 120 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@apicity/thesportsdb 还在维护吗?

最新版本 0.26.0 发布于 2026/11/05(1 天前);至今共发布 59 个版本,其中过去 12 个月发布了 59 个;首次发布于 2026/06/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。