## 关键词百度排名 ![](https://img.kancloud.cn/bd/ef/bdefdf5b91225c44f893b32660bcd8c1_165x137.png) > 根据域名和关键词返回百度PC和移动的 关键词收录量、抓取时间、 关键词排名(页数-第几条)、 页面标题、 页面链接地址 ## 接口费用( [点击购买](https://market.topthink.com/product/363)) > 最低 0.003元/次 ## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086)) ## 接口1:关键词百度PC排名 ### 请求地址 ``` GET https://api.topthink.com/baidu/pc_rank ``` ### 请求参数 | 名称 | 必填 | 类型 | 说明 | | --- | --- | --- | --- | | appCode| 是|string| 用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | domainName | 是 | string | 获取的域名 | | keyword | 是 | string | 获取的关键词 | ### 返回`data`参数 | 名称 | 类型 | 说明 | | --- | --- | --- | | CollectCount | long | 收录量 | | RankStr | string | 排名(页数-条数) | | Title | string | 标题 | | Url | string | 标题连接 | | XiongzhangID | string | 熊掌ID | | CrawlTime | string | 抓取时间 | ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->baiduPcRank() ->withDomainName('thinkphp.cn') ->withKeyword('thinkphp') ->request(); ``` 返回示例: ~~~ { "code":0, "message": "成功", "data": { "CollectCount": "55300000", "CrawlTime": "2020-12-25 15:20:23", "Ranks": [ { "RankStr": "1-1", "Title": "ThinkPHP框架 | 中文最佳实践PHP开源框架,专注WE...", "Url": "http://www.thinkphp.cn/", "XiongzhangID": "" }, { "RankStr": "1-2", "Title": "序言- ThinkPHP3.2完全开发手册", "Url": "http://document.thinkphp.cn/", "XiongzhangID": "" }, { "RankStr": "1-9", "Title": "ThinkPHP官方博客 · 看云", "Url": "https://blog.thinkphp.cn/", "XiongzhangID": "" }, { "RankStr": "3-7", "Title": "thinkphp的个人主页 - ThinkPHP框架", "Url": "http://www.thinkphp.cn/u/thinkphp.html", "XiongzhangID": "" }, { "RankStr": "3-8", "Title": "下载:ThinkPHP5.0完整版 - ThinkPHP框架", "Url": "http://www.thinkphp.cn/donate/download/id/847.html", "XiongzhangID": "" }, { "RankStr": "3-9", "Title": "下载:ThinkPHP3.2.1完整版 - ThinkPHP框架", "Url": "http://www.thinkphp.cn/donate/download/id/532.html", "XiongzhangID": "" }, { "RankStr": "3-10", "Title": "ThinkPHP教程 - ThinkPHP框架", "Url": "http://www.thinkphp.cn/document/document.html", "XiongzhangID": "" }, { "RankStr": "4-1", "Title": "thinkphp官网下载 - 框架下载 - ThinkPHP框架", "Url": "http://www.thinkphp.cn/down/framework.html", "XiongzhangID": "" }, { "RankStr": "4-2", "Title": "thinkphp官网下载 - 框架下载 - ThinkPHP框架", "Url": "http://www.thinkphp.cn/down.html", "XiongzhangID": "" }, { "RankStr": "4-4", "Title": "ThinkPHP5专区 - ThinkPHP框架", "Url": "http://www.thinkphp.cn/topic/think.html", "XiongzhangID": "" }, { "RankStr": "4-5", "Title": "ThinkPHP3.2.3完整版 - ThinkPHP框架", "Url": "http://www.thinkphp.cn/down/610.html", "XiongzhangID": "" }, { "RankStr": "4-6", "Title": "下载:ThinkPHP3.2.3完整版 - ThinkPHP框架", "Url": "http://www.thinkphp.cn/donate/download/id/610.html", "XiongzhangID": "" }, { "RankStr": "4-7", "Title": "下载:ThinkPHP5.0.10完整版 - ThinkPHP框架", "Url": "http://www.thinkphp.cn/donate/download/id/1015.html", "XiongzhangID": "" }, { "RankStr": "4-8", "Title": "下载:ThinkPHP5.0.24完整版 - ThinkPHP框架", "Url": "http://www.thinkphp.cn/donate/download/id/1278.html", "XiongzhangID": "" }, { "RankStr": "5-10", "Title": "ThinkPHP5.*版本发布安全更新 · ThinkPHP官方博客 · 看云", "Url": "https://blog.thinkphp.cn/869075", "XiongzhangID": "" } ] } } ~~~ ## 接口2:关键词百度移动排名 根据域名和关键词返回百度移动 关键词收录量、抓取时间、 关键词排名(页数-第几条)、 页面标题、 页面链接地址 ### 请求地址 ``` GET https://api.topthink.com/baidu/mobile_rank ``` ### 请求参数 | 名称 | 必填 | 类型 | 说明 | | --- | --- | --- | --- | | appCode| 是|string| 用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | domainName | 是 | string | 获取的域名 | | keyword | 是 | string | 获取的关键词 | ### 返回`data`参数 | 名称 | 类型 | 说明 | | --- | --- | --- | | CollectCount | long | 收录量(只有PC端才有收录量) | | RankStr | string | 排名(页数-条数) | | Title | string | 标题 | | Url | string | 标题连接 | | XiongzhangID | string | 熊掌ID | | CrawlTime | string | 抓取时间 | ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->baiduMobileRank() ->withUrl('https://market.topthink.com/develop') ->request(); ``` 返回示例: ~~~ { "code":0, "message": "成功", "data": { "IsRecord": false, "RecordTitle": "", "RecordDepict": "", "SnapTime": "", "CrawlTime": "2019-01-24 16:19:22" } } ~~~