我希望能够在Google最新的自定义搜索中以JSON数组的形式获取搜索结果。
如何实现这段代码。
例如:
{
"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>..."
}
]
num
字段将返回搜索结果数量。请增加此值以获取您想要的结果数。 - Ave