05 Jun 2011

By - 65 Comments

Pile of +1 Buttons Now that the Google +1 button is out the Social SEO battle will inevitably be stepped up a gear. We know the search engines are using social shares and likes to impact the rankings, and Google’s +1 button is their way of ensuring at least some of this data is directly in their hands.

So obviously, tracking this data is very important for SEOs, and both Facebook and Twitter have APIs for pulling in Likes and Tweets, but currently we are left without a public API for doing this with Google’s +1 button. With a little digging behind the scenes I managed to find the API they use for the button. So now us SEOs can use it to pull out the Google +1 counts for lists of URLs (if you are interested in the technical details then see the optional section below).

I’ve put together a public Google Spreadsheet which can do all of this automatically for you – you just need to enter a list of URLs and the spreadsheet will pull in the counts for you. To get started, open the spreadsheet (download it right here) and select “Make a copy” from the File menu (you’ll need to be logged into a Google account to do this). Enter the URLs in the the A column (ensuring you pay attention to trailing slashed and they include http:// at the start), and the counts will appear in column B. You should see something like this:

Google Spreadsheet showing Google +1 Counts

Technical Bits

If you want to write your own solution, you can rip the code from the spreadsheet. The URL for the service is:


It is a JSON-RPC setup, meaning you send a JSON formatted request and get a JSON formatted response. The request should be via POST in the following format:

  1. [{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"http://www.test.com","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]

The request will be returned like so:

  1. [{"result": { "kind": "pos#plusones", "id": "http://www.google.com/", "isSetByViewer": false, "metadata": {"type": "URL", "globalCounts": {"count": 3097.0} } } "id": "p"}]

Example PHP Code

If you want to implement this server side, here is some example PHP code to get you going:

  2. <?php
  4.  $url = "http://www.tomanthony.co.uk/";
  6.  $ch = curl_init();  
  7.  curl_setopt($ch, CURLOPT_URL, "https://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ");
  8.  curl_setopt($ch, CURLOPT_POST, 1);
  9.  curl_setopt($ch, CURLOPT_POSTFIELDS, '[{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"' . $url . '","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]');
  10.  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  11.  curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
  14.  $curl_results = curl_exec ($ch);
  15.  curl_close ($ch);
  17.  $parsed_results = json_decode($curl_results, true);
  19.  echo $parsed_results[0]['result']['metadata']['globalCounts']['count'];
  21. ?>

There is an interactive demo here: Google +1 Button API demo.

Wrap Up

If you want to track social shares and likes and aren’t already setup with a Google Doc for the Twitter/Facebook parts you can head over to this post on Distilled which will help you get going. Combined with the above and you can build a complete system for tracking social search signals. Have fun!

65 comments on “Google +1 Button SEO – Getting Bulk Counts with the hidden API
  1. Brazilian Virgin Hair

    Brazilian Virgin Hair https://www.youtube.com/watch?v=GM1xVsMh-dE superbe, train parfaitement emballé, vendeur très professionel. Grazie millier!

  2. nkgssbllfs

    Google 1 Button SEO – Getting Bulk Counts with the hidden API – Tom Anthony
    nkgssbllfs http://www.gtqd4o10g2vr6q136we54d0mw290ix06s.org/

  3. Art in Home Interior Design

    If there are certain views that should be maintained,
    window type and positioning are also critical features which need to be planned
    out. Vented, gas fireplaces have real fires and look like wood-burning
    fireplaces and, though there is some expense involved in having one installed, you’ll save
    money on your monthly heating bills, all thanks to
    gas logs Dallas residents appreciate. Architects recommend Omniroc for both its’ quality and because it helps qualify
    for LEED credits in several categories. Blake Bilyeu found it “moderately” more difficult than other recent
    projects, but all in all, it went “very smoothly.

  4. Outdoor security Camera Reviews

    Full CCTV kits consist of every little thing yyou have to establish
    ‘DIY’ safety and security monitoring around your house,
    offering you assurance wheher you’re aiming to maintain your residence or industrial apartment seecure feom burglars.

  5. Jenna

    Pretty! This was an extremely wonderful article. Thank you for supplying this information.

  6. line ranger Hack tool 2015

    I delight in, result in I found just what I was having a
    look for. You’ve ended my four day long hunt! God
    Bless you man. Have a great day. Bye

  7. basketball clothing for the sonics

    I love your blog.. very nice colors & theme.
    Diid you create this website yourself orr did you hire someone to do it for you?
    Plz reply as I’m looking too create my own blog and would
    like to find out where u got this from. thank you

  8. basketball gear code roblox

    Thankulness to my father who told me concerning this blog, this
    blig is actually awesome.

  9. buy cheap computers online usa

    Wow, incredible blog layout!How long hasve you been blogging for?
    you made blogging look easy. The overall look of your web site is magnificent, let lone thee content!

  10. apartments paris france rent

    A description noting two nearby Metro (subway) stations with access to six subway lines
    should have been taken as a clue to the rumbling
    of underground trains that rattle the apartment building.

    Not because there hasn’t been a property market correction, not because there
    isn’t a global credit crisis and not because many investors
    looking for new hotspots are looking away from the crowded, overdeveloped, been-there-done-that costas, but for another reason. There is
    absolutely no need to worry about the location and accessibility.

  11. Joe

    Terrific work! That is the kind of info that should be shared across the web.
    Disgrace on the search engines for no longer positioning this post higher!
    Come on over and talk over with my website . Thanks =)

  12. probioslim

    This piece of writing will assist the internet people for setting up new blog
    or even a blog from start to end.

  13. gunship battle helicopter 3d cheats android ios

    I’m really enjoying the design and layout of your site. It’s a very easy on the eyes which makes it much more pleasant
    for me to come here and visit more often. Did you hire out
    a designer to create your theme? Outstanding work!

  14. slot machine games for pc

    When you want to experience the thrill of gambling without having to leave your home, an Online Casino
    UK is your best bet. The rules and payouts of this roulette game are the same as that
    of major European casinos. There are different online
    casino games which are exactly the same as a.

  15. Terrie

    Very nice post. I just stumbled upon your blog and wanted
    to say that I’ve truly enjoyed browsing your blog posts.
    After all I’ll be subscribing to your rss feed and I hope you write
    again soon!

  16. Cornell

    I visited various websites except the audio quality for audio songs current at this website iis
    genuinely fabulous.

  17. paris france apartment rentals

    You can explore art galleries, theaters, museums, cinemas, restaurants, and
    clubs, lying within a short distance. Prague is one of the most popular tourist
    destinations in Europe. During the 1970s, the boat found mooring facing the beautiful Ile Saint Louis at the Port
    de la Tournelle, just under the famed restaurant, ‘La Tour d’Argent’ and steps from Notre Dame Cathedral in Paris.

  18. house for sale paris france

    By foot or by pedal, Paris promises you an extraordinary and breathtaking experience.
    You can also get some discount on rates if you book online.
    During the 1970s, the boat found mooring facing the beautiful Ile Saint Louis at the Port de la Tournelle, just under the famed restaurant,
    ‘La Tour d’Argent’ and steps from Notre Dame Cathedral in Paris.

  19. penthouse in paris

    Author Bio: Ron Katz is famous author who writes about travelling experiences by visitors and stay in rental apartments in world’s best locations like paris,
     paris near by locations and Apartment in Paris.

    At your rental apartment there will be no maid knocking at the door to clean up,
    no sound of a vacuum cleaner in the next room waking you up.

    High returns and legendary profits are the norm here.

  20. celine moto jacket

    celine trapeze bag inside

  21. Louie

    I have been surfing on-line more than three hours nowadays,
    yet I by no means found any attention-grabbing article like yours.
    It’s beautiful price sufficient for me. In my view, if all webmasters and bloggers made just right content as you did, the web shall be a lot more helpful than ever before.

Leave A Comment

Your email address will not be published. Required fields are marked *