Contact Us
Back top
Current Location : APIs > 新浪体育
新浪体育 Transactions( 144 )

新浪体育

288

Intro. :

Tag : 新闻体育

On Shelves Time : 2016-12-29

Type :

Total invocations(updated per hour)

新浪体育 ¥ 1.00 yuan/100calls 辅助工具 每天免费测试 30

接口服务

接口延迟等级: - 平台反爬等级: -
平台升级频率: -

数据指标

最大数据量: 无限制 最大页数: 无限制
每页数据量: 10 数据实时性: 实时
数据回溯性: 全部 数据排序项: 平台默认
缺失的数据字段: 暂无 备注:

API Mark

Example

注: 该接口为实时数据接口,可能受目标平台或网络状态影响,会存在一定的错误率,建议在程序中加入出错重试机制。
Error Code
-- 请求示例 url 默认请求参数已经做URL编码 curl -i "http://api01.idataapi.cn:8000/post/sina_sport?apikey=Your apikey&baid=%E8%AE%BA%E5%9D%9BID"
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.net.URL; import java.nio.charset.Charset; import org.json.JSONException; import org.json.JSONObject; import java.io.PrintWriter; import java.net.URLConnection; public class Example { private static String readAll(Reader rd) throws IOException { StringBuilder sb = new StringBuilder(); int cp; while ((cp = rd.read()) != -1) { sb.append((char) cp); } return sb.toString(); } public static JSONObject postRequestFromUrl(String url, String body) throws IOException, JSONException { URL realUrl = new URL(url); URLConnection conn = realUrl.openConnection(); conn.setDoOutput(true); conn.setDoInput(true); PrintWriter out = new PrintWriter(conn.getOutputStream()); out.print(body); out.flush(); InputStream instream = conn.getInputStream(); try { BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8"))); String jsonText = readAll(rd); JSONObject json = new JSONObject(jsonText); return json; } finally { instream.close(); } } public static JSONObject getRequestFromUrl(String url) throws IOException, JSONException { URL realUrl = new URL(url); URLConnection conn = realUrl.openConnection(); InputStream instream = conn.getInputStream(); try { BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8"))); String jsonText = readAll(rd); JSONObject json = new JSONObject(jsonText); return json; } finally { instream.close(); } } public static void main(String[] args) throws IOException, JSONException { // 请求示例 url 默认请求参数已经做URL编码 String url = "http://api01.idataapi.cn:8000/post/sina_sport?apikey=Your apikey&baid=%E8%AE%BA%E5%9D%9BID"; JSONObject json = getRequestFromUrl(url);; System.out.println(json.toString()); } }
//using System.Net.Security; //using System.Security.Cryptography.X509Certificates; private const String method = "GET"; static void Main(string[] args) { String bodys = ""; // 请求示例 url 默认请求参数已经做URL编码 String url = "http://api01.idataapi.cn:8000/post/sina_sport?apikey=Your apikey&baid=%E8%AE%BA%E5%9D%9BID"; HttpWebRequest httpRequest = null; HttpWebResponse httpResponse = null; if (url.Contains("https://")) { ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult); httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url)); } else { httpRequest = (HttpWebRequest)WebRequest.Create(url); } httpRequest.Method = method; if (0 < bodys.Length) { byte[] data = Encoding.UTF8.GetBytes(bodys); using (Stream stream = httpRequest.GetRequestStream()) { stream.Write(data, 0, data.Length); } } try { httpResponse = (HttpWebResponse)httpRequest.GetResponse(); } catch (WebException ex) { httpResponse = (HttpWebResponse)ex.Response; } Console.WriteLine(httpResponse.StatusCode); Console.WriteLine(httpResponse.Method); Console.WriteLine(httpResponse.Headers); Stream st = httpResponse.GetResponseStream(); StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8")); Console.WriteLine(reader.ReadToEnd()); Console.WriteLine("\n"); } public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) { return true; }
<?php $method = "GET"; // 请求示例 url 默认请求参数已经做URL编码 $url = "http://api01.idataapi.cn:8000/post/sina_sport?apikey=Your apikey&baid=%E8%AE%BA%E5%9D%9BID"; $curl = curl_init(); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_FAILONERROR, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HEADER, true); curl_setopt($curl, CURLOPT_ENCODING, "gzip"); var_dump(curl_exec($curl)); ?>
# coding:utf-8 """ Compatible for python2.x and python3.x requirement: pip install requests """ from __future__ import print_function import requests # 请求示例 url 默认请求参数已经做URL编码 url = "http://api01.idataapi.cn:8000/post/sina_sport?apikey=Your apikey&baid=%E8%AE%BA%E5%9D%9BID" headers = { "Accept-Encoding": "gzip", "Connection": "close" } if __name__ == "__main__": r = requests.get(url, headers=headers) json_obj = r.json() print(json_obj)

Request Field( Params marked* means users should choose one from the each marked items to fill in.)

Property Name Type Mandatory Example Description
pageToken string 翻页值,从API返回结果可以拿到
baid string comm_1068

Response Fields

Property Name Type Example Description
  • hasNext boolean true 是否有下一页
  • retcode string 000000 返回状态码
  • appCode string sina_sport 本次查询的api名
  • dataType string post 本次查询的api类型
  • pageToken string 2 翻页值
  • data array [...] 数据内容列表
  • posterId string 5066339827weibo 发布者ID
  • viewCount number 652659 浏览数
  • posterScreenName string 230229 发布者名称
  • title string 16-17赛季CBA总冠军预测贴! 文章标题
  • url string null 文章链接
  • imageUrls array [...] 图片链接
  • publishDate number 1491405240 发布时间:时间戳格式
  • likeCount string null 点赞数
  • commentCount number 52 评论数
  • shareCount string null 转发数
  • content string 辽宁、新疆、四川、广东、山东、广厦、北京、浙江,上赛季进入季后赛的八支球队,本赛 文章内容
  • publishDateStr string 2017-04-05T15:14:00 发布时间:字符串格式
  • id string 4740 文章ID

Returns The Sample

{
    "hasNext": true,
    "retcode": "000000",
    "appCode": "sina_sport",
    "dataType": "post",
    "pageToken": "2",
    "data": [
        {
            "posterId": "5066339827weibo",
            "viewCount": 652659,
            "posterScreenName": "230229",
            "title": "16-17赛季CBA总冠军预测贴!",
            "url": null,
            "imageUrls": [
                "http:\/\/n.sinaimg.cn\/sports\/20161015\/iOD--fxwvpat4854897.jpg"
            ],
            "publishDate": 1491405240,
            "likeCount": null,
            "commentCount": 52,
            "shareCount": null,
            "content": "辽宁、新疆、四川、广东、山东、广厦、北京、浙江,上赛季进入季后赛的八支球队,本赛季冠军会在这些球队出现,还是又有一匹黑马冲出来夺冠?\r\n请大家把自己的预测写在下面,看谁是预测帝!\r\n\r\n\r\n\n\n\n",
            "publishDateStr": "2017-04-05T15:14:00",
            "id": "4740"
        },
        {
            "posterId": "3640174103weibo",
            "viewCount": 120,
            "posterScreenName": "140138",
            "title": "你要是男篮主教练你带哪队?",
            "url": null,
            "imageUrls": [
                "http:\/\/n.sinaimg.cn\/sports\/transform\/20170510\/Ol30-fyeyqem3093876.jpg"
            ],
            "publishDate": 1494555600,
            "likeCount": null,
            "commentCount": 3,
            "shareCount": null,
            "content": "这是李楠和杜锋两人选的球员,你要是主教练你带哪队?我还是带红队吧,晓川继伟小丁雨宸!\r\n\r\n",
            "publishDateStr": "2017-05-12T02:20:00",
            "id": "9374"
        },
        {
            "posterId": "6209856664weibo",
            "viewCount": 4,
            "posterScreenName": "399597",
            "title": "玩球的朋友可以来看看,实力证明一切,回血单,暴击单,稳定命中7",
            "url": null,
            "imageUrls": [
                "http:\/\/storage.fans.sports.sina.com.cn\/bbs\/2017\/05\/12\/1956f1958095e10ed8b1f34bd79fe9d0.jpg",
                "http:\/\/storage.fans.sports.sina.com.cn\/bbs\/2017\/05\/12\/f5ce7aaa5eb74ab2607b244fd80d7dcf.jpg",
                "http:\/\/storage.fans.sports.sina.com.cn\/bbs\/2017\/05\/12\/9cb3e829fe3933c9774df52f9c901fc8.jpg",
                "http:\/\/storage.fans.sports.sina.com.cn\/bbs\/2017\/05\/12\/def2374083b5a2782be5df0c6fc9269c.jpg"
            ],
            "publishDate": 1494518460,
            "likeCount": null,
            "commentCount": 0,
            "shareCount": null,
            "content": "玩球的朋友可以来看看,实力证明一切,回血单,暴击单,稳定命中7成以上",
            "publishDateStr": "2017-05-11T16:01:00",
            "id": "9386"
        },
        {
            "posterId": "3640174103weibo",
            "viewCount": 79,
            "posterScreenName": "140138",
            "title": "两个国家队为什么都没有西热力江?",
            "url": null,
            "imageUrls": [
                "http:\/\/n.sinaimg.cn\/sports\/transform\/20170510\/_b0K-fyeyqem3114030.jpg"
            ],
            "publishDate": 1494404400,
            "likeCount": null,
            "commentCount": 0,
            "shareCount": null,
            "content": "44人的国家队大名单,竟然没有西热力江?\r\n\n\n\n",
            "publishDateStr": "2017-05-10T08:20:00",
            "id": "9377"
        },
        {
            "posterId": "3640174103weibo",
            "viewCount": 65,
            "posterScreenName": "140138",
            "title": "这两队首发,哪队能赢?",
            "url": null,
            "imageUrls": [
                "http:\/\/n.sinaimg.cn\/sports\/transform\/20170510\/q0vl-fyeyqem3109228.jpg"
            ],
            "publishDate": 1494403920,
            "likeCount": null,
            "commentCount": 0,
            "shareCount": null,
            "content": "红队首发:赵继伟、丁彦雨航、翟晓川、王哲林、周琦 蓝队首发:郭艾伦、李根、周鹏、易建联、韩德君\r\n谁赢?\n\n\n\r\n",
            "publishDateStr": "2017-05-10T08:12:00",
            "id": "9376"
        },
        {
            "posterId": "3640174103weibo",
            "viewCount": 57,
            "posterScreenName": "140138",
            "title": "一看就是杜锋先选的!",
            "url": null,
            "imageUrls": [
                "http:\/\/n.sinaimg.cn\/sports\/transform\/20170510\/cJ9e-fyeyqem3098618.jpg"
            ],
            "publishDate": 1494403140,
            "likeCount": null,
            "commentCount": 0,
            "shareCount": null,
            "content": "杜锋说选人是蛇形选择的,两人抽签决定谁先选,易建联绝对是第一个被选出来的。\r\n\r\n",
            "publishDateStr": "2017-05-10T07:59:00",
            "id": "9375"
        },
        {
            "posterId": "3640174103weibo",
            "viewCount": 53,
            "posterScreenName": "140138",
            "title": "姚明确实带来了变化",
            "url": null,
            "imageUrls": [
                "http:\/\/n.sinaimg.cn\/sports\/transform\/20170510\/IlY3-fyeyqem3089046.jpg"
            ],
            "publishDate": 1494402360,
            "likeCount": null,
            "commentCount": 0,
            "shareCount": null,
            "content": "对于国家队人员的工资待遇,篮协通气会上表示:将会跟球员们签订合同,按照合同规定支付球员的工资。\n\n\n不管钱多少,根据合同办事,靠谱!\r\n\r\n",
            "publishDateStr": "2017-05-10T07:46:00",
            "id": "9373"
        },
        {
            "posterId": "3640174103weibo",
            "viewCount": 44,
            "posterScreenName": "140138",
            "title": "赵继伟根本没参加NBA选秀",
            "url": null,
            "imageUrls": [
                "http:\/\/n.sinaimg.cn\/sports\/transform\/20170509\/48c1-fyeyqem2349809.jpg"
            ],
            "publishDate": 1494323160,
            "likeCount": null,
            "commentCount": 0,
            "shareCount": null,
            "content": "辽篮都辟谣了,就是某些自媒体在造谣,可恶\r\n\r\n",
            "publishDateStr": "2017-05-09T09:46:00",
            "id": "9367"
        },
        {
            "posterId": "3640174103weibo",
            "viewCount": 152,
            "posterScreenName": "140138",
            "title": "中国女篮战胜美国女篮联队",
            "url": null,
            "imageUrls": [
                "http:\/\/n.sinaimg.cn\/sports\/transform\/20170502\/0OA4-fyeuirh0394890.jpg"
            ],
            "publishDate": 1494240300,
            "likeCount": null,
            "commentCount": 1,
            "shareCount": null,
            "content": "国际青年女篮挑战赛瓮安站,中国U19青年女篮70-66战胜美国女篮联队,以三连胜的成绩夺得冠军。 ​​​​\r\n这前几个长得真爷们...\n\n\n\n\n\n",
            "publishDateStr": "2017-05-08T10:45:00",
            "id": "9281"
        },
        {
            "posterId": "3640174103weibo",
            "viewCount": 197,
            "posterScreenName": "140138",
            "title": "全运会冠军好像没有悬念",
            "url": null,
            "imageUrls": [
                "http:\/\/n.sinaimg.cn\/sports\/transform\/20170502\/VpP9-fyeuirh0391293.jpg"
            ],
            "publishDate": 1493712000,
            "likeCount": null,
            "commentCount": 0,
            "shareCount": null,
            "content": "A组:广东、上海、解放军、A4。B组:辽宁、新疆、江苏、B4。\n\n\nA4与B4由参加附加赛的6队北京、山西、湖北、吉林、福建、山东单循环赛决定。\n\n\n冠军好像没有悬念...好像亚军也没有悬念...\r\n\r\n",
            "publishDateStr": "2017-05-02T08:00:00",
            "id": "9280"
        }
    ]
}

Detailed Data

No Details

状态码

Status Code Return Value Format : JSON

{

message:"API rate limit exceeded",

retcode:100703

}

The API in our platform is only paid on number of calls. For the detail, please refer to the below table.

Status Code Code Meaning Detailed Description Need paid or not?
000000 invoke successfully(data is not null) 成功调用并返回数据
100002 Search no result 目标参数搜索没结果
100301 Account not found 用户帐号不存在
100303 Search no result 账号未收录
100000 Server internal error 服务器内部错误
100001 Network error 网络错误
100004 Target server error 目标服务器错误
100005 Param error 用户输入参数错误
100700 Invalid authentication credentials 授权失败
100701 API stopped 您的当前API已停用
100702 Account stopped 您的账户已停用
100703 API rate limit exceeded 并发已达上限
100704 API maintenance API维护中
100705 API not found with these values API不存在
100706 Please add api first 请先添加api
100707 Number of calls exceeded 调用次数超限
100802 Missing url param 'time' or uri path is not equal to 2 请求路径错误或者缺少"time"参数
100803 Wrong pageToken 参数pageToken有误

Often With The Purchase Of Data