接口

1 功能說明

獲取詞庫網內部數據的接口
本接口除網站詞庫外全部返回的是關鍵詞,關鍵詞熱度及關鍵詞收錄,網站詞庫返回的是關鍵詞,熱度,排名,預估流量,收錄量,標題及網址,全部以JSON格式返回。

注意:

1. 每次請求都是返回100條數據,不足100條的則返回最大量,返回的數據當中包含總條數。

2. 接口狀態爲“測試”狀態時,不會產生任何扣費操作,該狀態下返回的數據都是測試數據。

3. 免費次數調用完繼續調用開關默認設置否,如果設置成是則VIP狀態下免費次數用完後繼續調用會按次扣費。

4. 網站詞庫得開通整站導出功能纔可通過接口調用,該調用並不計算調用次數,即開通某域名的整站導出後可無限制調用該域名的網站詞庫數據。

5. 請保管好apptoken防止泄露,如果被盜用而產生接口扣費操作,詞庫網將不返還這些扣費。

6. 可通過VIP定製進行接口調用次數的定製,也可直接調用,直接調用是按每次0.1元進行收費的。

2 接口調用說明

2.1 獲取長尾詞

(1)獲取地址

http://api.ciku5.com

(2)HTTP請求方式

GET

(3)數據返回格式

json

(4)傳遞參數

參數名稱 是否必須 類型 描述
action
int

指定請求的類型,獲取長尾詞該值爲1

appid
long

申請接口時獲取的appid

apptoken
string

申請接口時獲取的apptoken 得用32位MD5加密  MD5在線生成

wd
string

要獲取的關鍵詞 得用urlEncode的UTF-8進行編碼

例如關鍵詞“詞庫網”,編碼後爲“%e8%af%8d%e5%ba%93%e7%bd%91” 在線URL編碼

pageindex
int

頁碼數默認爲1,接口每次返回100條數據,如果返回的結果當中條數總量大於100,則可根據分頁再次進行獲取

例如該參數值爲1,則是獲取第1到100條的數據,值爲2則是獲取第100到200條的數據

ver
int

[新增參數] 版本號默認爲0,新版本參數爲1,新版本對比舊版本新增PC指數,移動指數跟360指數

(5)請求舉例

該請求獲取有關“詞庫網”的相關長尾詞

http://api.ciku5.com?action=1&appid=你的appid&apptoken=加密過的apptoken&wd=%e8%af%8d%e5%ba%93%e7%bd%91&pageindex=1&ver=版本號

(6)成功返回結果

關鍵詞都是Unicode編碼過的  在線Unicode解碼

V0版本結果

{
    "state": 1,
    "error": "",
    "total": 1,
    "data": [{
        "keyword": "\u8bcd\u5e93\u7f51",
        "index": 83,
        "pagenum": 53100000
    }, ...]
}

V1版本結果

{
    "state": 1,
    "error": "",
    "total": 1,
    "data": [{
        "keyword": "\u8bcd\u5e93\u7f51",
        "index": 83,
        "pcindex": 83,
        "mobileindex": 83,
        "so360index": 83,
        "pagenum": 53100000
    }, ...]
}

(7)失敗返回結果

state狀態不是1就是返回失敗 查看具體的錯誤代碼

{
    "state": 104,
    "error": "\u0069\u0070\u672a\u6388\u6743"
}

2.2 獲取指定關鍵詞

(1)獲取地址

http://api.ciku5.com

(2)HTTP請求方式

GET

(3)數據返回格式

json

(4)傳遞參數

參數名稱 是否必須 類型 描述
action
int

指定請求的類型,獲取指定關鍵詞該值爲9

appid
long

申請接口時獲取的appid

apptoken
string

申請接口時獲取的apptoken 得用32位MD5加密  MD5在線生成

wd
string

要獲取的關鍵詞,關鍵詞一次最多傳20個,多個關鍵詞用英文逗號隔開 得用urlEncode的UTF-8進行編碼

例如關鍵詞“詞庫,詞庫網,工具”,編碼後爲“%e8%af%8d%e5%ba%93%2c%e8%af%8d%e5%ba%93%e7%bd%91%2c%e5%b7%a5%e5%85%b7” 在線URL編碼

ver
int

[新增參數] 版本號默認爲0,新版本參數爲1,新版本對比舊版本新增PC指數,移動指數跟360指數

(5)請求舉例

該請求獲取“詞庫,詞庫網,工具”的熱度及收錄數據

http://api.ciku5.com?action=9&appid=你的appid&apptoken=加密過的apptoken&wd=%e8%af%8d%e5%ba%93%2c%e8%af%8d%e5%ba%93%e7%bd%91%2c%e5%b7%a5%e5%85%b7&ver=版本號

