3
所以我想用Google的詞彙/詞組完成搜索建議功能。 也就是說在他們的主頁上將搜索功能鍵入文本編輯器以供初學者使用。在輸入文字時得到Google搜索建議
是否可以通過其REST API請求這些Google搜索建議?或者以某種方式?
所以我想用Google的詞彙/詞組完成搜索建議功能。 也就是說在他們的主頁上將搜索功能鍵入文本編輯器以供初學者使用。在輸入文字時得到Google搜索建議
是否可以通過其REST API請求這些Google搜索建議?或者以某種方式?
您可以使用下面的一個URL來從谷歌獲得搜索建議:主頁
http://www.google.com/complete/search?hl=en&js=true&qu=sugge
上使用的建議箱
1.網址查詢部分是qu參數。樣本響應將是:通過谷歌工具欄
http://toolbarqueries.google.com/complete/search?q=sugge&output=toolbar&hl=en
查詢中使用
window.google.ac.h(["sugge",[["suggest","200,000,000 results","0"],["suggestion box","27,500,000 results","1"],["suggestion","84,300,000 results","2"],["suggest friends on facebook","73,100,000 results","3"],["suggested calorie intake","1,940,000 results","4"],["suggestive","12,400,000 results","5"],["suggestion boxes","997,000 results","6"],["suggested weight for height and age","72,600,000 results","7"],["suggest synonym","2,490,000 results","8"],["suggestopedia","79,300 results","9"]]])
2. URL顯然是q參數。這具有返回XML數據的優點,就分析結果而言更容易和更便攜:
<?xml version="1.0"?>
<toplevel>
<CompleteSuggestion><suggestion data="suggest"/><num_queries int="200000000"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="suggestion box"/><num_queries int="27500000"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="suggestion"/><num_queries int="84300000"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="suggest friends on facebook"/><num_queries int="73100000"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="suggested calorie intake"/><num_queries int="1940000"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="suggestive"/><num_queries int="12400000"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="suggestion boxes"/><num_queries int="997000"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="suggested weight for height and age"/><num_queries int="72600000"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="suggest synonym"/><num_queries int="2490000"/></CompleteSuggestion>
<CompleteSuggestion><suggestion data="suggestopedia"/><num_queries int="79300"/></CompleteSuggestion>
</toplevel>
上述的現在是否真實?鏈接是否相同? – vasili111 2015-04-20 14:03:34