Using Google Search REST API in Ruby

前端 未结 2 757
遥遥无期
遥遥无期 2021-02-15 12:46

I\'m trying to do a google search using Ruby, and print the 1st 3 results.

Could anyone point me to a sample code? I\'m unable to find it.

相关标签:
2条回答
  • 2021-02-15 13:27

    Now Google wants you to use this http://code.google.com/p/google-api-ruby-client/ with a limit of 100 courtesy queries, and a pricing structure for anything above that.

    0 讨论(0)
  • 2021-02-15 13:46

    The gem googleajax is there for that:

    require 'googleajax'
    GoogleAjax.referer = "your_domain_name_here.com"
    GoogleAjax::Search.web("Hello world")[:results][0...3]
    
    0 讨论(0)
提交回复
热议问题