(6)成功返回結果

關鍵詞都是Unicode編碼過的  在線Unicode解碼

V0版本結果

{
    "state": 1,
    "error": "",
    "total": 3,
    "data": [{
        "keyword": "\u8bcd\u5e93",
        "index": 192,
        "pagenum": 15300000
    }, {
        "keyword": "\u8bcd\u5e93\u7f51",
        "index": 83,
        "pagenum": 2900000
    }]
}

V1版本結果

{
    "state": 1,
    "error": "",
    "total": 3,
    "data": [{
        "keyword": "\u8bcd\u5e93",
        "index": 192,
        "pcindex": 192,
        "mobileindex": 192,
        "so360index": 192,
        "pagenum": 15300000
    }, {
        "keyword": "\u8bcd\u5e93\u7f51",
        "index": 192,
        "pcindex": 192,
        "mobileindex": 192,
        "so360index": 192,
        "pagenum": 2900000
    }]
}

(7)失敗返回結果

state狀態不是1就是返回失敗 查看具體的錯誤代碼

{
    "state": 104,
    "error": "\u0069\u0070\u672a\u6388\u6743"
}

2.3 獲取新詞

(1)獲取地址

http://api.ciku5.com

(2)HTTP請求方式

GET

(3)數據返回格式

json

(4)傳遞參數

參數名稱 是否必須 類型 描述
action
int

指定請求的類型,獲取新詞該值爲3

appid
long

申請接口時獲取的appid

apptoken
string

申請接口時獲取的apptoken 得用32位MD5加密  MD5在線生成

pageindex
int

頁碼數默認爲1,接口每次返回100條數據,如果返回的結果當中條數總量大於100,則可根據分頁再次進行獲取

例如該參數值爲1,則是獲取第1到100條的數據,值爲2則是獲取第100到200條的數據

ver
int

[新增參數] 版本號默認爲0,新版本參數爲1,新版本對比舊版本新增PC指數,移動指數跟360指數

(5)請求舉例

該請求獲取新詞前100條

http://api.ciku5.com?action=3&appid=你的appid&apptoken=加密過的apptoken&pageindex=1&ver=版本號

(6)成功返回結果

關鍵詞都是Unicode編碼過的  在線Unicode解碼

V0版本結果

{
    "state": 1,
    "error": "",
    "total": 100,
    "data": [{
        "keyword": "\u4eba\u6c11\u5e01\u5973\u90ce",
        "index": 119454,
        "pagenum": 53100000
    }, {
        "keyword": "\u5973\u5b50\u6000\u5b555\u6708\u88ab\u903c\u63a5\u5ba2",
        "index": 117151,
        "pagenum": 53100000
    }, ...]
}

V1版本結果

{
    "state": 1,
    "error": "",
    "total": 100,
    "data": [{
        "keyword": "\u4eba\u6c11\u5e01\u5973\u90ce",
        "index": 119454,
        "pcindex": 119454,
        "mobileindex": 119454,
        "so360index": 119454,
        "pagenum": 53100000
    }, {
        "keyword": "\u5973\u5b50\u6000\u5b555\u6708\u88ab\u903c\u63a5\u5ba2",
        "index": 117151,
        "pcindex": 119454,
        "mobileindex": 119454,
        "so360index": 119454,
        "pagenum": 53100000
    }, ...]
}

(7)失敗返回結果

state狀態不是1就是返回失敗 查看具體的錯誤代碼

{
    "state": 104,
    "error": "\u0069\u0070\u672a\u6388\u6743"
}

2.4 獲取熱詞

(1)獲取地址

http://api.ciku5.com

(2)HTTP請求方式

GET

(3)數據返回格式

json

(4)傳遞參數

參數名稱 是否必須 類型 描述
action
int

指定請求的類型,獲取熱詞該值爲4

appid
long

申請接口時獲取的appid

apptoken
string

申請接口時獲取的apptoken 得用32位MD5加密  MD5在線生成

pageindex
int

頁碼數默認爲1,接口每次返回100條數據,如果返回的結果當中條數總量大於100,則可根據分頁再次進行獲取

例如該參數值爲1,則是獲取第1到100條的數據,值爲2則是獲取第100到200條的數據

ver
int

[新增參數] 版本號默認爲0,新版本參數爲1,新版本對比舊版本新增PC指數,移動指數跟360指數

(5)請求舉例

該請求獲取熱詞前100條

http://api.ciku5.com?action=4&appid=你的appid&apptoken=加密過的apptoken&pageindex=1&ver=版本號

(6)成功返回結果

關鍵詞都是Unicode編碼過的  在線Unicode解碼

V0版本結果

