4

I've a spreadsheet with a lot of contact information. In order to sort the data, I want to rank them according to the +1's given on their website.

Is it possible to get the +1 count of a website using Google Spreadsheet?

8

Yes that's possible !! See the below-mentioned formula to do just that.

Formula

A2 = HYPERLINK("http://www.jacobjantuinstra.nl")

=IMPORTXML(
   "https://plusone.google.com/u/0/_/+1/fastbutton?&count=true&url=" & A2, // URL
   "//div[@id='aggregateCount']" // xpath_query  
 )

copy / paste
=IMPORTXML("https://plusone.google.com/u/0/_/+1/fastbutton?count=true&url="&A2,"//div[@id='aggregateCount']")

Explained

The URL that is being fed as a first argument for the IMPORTXML formula, is constructed to contain the plusone URL that Google uses to perform +1 counts. The second argument is looking for a specific div, having an id equal to aggregateCount. All is possible when a website has a button, enabled for Google+.

Screenshots

hyperlinks
enter image description here

counts
enter image description here

Example

I've created an example file for you: How to get the +1's of a website?
See this post, here on Web Applications, on another usage of retrieving website info.

H/T

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.