User Methods

/show

This method allows you to retrieve user objects (see Response Formats) in XML or JSON.

GET URL:

http://api.klout.com/1/users/show.[xml_or_json]?key=[your_api_key]&users=[usernames]

Where "[usernames]" is a comma-delimited string of URL escaped usernames.

POST URL:

http://api.klout.com/1/users/show.[xml_or_json]?key=[your_api_key]

When posting JSON, the API looks for a JSON string in a variable named "users".

An example JSON post:


<html>
<body>
<form method="POST" action="http://api.klout.com/1/users/show.json?key=abcdef">
    <input type="hidden" name="users" value='["binhtran","joefernandez"]' id="users"> 
    <p><input type="submit" value="Continue"></p>
</form>
</body>
</html>

/topics

This method allows you to retrieve the top 3 topic objects (see Response Formats) for a given user in XML or JSON.

GET URL:

http://api.klout.com/1/users/topics.[xml_or_json]?key=[your_api_key]&amp;users=[usernames]

Where "[usernames]" is a comma-delimited string of URL escaped usernames.

POST URL:

http://api.klout.com/1/users/topics.[xml_or_json]?key=[your_api_key]

When posting JSON, the API looks for a JSON string in a variable named "users".

An example JSON post:


<html>
<body>
<form method="POST" action="http://api.klout.com/1/users/show.json?key=abcdef">
    <input type="hidden" name="users" value='["binhtran","joefernandez"]' id="users"> 
    <p><input type="submit" value="Continue"></p>
</form>
</body>
</html>

For Rails users, Jason Torres has built a rubygem (untested): http://github.com/jasontorres/klout

17 Comments

  1. sanspace12 months ago

    Does the /topics work? I got a blank response when I tried for JSON!!

  2. Health_Tips on Twitter11 months ago

    Typo on /scores GET URL code sample: "&amp;" should be "&"

  3. Yousaf Sekander11 months ago

    Sample get method for Facebook user?

  4. KloutAPITeam9 months ago

    We currently don't allow lookup based off of Facebook ID.

  5. The Inventor9 months ago

    Can we lookup by email address? I heard that mentioned in an interview that it was possible.. On This Week in Social Media.

    I'm looking forward to playing with this and integrating to our Point of Sale.

  6. Meltwater8 months ago

    Apparently information for 5 users can be requested in one call.

  7. mmarqueti7 months ago

    the gem from jasontorres seems to be discontinued.

    i'm trying to use the gem https://github.com/empika/rocky-klout

  8. KloutAPITeam7 months ago

    There have been several forks of jasontorres gem that continues on and updates for Ruby 1.9.2. Really, the API hasn't changed much since his was released, so the gems aren't going to have a lot of differentiation in how they accomplish things.

    Rocky-klout is a good one, and I'm all for the move to HTTParty.

  9. VladP7 months ago

    One more time about kclasses. What is it? Does class 16 (Celebrity) has more influence then class 1(Observer)? If it does - then something is wrong with class 8 (Feeder). User 'nyse' belongs to class 8 and has: kscore=network_score=amplification_score=1; true_reach=26. User 'zhirinovsky' belongs to class 8 as well and has: kscore=network_score=amplification_score=1; true_reach=11. Yet class 8 stays higher in class hierarchy than class 7 (Broadcaster) who's users have much higher values - 'king' has kscore=63.52; network_score=67.41; amplification_score=48.42; true_reach=332. Could you please explain.

  10. KloutAPITeam7 months ago

    KClass is not directly related to score. There's no "has more influence" between the classes; it's just a spectrum to measure the trends of how the person communicates and demonstrates their influence. For example, a Celebrity is less likely to retweet others, but is often retweeted. A Feeder is posting lots of data, but not interacting. So on and so forth.

    It's more of a 'for fun' endpoint than a data-crunching endpoint to be analyzed against scores, and may be subject to change, adjustment, and user interpretation. It's magic!

  11. kennethdavid6 months ago

    Maybe I am missing something, but how do you check via the api whether someone has actually claimed their Klout profile? (that they actually have signed up for Klout)

  12. KloutAPITeam6 months ago

    Hello, That's not currently available through the API.

  13. kennethdavid6 months ago

    Are there any plans for this to be added into the API? It seems to me that if someone hasn't claimed their profile, their score is likely to be based on lacking information, for instance not having added all their networks to Klout. This would seem to be an important indicator of high valuable someone's Klout score actually is.

  14. kennethdavid6 months ago

    • should have read "indicator of *how valuable".
  15. KloutAPITeam6 months ago

    Theoretically, someone could just have the default Twitter account and have just as high a score as having the other (currently scored) networks turned on, but yes, I agree. I hope some approximation of it will be available in the future: more interesting than whether they've registered with Klout (which doesn't necessarily mean they've added a network), is to have an array of flags indicating which networks they've connected.

    That said, just because we're connecting networks doesn't mean we're necessarily scoring those networks.

  16. kennethdavid6 months ago

    I'm assuming scraping the front end web pages with mechanize or something else to try to grab this flag off the website is not really recommended and likely violates the terms of service. I'll patiently wait for some form of this to be added. Thanks for the fast responses.

  17. KloutAPITeam6 months ago

    Definitely a violation, if not specifically, spiritually. Feel free to e-mail me at partners@klout.com or @harmophone on Twitter and I can keep you up to date on it.

Please sign in to post a comment.