How to access Google Search “I'm Feeling Lucky” functionality using 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?


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.

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



<em>Deprecated</em> <strike>You could use the Google API which is probably the best way to do it but will require more work api docs here <a href="https://developers.google.com/web-search/docs/" rel="nofollow">https://developers.google.com/web-search/docs/</a></strike>

<em>No longer working</em> <strike>or you can go to this url with your seach query: <a href="http://www.google.com/webhp#q=your+search+query+here&btnI" rel="nofollow">http://www.google.com/webhp#q=your+search+query+here&btnI</a></strike>

be sure you add &btnI to the end otherwise it wont redirect

<hr />

<strong>Update 2014</strong>

The above URL stopped working and yes the search API is depreciated, however there are always workaround. If you really have to you can still use a simple get request on the following URL:

<a href="https://www.google.com/search?q=your+search+query+here&btnI=" rel="nofollow">https://www.google.com/search?q=your+search+query+here&btnI=</a>

with of course your+search+query+here replaced with a URL encoded string.


  • No plot displayed with plotly in shiny
  • recommendation for a good JSF profiler
  • iOS App Today Extension not uploaded to physical device
  • How can i import urlparse in python-3? [duplicate]
  • Fast and efficient way to expand a dataset in R
  • Maven compilation complication due to complex folder structure
  • how do you uninstall an xampp installation that refuses to uninstall?
  • How to parse this JSON in PHP?
  • How do I get feedback about DSC execution on an Azure VM?
  • Response.ContentType = “application/vnd.ms-excel” works in IE and firefox but not in Safari
  • Using Facebook Graph API with ASP.NET
  • Facebook like button redirect? [closed]
  • Dynamic reference casting depending on actual object type
  • Key Vault Settings in Azure App Settings with no code
  • spring security manual login best practice
  • Azure NodeJS Error: ENOENT, open 'D:\\home\\site\\wwwroot\\bin\\views\\'
  • Google Compute instance receiving email
  • jQuery - Prevent activation on first click
  • Running iPhone crash Logs from testers on XCode
  • Remove stopwords and tolower function slow on a Corpus in R
  • iOS App crashed com.apple.root.background-qos
  • Reader monad - how does it conform to Monad interface?
  • MayAVI install on Python 3.6 [duplicate]
  • Showing image on a acro text field position
  • Unable to start a WebView from an AsyncTask
  • Why do you need 2 Javascript files for cross-platform Cordova plugin?
  • Run a form (insert/update/delete) from within a div using jquery
  • Visual Studio 2017 Professional- Unable to find package at source
  • Reload Page with Javascript after Database changes
  • Ember.js + JQuery-UI Tooltip - Tooltip does not reflect the model / controller changes
  • When to use the tag in the head and body section of a html page? [duplicate]
  • How to merge objects within array based on attribute
  • How to split wav file into two or more parts using c#
  • Content-Type alternative in MQTT
  • Neo4j…how to get a visual representation of my data?
  • Support of :after in IE7
  • Unable to create Access token grant type in wso2 API manager store to test API
  • Cloud Code: Creating a Parse.File from URL
  • How to encrypt Connectionstring written in web.config from codebehind?
  • Call Microservice from another Microservice within Docker