企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
#### 为什么要迁移到新版接口 全新的新版([api.gsdata.cn](http://api.gsdata.cn))[v2]接口较旧版([open.gsdata.cn/api](http://open.gsdata.cn/api))[v1]接口具有更丰富的功能、更规范、更可控等优势,很好地满足了开发者的需求。 **新版接口较旧版接口的优势** 1. 更多功能 * V2较V1新增了大量接口,舆情内容分析类、舆情方案、舆情传播、微博榜单、微博分组; * 另外,企业背景、知识产权、法律风险等工商类数据也即将开放。 2. 更规范 * 统一参数、返回值字段,全部小写字母,单词和单词之间用“_”链接 * 接口URI,全部采用:请求方式+域+版本号+接口名+参数 * 统一的新错误返回值格式及错误码 * 核心字段:微信、微博、分组全部标准化,避免核心字段在不同接口中返回值不同,从而降低开发成本 * 接口尽量按照 OPENAPI 规范来实现 * 接口默认返回xml 结构体,声明头信息之后返回 json 结构话文档 3. 更可控 * 接口使用更加透明,使用量,消耗点数依依记录 * 接口在正常返回的情况下才会扣点,比如http 状态码为200,201,204 的情况下进行扣费 * 提供ip白名单 ### V1到V2怎么迁移 V1迁移到V2主要需要完成签名机制的转换及完成V1原有接口与V2中新接口的对应替换。 ### V1接口迁移到V2接口 在[创建应用](http://open.gsdata.cn/)并实现[签名](default.md)后,接下来需要将应用使用的V1版接口对应迁移到V2版接口。此时需要根据新接口的调用地址、调用方式、参数、返回值、错误信息处理来进行代码的改造。 以下是V2版接口与V1版接口的对应列表,部分旧版接口由于用户投诉或性能等原因已不再提供,同时新版接口提供丰富的高级接口开放优质应用申请,您可以直接在应用控制台中提交高级接口申请。 如果现有接口未能满足您的需求,欢迎进入开发者交流群(4000019)进行反馈,我们将根据开发者需求强度及清博公司的利益权衡适度开放。 |新版V2接口 | 对应老版V1接口|接口说明 | | --- | --- | --- | | [/pubsent/v1/contents](http://open.gsdata.cn/article/info?id=1) | |根据方案编号获取内容列表 | | [/pubsent/v1/contents/emotions](http://open.gsdata.cn/article/info?id=2) | |根据方案编号分析情感属性 | | [/pubsent/v1/contents/hot-words](http://open.gsdata.cn/article/info?id=3) | |根据方案编号获取热门主题词 | | [/pubsent/v1/contents/assortments](http://open.gsdata.cn/article/info?id=4) | |根据方案编号分析文章类型 | | [/pubsent/v1/plans](http://open.gsdata.cn/article/info?id=5) | |获取当前用户的方案列表 | | [/pubsent/v1/plans/pub-subs](http://open.gsdata.cn/article/info?id=6) | |获取公共方案列表 | | [/pubsent/v1/trans/media-distributions](http://open.gsdata.cn/article/info?id=7) | |根据方案编号进行媒体分布的传播分析 | | [/pubsent/v1/trans/active-medias](http://open.gsdata.cn/article/info?id=10) | |根据方案编号以及媒体累类型分析媒体机构发布的数量 | | [/pubsent/v1/trans/release-areas](http://open.gsdata.cn/article/info?id=11) | |根据方案编号分析发布热区 | | [/pubsent/v1/trans/areas](http://open.gsdata.cn/article/info?id=12) | |根据方案编号分析提及热区 | | [/pubsent/v1/weibos/hot-accounts](http://open.gsdata.cn/article/info?id=13) | |根据方案编号分析微博的账号 | | [/pubsent/v1/weibos/hot-areas](http://open.gsdata.cn/article/info?id=14) | |根据方案编号分析微博的发布热区 | | [/pubsent/v1/weibos/auth-types](http://open.gsdata.cn/article/info?id=15) | |根据方案编号分析微博的账号类型 | | [/pubsent/v1/weibos/fans-genders](http://open.gsdata.cn/article/info?id=16) | |根据方案编号分析微博粉丝的性别分布 | | [/pubsent/v1/weibos/fans-qualitys](http://open.gsdata.cn/article/info?id=17) | |根据方案编号分析微博大v粉丝数量的分布 | | [/pubsent/v1/weixins/hot-accounts](http://open.gsdata.cn/article/info?id=18) | |根据方案编号分析微信的热门账号 | | [/pubsent/v1/weixins/hot-areas](http://open.gsdata.cn/article/info?id=19) | |根据方案编号分析微信的发布热区 | | [/pubsent/v1/weixins/auth-types](http://open.gsdata.cn/article/info?id=20) | |根据方案编号分析微信的账号类型 | | [/pubsent/v1/weixins/positions](http://open.gsdata.cn/article/info?id=21) | |根据方案编号分析微信的文章位置 | | [/pubsent/v1/weixins/wcis](http://open.gsdata.cn/article/info?id=22) | |根据方案编号分析微信的WCI分布 | 1点 | | [/weibo/v1/articles](http://open.gsdata.cn/article/info?id=23) | |微博的博文列表最多返回50条,默认20条 | | [/weixin/v1/articles](http://open.gsdata.cn/article/info?id=24) | [/api/wx/opensearchapi/content_keyword_search](http://open.gsdata.cn/api/wx/opensearchapi/content_keyword_search.html)| 微信文章列表最多返回50条,默认20条 | | [/weixin/v1/articles/real-times](http://open.gsdata.cn/article/info?id=34) | [/api/wx/wxapi/wx_content](http://open.gsdata.cn/api/wx/wxapi/wx_content.html)|文章地址根据文章的地址实时获取文章正文 | 1点 | | [/weixin/v1/articles/key-words](http://open.gsdata.cn/article/info?id=80) | |根据文章内容获取关键词 | | [/weixin/v1/articles/week-read-nums](http://open.gsdata.cn/article/info?id=82) | [/api/wx/wxapi/wx_week_readnum](http://open.gsdata.cn/api/wx/wxapi/wx_week_readnum.html)|通过本系统nickname_id或微信文章url地址或者sn获取距发布时间七日时间阅读点赞数(暂时仅支持最近一个月的文章) | | [/weixin/v1/tests](http://open.gsdata.cn/article/info?id=26) | | 接口测试 | | [/weixin/v1/tests](http://open.gsdata.cn/article/info?id=31) | |post请求接口测试 | | [/weixin/v1/tests/unames](http://open.gsdata.cn/article/info?id=76) | |delete请求接口测试 | | [/weixin/v1/users](http://open.gsdata.cn/article/info?id=27) | [/api/wx/wxapi/nickname_one](http://open.gsdata.cn/api/wx/wxapi/nickname_one.html)|微信公众号列表 | | [/weixin/v1/users/rank-days](http://open.gsdata.cn/article/info?id=28) | [/api/wx/wxapi/nickname_mark](http://open.gsdata.cn/api/wx/wxapi/nickname_mark.html)|根据微信名称获取排名 | | [/weixin/v1/users/batch-rank-days](http://open.gsdata.cn/article/info?id=29) | |根据微信名称批量获取排名 | | [/weixin/v1/users/batch-acounts](http://open.gsdata.cn/article/info?id=30) | |获取最近七天排名 | | 即将上线[/weixin/v1/users/estimate-fans](http://open.gsdata.cn/article#) | [/api/wx/wxapi/getYGFS](http://open.gsdata.cn/api/wx/wxapi/getYGFS.html)|根据微信号或者微信昵称获取预估的粉丝数 | | [/weixin/v1/groups](http://open.gsdata.cn/article/info?id=35) | [/api/wx/wxapi/group_name](http://open.gsdata.cn/api/wx/wxapi/group_name.html)|返回微信分组名称以及分组id | | [/weixin/v1/groups/nicknames](http://open.gsdata.cn/article/info?id=36) |[/api/wx/wxapi/del_nickname_In_group](http://open.gsdata.cn/api/wx/wxapi/del_nickname_In_group.html) |根据nickname编号删除当前用户分组内微信公众号 | | [/weixin/v1/groups/wxnames](http://open.gsdata.cn/article/info?id=37) | [/api/wx/wxapi/del_wxname_In_group](http://open.gsdata.cn/api/wx/wxapi/del_wxname_In_group.html)|根据wx_name删除本用户分组内微信公众号 | | [/weixin/v1/groups](http://open.gsdata.cn/article/info?id=64) | [/api/wx/wxapi/addWxGroup](http://open.gsdata.cn/api/wx/wxapi/addWxGroup.html)|创建微信分组(微信自定义榜单) | | [/weixin/v1/groups/wxnames](http://open.gsdata.cn/article/info?id=65) |[/api/wx/wxapi/add_wx_to_group](http://open.gsdata.cn/api/wx/wxapi/add_wx_to_group) |添加微信公众账号到分组并返回公众号相关信息 | 1点 | | [/weixin/v1/groups/acounts](http://open.gsdata.cn/article/info?id=78) |[/api/wx/wxapi/add_wx_to_group_by_url](http://open.gsdata.cn/api/wx/wxapi/add_wx_to_group_by_url.html) |根据微信biz或者文章url添加微信账号到分组并返回公众号相关信息,参数优先级nickname_id>biz>url | 1点 | | 即将上线[/weixin/v1/groups/acounts](http://open.gsdata.cn/article#) | [/api/wx/wxapi/nickname_group](http://open.gsdata.cn/api/wx/wxapi/nickname_group.html) |查看当前用户某个分组内的微信账号信息 | | 即将上线[/weixin/v1/groups/articles](http://open.gsdata.cn/article#) |[/api/wx/wxapi/group_data](http://open.gsdata.cn/api/wx/wxapi/group_data.html) |查看当前用户自有分组内的微信账号文章列表 | | [/weixin/v1/ranks](http://open.gsdata.cn/article/info?id=38) | [/api/wx/wxapi/result_day](http://open.gsdata.cn/api/wx/wxapi/result_day.html) |微信日榜 | | [/weixin/v1/ranks/weeks](http://open.gsdata.cn/article/info?id=39) | [/api/wx/wxapi/result_week](http://open.gsdata.cn/api/wx/wxapi/result_week.html) |微信周榜 | | [/weixin/v1/ranks/months](http://open.gsdata.cn/article/info?id=85) |[/api/wx/wxapi/result_month](http://open.gsdata.cn/api/wx/wxapi/result_month.html) |微信月度榜单 | | [/weibo/v1/groups](http://open.gsdata.cn/article/info?id=63) | |获取系统用户所创建的微博分组信息 | | [/weibo/v1/groups](http://open.gsdata.cn/article/info?id=66) | |创建微博分组(微博自定义榜单) | | [/weibo/v1/groups/acounts](http://open.gsdata.cn/article/info?id=67) | |当前分组中的账号信息 | | [/weibo/v1/groups/acounts](http://open.gsdata.cn/article/info?id=68) | |将微博账号添加到分组当中 | | [/weibo/v1/groups/acounts](http://open.gsdata.cn/article/info?id=69) | |从当前分组中删除微博账号 | | [/weibo/v1/ranks](http://open.gsdata.cn/article/info?id=86) | |微博日榜 | | [/weibo/v1/ranks/weeks](http://open.gsdata.cn/article/info?id=87) | |微博周榜 | | [/weibo/v1/ranks/months](http://open.gsdata.cn/article/info?id=88) | |微博月度榜单 | V2中已废弃或暂未支持的V1接口 | 接口地址| 接口说明 | | --- | --- | | [/api/sys/sysapi/user_info](http://open.gsdata.cn/api/sys/sysapi/user_info.html) | 根据用户名称查询用户信息 | | [/api/sys/sysapi/login_user](http://open.gsdata.cn/api/sys/sysapi/login_user.html) | 用户登陆验证 | | [/api/sys/sysapi/check_user](http://open.gsdata.cn/api/sys/sysapi/check_user.html) | 用户名验证 | | [/api/wx/wxapi/result_tables](http://open.gsdata.cn/api/wx/wxapi/result_tables.html) | 返回当月所有统计表(日,周) | | [/api/wx/opensearchapi/content_list](http://open.gsdata.cn/api/wx/opensearchapi/content_list.html) | 根据条件搜索公众号某段时间内的文章信息| | [/api/wx/wxapi/nickname](http://open.gsdata.cn/api/wx/wxapi/nickname.html) | 通过UID返回用户分组及各分组内的公众号(含最新发布的一条文章)列表 |