纳米体育数据的数据接口通过JSON拉流方式获取200多个国家的体育赛事实时数据或历史数据的编程接口,无请求次数限制,可按需购买,接口稳定高效;
覆盖项目包括足球、篮球、网球、电子竞技、奥运等专题、数据内容。纳米数据API2.0版本包含http协议以及websocket协议,主要通过http获取数据,实时数据通过websocket获取。http协议支持http和https,每个接口都需要传递用户名和密钥用于验证接口权限,白名单ip才能够获取相关数据。
websocket协议域名为s.sportnanoapi.com,通过mqtt的websocket协议实现,用户名、密钥和白名单ip必须正确才能订阅数据,否则无法授权,api通过java、python示例,同时也包含其他语言。
获取比赛列表
用于获取全量比赛数据,可根据时间戳增量获取新增或变动的数据
1、首次全量更新,根据参数id获取全量数据
2、后续增量更新,根据参数time增量获取变动数据(建议请求频次:1min/次)
请求参数:TREE
-
userstring
用户名,请联系商务
必填
-
secretstring
用户密钥,请联系商务
必填
-
idinteger
查询大于等于id的记录,根据id排序
-
timeinteger
查询大于等于更新时间的记录(时间戳),根据更新时间排序
-
limitinteger
返回数据最大数,默认为1000,最大为1000
返回参数:TREE
{
code:
integer
query: {
查询情况
total: integer
返回数据总量
type: string
查询类型,id查询:sequence、time查询:time,默认sequence
id: integer
查询id值,默认为0(id查询,字段返回)
min_id: integer
返回数据最小id(id查询,字段返回)
max_id: integer
返回数据最大id(id查询,字段返回)
limit: integer
可返回数据最大数(id查询,字段返回)
time: integer
查询time值(time查询,字段返回)
min_time: integer
返回数据最小time(更新时间戳)(time查询,字段返回)
max_time: integer
返回数据最大time(更新时间戳)(time查询,字段返回)
}results:[ {
比赛列表
id: integer
比赛id
unique_tournament_id: integer
赛事id
season_id: integer
赛季id
tournament_id: integer
阶段id
venue_id: integer
场馆id
home_team_id: integer
主队id
away_team_id: integer
客队id
match_time: integer
比赛时间
status_id: integer
比赛状态,详见 状态码->比赛状态
neutral: integer
是否中立场,1-是、0-否
bestof: integer
盘数,3-BO3、5-BO5、0-未知
coverage: {
动画字段
mlive: integer
是否有动画,1-是、0-否
}scores: {
比分数据(可能为空)
ft-总比分
p*-盘比分(*-盘数,1、2、3...)
x*-抢7比分(*-盘数,1、2、3...)
pt-实时局比分
ft:[Enum:Array[2]
0:"主队分数 - int"
1:"客队分数 - int"
]p*:[Enum:Array[2]
0:"主队分数 - int"
1:"客队分数 - int"
]x*:[Enum:Array[2]
0:"主队分数 - int"
1:"客队分数 - int"
]pt:[Enum:Array[2]
0:"主队分数 - string"
1:"客队分数 - string"
]}match_ids:[
团体赛下关联的比赛
example:[3942891, 3942892, 3942893]
Enum:Array[1]
0:"比赛id - int"
]weather: {
天气(没有数据,字段不存在)
desc: string
天气描述
pressure: integer
气压 mmHg
temp: integer
温度 ℃
wind: integer
风速 m/s
humidity: integer
湿度 %
}updated_at: integer
更新时间
}]
}
462

被折叠的 条评论
为什么被折叠?



