3
Googleの最新カスタム検索でjson配列としてGoogle検索結果を取得したいと考えています。json配列でGoogleカスタム検索結果を取得する方法
コードを実装する方法。例については
:
{
"responseData": {` `
"results": [
{
` ` "GsearchResultClass ": "GwebSearch",
"unescapedUrl": "http://en.wikipedia.org/wiki/Paris_Hilton",
"url" : "http :// en.wikipedi a.org/wiki/Paris_Hilton",
"visibleUrl " : "en.wikipedia .org",
"cacheUrl " : "http://www.google.com/search?q=cache:TwrPfhd22hYJ:en.wikipedia.org",
"title": "< b>Paris Hilton</b > - Wikipedia, the free encyclopedia",
"titleNoFormatting": "Paris Hilton - Wikipedia, the free encyclopedia",
"content": "[1] In 2006, she released her debut album..."
},
{
"GsearchResultClass": "GwebSearch",
"unescapedUrl": "http://` `www.imdb.com/name/nm0385296/",
"url": "http://` `www.imdb.com/name/nm0385296/",
"visibleUrl": "www.imdb.com",
"cacheUrl": "http://www.google.com/search?q=cache:1i34KkqnsooJ:www.imdb.com",
"title": "<b> Paris Hilton</b>",
"titleNoFormatting": "Paris Hilton",
"content": " Self: Zoolander. Socialite <b>Paris Hilton</b>..."
}
]
私は結果を得ました。しかし、わずかな結果しか示されていません。検索結果の表示回数を増やす方法 –
https://console.developers.google.com/apis/api/customsearch/overviewの 'num'フィールドに検索結果の数が返されます。この値を増やして、あなたの望む数字の結果を得てください。 – vanloc