{
    "state": 1,
    "error": "",
    "total": 100,
    "data": [{
        "keyword": "\u4eba\u6c11\u5e01\u5973\u90ce",
        "index": 119454,
        "pagenum": 53100000
    }, {
        "keyword": "\u5973\u5b50\u6000\u5b555\u6708\u88ab\u903c\u63a5\u5ba2",
        "index": 117151,
        "pagenum": 53100000
    }, ...]
}

V1版本結果

{
    "state": 1,
    "error": "",
    "total": 100,
    "data": [{
        "keyword": "\u4eba\u6c11\u5e01\u5973\u90ce",
        "index": 119454,
        "pcindex": 119454,
        "mobileindex": 119454,
        "so360index": 119454,
        "pagenum": 53100000
    }, {
        "keyword": "\u5973\u5b50\u6000\u5b555\u6708\u88ab\u903c\u63a5\u5ba2",
        "index": 117151,
        "pcindex": 119454,
        "mobileindex": 119454,
        "so360index": 119454,
        "pagenum": 53100000
    }, ...]
}

(7)失敗返回結果

state狀態不是1就是返回失敗 查看具體的錯誤代碼

{
    "state": 104,
    "error": "\u0069\u0070\u672a\u6388\u6743"
}

2.5 獲取熱詞預測

(1)獲取地址

http://api.ciku5.com

(2)HTTP請求方式

GET

(3)數據返回格式

json

(4)傳遞參數

參數名稱 是否必須 類型 描述
action
int

指定請求的類型,獲取熱詞預測該值爲5

appid
long

申請接口時獲取的appid

apptoken
string

申請接口時獲取的apptoken 得用32位MD5加密  MD5在線生成

pageindex
int

頁碼數默認爲1,接口每次返回100條數據,如果返回的結果當中條數總量大於100,則可根據分頁再次進行獲取

例如該參數值爲1,則是獲取第1到100條的數據,值爲2則是獲取第100到200條的數據

ver
int

[新增參數] 版本號默認爲0,新版本參數爲1,新版本對比舊版本新增PC指數,移動指數跟360指數

(5)請求舉例

該請求獲取熱詞預測前100條

http://api.ciku5.com?action=5&appid=你的appid&apptoken=加密過的apptoken&pageindex=1&ver=版本號

(6)成功返回結果

關鍵詞都是Unicode編碼過的  在線Unicode解碼

V0版本結果

{
    "state": 1,
    "error": "",
    "total": 100,
    "data": [{
        "keyword": "\u4eba\u6c11\u5e01\u5973\u90ce",
        "index": 119454,
        "pagenum": 53100000
    }, {
        "keyword": "\u5973\u5b50\u6000\u5b555\u6708\u88ab\u903c\u63a5\u5ba2",
        "index": 117151,
        "pagenum": 53100000
    }, ...]
}

V1版本結果

{
    "state": 1,
    "error": "",
    "total": 100,
    "data": [{
        "keyword": "\u4eba\u6c11\u5e01\u5973\u90ce",
        "index": 119454,
        "pcindex": 119454,
        "mobileindex": 119454,
        "so360index": 119454,
        "pagenum": 53100000
    }, {
        "keyword": "\u5973\u5b50\u6000\u5b555\u6708\u88ab\u903c\u63a5\u5ba2",
        "index": 117151,
        "pcindex": 119454,
        "mobileindex": 119454,
        "so360index": 119454,
        "pagenum": 53100000
    }, ...]
}

(7)失敗返回結果

state狀態不是1就是返回失敗 查看具體的錯誤代碼

{
    "state": 104,
    "error": "\u0069\u0070\u672a\u6388\u6743"
}

2.6 獲取網站詞庫

注意:接口改版後,只有開通整站導出的網站纔有導出權限,網站詞庫導出調用不扣調用次數,即開通某域名的整站導出後可無限制調用該域名的網站詞庫數據。

(1)獲取地址

http://api.ciku5.com

(2)HTTP請求方式

GET

(3)數據返回格式

json

(4)傳遞參數

參數名稱 是否必須 類型 描述
action
int

指定請求的類型,獲取行業詞庫該值爲6

appid
long

申請接口時獲取的appid

apptoken
string

申請接口時獲取的apptoken 得用32位MD5加密  MD5在線生成

wd
string

域名參數

比如獲取“詞庫網”的網站詞庫,則該值爲www.ciku5.com

pageindex
int

頁碼數默認爲1,接口每次返回100條數據,如果返回的結果當中條數總量大於100,則可根據分頁再次進行獲取

例如該參數值爲1,則是獲取第1到100條的數據,值爲2則是獲取第100到200條的數據

indexrange
string

指數範圍,默認爲空,格式爲100-200

pagerange
string

收錄範圍,默認爲空,格式爲1000-20000

