Rudimentary GooglePlus API

 It’s Sunday, I’m at a loose end. Idle hands do the devil’s work, and today that work is to pick at the Google+ Profile page, and make a read-only API out of it.

There’s some nice JSON in there. And when I say nice, I mean undocumented and weird. But there’s good data in there. So, I’ve written some rudimentary code to pull it out and return it to you. What’s the format? That’s for me not to know, and for you to find out.

So, you need a profile id, and you’re good to go. The api is here: But how do you use it?

If I want to use it, I start with my profile, which is here: That gives me profile id, which is 100281903174934656260. I slap that into the api using this url: . Give it a click, have a look. Machine readable data. Good!

The parameters you can specify:

  • id=(profileid) — required
  • type=[profile|posts] — optional. profile gives you just profile info. posts gives you just the post list. Anything else, or leaving it out, you get everything.
  • debug=true — an easier to read format, not for machine readability

so for example

is a bit easier to read through.

This on the other hand is unformatted JSON, of my posts

Anyway, techy types do try it out and let me know what you think. Good luck!


I’ve added some features.

Use “prettyposts” instead of “posts” to get a cleaned up version of post information. Informative attribute names! Only relevant stuff! You’ll like it.

Also, every post has its own page, with an url like this .

If you use id=100281903174934656260/posts/ExJbXW9remW in the api, you’ll get just the data for that post, from the post page, rather than for all recent posts from the profile page. An advantage of this is that the post page has more comments loaded (all comments?) rather than the very shortened list which is on the profile page.

So for instance try this:

More to come.

About these ads

27 Responses to “Rudimentary GooglePlus API”

  1. Hi,
    My understanding is that Google doesn’t want us to scrape/crawl Google+ posts unless they give us specific permission?

    Cool API though.


  2. Adam Henson Says:

    Very cool! Any chance you’ll be releasing the API source? I’d like to host this and do authenticated calls via a “service” Google Plus account

  3. This post had almost 1000 views a couple of days ago, many originating more or less here I think

    Hacker news! Nice.

  4. [...] Rudimentary Google Plus API: A Read Only JSON API that accepts a Google Plus profile id and gives you profile information and posts. The author, Emlyn O’Regan has also written a tool, Syncc for tying together various social networks and currently supports extracting out data from Google Plus to other Social networks. [...]

  5. [...] You can read Emlyn’s original blog post here. [...]

  6. Personally I home that in public API will be function to search in public posts – I could add G+ to my analytic project

  7. [...] Google+ API en JSON [...]

  8. kylekimpton Says:

    Would you be able to enable JSONP in your api? So I could call something like:

    and it would return something like: parsePosts([{'postId':'3453',...}]);

    That would be awesome! Thanks

    • Jsonp is a good idea. I might do that. Meanwhile, I’ve linked the code elsewhere in these comments so feel free to just make your own version, do what you’d like with it.

  9. [...] was worried that the Rudimentary Google+ API that I put up a little while back was causing the load, but looking at this, it’s not a big [...]

  10. Good stuff! FYI, I had a problem with posts having quotes in them. Probably want to escape those to produce valid JSON. (Not a Python guy, or I’d take a crack at it from our source.)

  11. Double. Example from my recent posts:

    JSON Lint complains about the existing quotes in the output from your service.

  12. CI Thinker Says:

    Awesome Emlyn.The gapi tools are great.I am primarily a java developer so was wondering if there was a way to port this code in java.
    Please Advice

  13. I’m not a java guy, so I can’t really help with a port.

    There’s actually an official api now, you should use that.

  14. CI Thinker Says:

    Hi emylyn,
    Do you know of a Java/Python API to get Linkedin updates and facebook social graph and if possible their implementation.

  15. At this moment I am going away to do my breakfast, afterward having my breakfast coming yet again to read more news.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: