API

获取稿件明细

系统级参数
名称 类型 是否必须 描述
method string API接口名称
session string 分配给用户的session_key,通过登陆授权获取。
timestamp string 时间戳,格式为yyyy-MM-dd HH:mm:ss,例如:2008-01-25 20:23:30。
format string 可选,指定响应格式。默认json,目前支持格式为xml,json
app_key string 分配给应用的app_key
v string API协议版本,例如:1.0。
sign string API输入参数签名结果
sign_method string 参数的加密方法选择,可选值是:md5,hmac。
应用级参数
名称 类型 是否必须 描述
userCode String 用户id
newsId String 稿件ID
返回结果
名称 类型 是否必须 描述
itemId String 稿件ID
title String 稿件标题
signTime String 签发时间
author String 作者
packageId String 产品包ID
packageName String 产品包名称
content String 稿件内容(文字内容)
wordCount Integer 正文字数
keyword String 关键字
artSource String 稿件来源
categoryOther String 稿件所属其他分类的名称
categoryFL String 稿件所属分类的名称
categoryXL String 稿件所属细类的名称
categoryPro String 稿件所属产品的名称
categoryRegion String 稿件所属地区的名称
categoryNames String 稿件所属分类的名称(用于展示)
artType Integer 稿件类型
happenPlace String 事发地点
reportarea String 报道地点
sendArea String 发稿地点
richTagInfos String 富标签信息
knowledgeTags String 知识词条
knowledgeNames String 人物库名称
cnmlName String CNML的名称
abstract String 摘要信息
attachs List 稿件附件列表信息;每个子项包括:attachId、attachType、attachExtend、downUrl4个属性
attachId String 附件ID
attachType String 附件类型(图片、音频、视频、CNML)
attachExtend String 附件扩展名(jpg,png……)
downUrl String 附件下载地址 –给出的是原始文件(从新媒体库获取)的下载地址;
返回示例

JSON数据格式:

 {"itemId":"881072","title":"[Reuters]Actor Rob Lowe poses at the premiere of "How to Be a Latin Lover" in Los Angeles","signTime":"2017-04-27 15:37:00","author":"DANNY MOLOSHOK","packageId":"878306","packageName":"前提","content":"Actor Rob Lowe poses at the premiere of "How to Be a Latin Lover" in Los Angeles, California, U.S. April 26, 2017. REUTERS/Danny Moloshok","wordCount":137,"keyword":"wd","artSource":"","categoryFL":"文化娱乐","categoryRegion":"LOS ANGELES","categoryNames":"图片","reportarea":"","richTagInfos":"","knowledgeTags":"","knowledgeNames":"","cnmlName":"XxjpieE001233_20170427_TPPFN0.xml","attachs":[{"attachId":"5426423","attachType":"101","attachExtend":"xml","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=59019f4945ce40ee5811aac2"},{"attachId":"5426424","attachType":"202","attachExtend":"jpg","downUrl":"http://dev.xinhua-news.com:19080/entitydata/xhpic/2017/04/27/XxjpieE001233_20170427_TPPFN0A001.jpg"},{"attachId":"5426425","attachType":"203","attachExtend":"jpg","downUrl":"http://dev.xinhua-news.com:19080/entitydata/xhpic/2017/04/27/XxjpieE001233_20170427_TPPFN0A001_150x150.jpg"},{"attachId":"5426426","attachType":"204","attachExtend":"jpg","downUrl":"http://dev.xinhua-news.com:19080/entitydata/xhpic/2017/04/27/XxjpieE001233_20170427_TPPFN0A001_500x500.jpg"},{"attachId":"5426980","attachType":"102","attachExtend":"xml","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=5901a08245ce40ee5811bcaf"},{"attachId":"5426981","attachType":"103","attachExtend":"xml","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=5901a08345ce40ee5811bcb1"},{"attachId":"5426982","attachType":"104","attachExtend":"xml","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=5901a08345ce40ee5811bcb3"},{"attachId":"5426983","attachType":"105","attachExtend":"xml","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=5901a08345ce40ee5811bcb5"},{"attachId":"5426984","attachType":"106","attachExtend":"txt","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=5901a08345ce40ee5811bcb7"},{"attachId":"5426985","attachType":"107","attachExtend":"txt","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=5901a08445ce40ee5811bcb9"},{"attachId":"5426986","attachType":"102","attachExtend":"xml","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=5901a08845ce40ee5811bcbb"},{"attachId":"5426987","attachType":"103","attachExtend":"xml","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=5901a08945ce40ee5811bcbd"},{"attachId":"5426988","attachType":"104","attachExtend":"xml","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=5901a08a45ce40ee5811bcbf"},{"attachId":"5426989","attachType":"105","attachExtend":"xml","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=5901a08a45ce40ee5811bcc1"},{"attachId":"5426990","attachType":"106","attachExtend":"txt","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=5901a08a45ce40ee5811bcc3"},{"attachId":"5426991","attachType":"107","attachExtend":"txt","downUrl":"http://dev.xinhua-news.com:8080/xhs-web-mall/player/ecpshowflash?videoUUId=5901a08a45ce40ee5811bcc5"}],"abstract":""}
错误码
错误码   错误描述 解决方案
API工具
FAQ
问:接口长时间没有响应?
答:检查本机网络是否正常,然后通过测试工具进行测试接口是否正常。