ver
int

[新增參數] 版本號默認爲0,新版本參數爲1,新版本對比舊版本新增PC指數,移動指數

(5)請求舉例

該請求獲取“詞庫網”網站詞庫前100條

http://api.ciku5.com?action=2&appid=你的appid&apptoken=加密過的apptoken&pageindex=1&wd=www.ciku5.com&&indexrange=100-200&pagerange=10000-20000ver=版本號

(6)成功返回結果

關鍵詞,標題都是Unicode編碼過的  在線Unicode解碼

V0版本結果

{
    "state": 1,
    "error": "",
    "total": 16,
    "data": [{
        "keyword": "\u7f51\u7ad9\u8bcd\u5e93",
        "index": 4,
        "sort": 1,
        "aboutip": "2 ~ 4",
        "pagenum": 51800000,
        "title": "\u8bcd\u5e93\u7f51 - \u70ed\u95e8\u5173\u952e\u8bcd\u5e93\u3001\u957f\u5c3e\u5173\u952e\u8bcd\u5e93\u3001\u7f51\u7ad9\u5173\u952e\u8bcd\u5e93\u3001\u884c\u4e1a\u5173\u952e\u8bcd\u5e93",
        "url": "www.ciku5.com"
    }, {
        "keyword": "\u8bcd\u5e93",
        "index": 184,
        "sort": 2,
        "aboutip": "55 ~ 92",
        "pagenum": 28000000,
        "title": "\u8bcd\u5e93\u7f51 - \u70ed\u95e8\u5173\u952e\u8bcd\u5e93\u3001\u957f\u5c3e\u5173\u952e\u8bcd\u5e93\u3001\u7f51\u7ad9\u5173\u952e\u8bcd\u5e93\u3001\u884c\u4e1a\u5173\u952e\u8bcd\u5e93",
        "url": "www.ciku5.com"
    }, ...]
}

V1版本結果

{
    "state": 1,
    "error": "",
    "total": 16,
    "data": [{
        "keyword": "\u7f51\u7ad9\u8bcd\u5e93",
        "index": 4,
        "pcindex": 4,
        "mobileindex": 4,
        "sort": 1,
        "aboutip": "2 ~ 4",
        "pagenum": 51800000,
        "title": "\u8bcd\u5e93\u7f51 - \u70ed\u95e8\u5173\u952e\u8bcd\u5e93\u3001\u957f\u5c3e\u5173\u952e\u8bcd\u5e93\u3001\u7f51\u7ad9\u5173\u952e\u8bcd\u5e93\u3001\u884c\u4e1a\u5173\u952e\u8bcd\u5e93",
        "url": "www.ciku5.com"
    }, {
        "keyword": "\u8bcd\u5e93",
        "index": 184,
        "pcindex": 4,
        "mobileindex": 4,
        "sort": 2,
        "aboutip": "55 ~ 92",
        "pagenum": 28000000,
        "title": "\u8bcd\u5e93\u7f51 - \u70ed\u95e8\u5173\u952e\u8bcd\u5e93\u3001\u957f\u5c3e\u5173\u952e\u8bcd\u5e93\u3001\u7f51\u7ad9\u5173\u952e\u8bcd\u5e93\u3001\u884c\u4e1a\u5173\u952e\u8bcd\u5e93",
        "url": "www.ciku5.com"
    }, ...]
}

(7)失敗返回結果

state狀態不是1就是返回失敗 查看具體的錯誤代碼

{
     "state": 104,
     "error": "\u0069\u0070\u672a\u6388\u6743"
}

3 返回字段說明

字段 說明
state

返回的狀態值,該值爲1說明正確返回  查看具體的錯誤代碼

error

如果返回正確該值爲空,否則提示相應的錯誤信息

data

數據集合,JSON數組

keyword

關鍵詞

index

百度整體指數

pcindex

百度pc指數

mobileindex

百度移動熱度

so360index

360指數

sort

關鍵詞排名[網站詞庫]

aboutip

預估流量[網站詞庫]

pagenum

關鍵詞收錄量

title

網站標題[網站詞庫]

url

網站網址[網站詞庫]

4 錯誤代碼說明

編號[state] 說明
100

action參數有誤

101

appid參數有誤

102

非法IP

103

appkey驗證不通過

104

ip未授權

105

接口不存在或者帳戶被禁用

106

餘額不足或者查詢超過最大限制

107

wd參數有誤關鍵詞不能超過40字符

108

wd參數有誤非法域名

109

bt參數有誤該行業分類不存在

110

系統處理異常

111

尚未開通此域名的整站導出

112

wd參數有誤關鍵詞不符合要求

發佈了46 篇原創文章 · 獲贊 5 · 訪問量 1萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章