有没有办法用 javascript 找到某个关键字的 google 搜索结果?

Is there a way to find google search results for a certain keyword with javascript?

我正在寻找一种方法来查找来自 google 和 javascript 的搜索结果。

是的,您可以使用 Google 的 api 从 Google 获取搜索结果。

但是为此你必须从 Google 得到一个 API 键,然后你可以使用 google 的 api 来获取结果。

请检查此 official link 以了解示例和更多信息。

这是一个 http get 请求示例

https://www.googleapis.com/customsearch/v1?key=INSERT_YOUR_API_KEY&cx=017576662512468239146:omuauf_lfve&q=lectures

您可以使用 ajax 从您的 javascript 简单地请求这些 http get 请求。 在上面的示例中,您可以将单词 lectures 替换为您要搜索的关键字。

您可以找到使用 Javascript 请求 google 的 api here.

的完整参考