如何访问Google搜索“我很幸运";使用API​​的功能? [英] How to access Google Search "I'm Feeling Lucky" functionality using API?

查看:131
本文介绍了如何访问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.

此外,您可以将这种格式用于URL,以便获得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天全站免登陆