如何访问 Google 搜索“手气不错"使用 API 的功能? [英] How to access Google Search "I'm Feeling Lucky" functionality using API?

查看:20
本文介绍了如何访问 Google 搜索“手气不错"使用 API 的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个示例应用,它将接受用户的查询并返回从 Google 的手气不错"搜索返回的 URL 结果.Google 是否通过其 API 公开此功能?如何访问?

I'm creating a sample app that will take a query from user and will return the URL result returned from Google's "I'm Feeling Lucky" search. Does Google expose this functionality through their API? How to access this?

推荐答案

Google 的手气不错"功能没有什么神奇之处.它只是选择搜索的第一个结果.因此,无论您使用什么 api,您也可以只选择第一个结果.

There is nothing magic about Google's "I'm Feeling Lucky" functionality. It simply picks the first result of the search. So, however you're using the api, you can just select the first result as well.

此外,您可以将这种格式用于网址,以便点击 Google 的手气不错"的结果:

Furthermore, you can use this format for a URL in order to hit the "I'm Feeling Lucky" result of Google:

http://www.google.com/search?q=my+keywords+for+search&btnI

这篇关于如何访问 Google 搜索“手气不错"使用 API 的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