搜索页码 - Google 自定义搜索 API
search page number - Google custom search API
我正在使用 Google 自定义搜索 API 来获取一些图像。一切正常,但我所有的查询结果相同。我可以使用搜索起点的某种页码或其他方式为同一关键字获取不同的图像吗? (例如 "plane")。
这是我的代码,
async function imgRequest(options, arrayImg) {
const res = await customsearch.cse.list({
cx: "-----",
q: "plane",
auth: "-----",
searchType: "image"
});
console.log(res.data.items[0].link);
return res.data;
}
提前致谢。如有任何问题,请随时提出。
有一个'start'参数:"The index of the first result to return"
见
https://developers.google.com/custom-search/json-api/v1/reference/cse/list
我正在使用 Google 自定义搜索 API 来获取一些图像。一切正常,但我所有的查询结果相同。我可以使用搜索起点的某种页码或其他方式为同一关键字获取不同的图像吗? (例如 "plane")。
这是我的代码,
async function imgRequest(options, arrayImg) {
const res = await customsearch.cse.list({
cx: "-----",
q: "plane",
auth: "-----",
searchType: "image"
});
console.log(res.data.items[0].link);
return res.data;
}
提前致谢。如有任何问题,请随时提出。
有一个'start'参数:"The index of the first result to return"
见 https://developers.google.com/custom-search/json-api/v1/reference/cse/list