How can I get number of AdWords Advertiser in top and right side position in Google search result.

I’m trying to build a simple application in rails that getting all search result in google and count the number of AdWords advertiser in top and right side position. I already get all the query result using Nokogiri but I don’t know how can I get the number of AdWords advertiser.

Is there any gems, tools or api how can I get number of AdWords?

Hi Elizabeth,

Thank you for this, it really helps to me. But one thing I am confused how canI check if the adWork is from top position and right position.

Thanks you so much liz.