新闻头条

最后更新于:2022-04-02 08:20:01

## 新闻头条 >[danger]### 免费接口,每日100次免费调用,会员可不限次数调用,购买[API会员](https://market.topthink.com/product/210) ![](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/53/9b/539b4b5b2a7cc13f39fe9a5db5039ae7_239x186.png =x120) > 最新新闻头条,各类社会、国内、国际、体育、娱乐、科技等资讯,更新周期5-30分钟 ## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086)) ### 请求地址 ``` GET https://api.topthink.com/news/toutiao ``` ### 请求参数 | 名称 | 必填 | 类型 | 说明 | | --- | --- | --- | --- | | appCode| 是|string| 用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | type | 否 | string | 类型,,top(头条,默认),shehui(社会),guonei(国内),guoji(国际),yule(娱乐),tiyu(体育)junshi(军事),keji(科技),caijing(财经),shishang(时尚) | ### 返回参数 | 名称 | 类型 | 说明 | | --- | --- | --- | | 见JSON返回示例 | \- | ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->newsToutiao() ->withType('yule') ->request(); ``` 返回示例: ~~~ { "code":0, "message": "成功的返回", "data": { "stat": "1", "data": [ { "uniquekey": "6c4caa0c3ba6e05e2a272892af43c00e", "title": "杨幂的发际线再也回不去了么?网友吐槽像半秃", "date": "2017-01-05 11:03", "category": "yule", "author_name": "腾讯娱乐", "url": "http://mini.eastday.com/mobile/170105110355287.html?qid=juheshuju", "thumbnail_pic_s": "http://03.imgmini.eastday.com/mobile/20170105/20170105110355_ 806f4ed3fe71d04fa452783d6736a02b_1_mwpm_03200403.jpeg", "thumbnail_pic_s02": "http://03.imgmini.eastday.com/mobile/20170105/20170105110355_ 806f4ed3fe71d04fa452783d6736a02b_2_mwpm_03200403.jpeg", "thumbnail_pic_s03": "http://03.imgmini.eastday.com/mobile/20170105/20170105110355_ 806f4ed3fe71d04fa452783d6736a02b_3_mwpm_03200403.jpeg" }, ...]}} ~~~
';