NetSquared enables social benefit organizations to leverage the tools of the social web.

Meetup with social changemakers and web innovators near you. Join a local Net Tuesday in 21 cities around the world, or start your own!

Absolutely Perfect Intentions: The Knowmore.org API Part I

I'm writing this while I sit in the passenger seat of a giant, white cargo van careening up the East Coast on route 15, so if I seem a bit distracted in tone, that's probably why. I could wait the four hours until I'm safely in the confines of my computer chair, but I don't want to lose the ideas while they're there. Well, that and I'm sort of melodramatic...

So, who am I and why am I staking a claim in this corner of the Internet? Well, my name is Eric Cooper, and I'm a developer for the Knowmore.org Firefox Extension, a featured project this year at the NetSquared conference. You might have seen my name tossed around in a few of Joe Solomon's blogs, but for the most part I've been too busy working with the rest of the team to make the extension a reality to really make an appearance 'round these parts.  With 2008's conference creeping ever closer, however, I figured it might be a fine time to get acquainted a little better with everyone.

Personal introductions aside, the core of my work with the Knowmore.org Firefox extension hasn't really been the, uh, extension. It's weird, but mostly true. The majority of my time has been with spent on building a stable foundation for harvesting data from Knowmore.org's company profiles and designing a system to drop this information into the laps of any one wants it. That is, producing a public and reliable API has been my chief duty from around the third day of development.

Not much has been said around here about the Knowmore.org API and that's a shame. It has an almost unlimited potential to make the world a little better, a little brighter by making Knowmore's most important information available to any inspired developer. So, with that in mind, I'm going to take my first blog as a chance to give a brief introduction of and drop some knowledge about the Knowmore.org API, which is up and running in a BETA build and fully capable (run-on sentences for the win!).

Okay, but before I get all giddy with technical details, what is an API? Think of an API in this case as the poor kid manning the drive-through window at your local fast food place of choice (Yuck). You ask him for something, he gets it for you. The Knowmore.org API takes your request for information, finds it, and spits it back out to you in the format you request. It's really as simple as that.

If you've never seen a Knowmore.org company profile in the wild, they contain two main elements: the actual profile of the company and something we internally call the 'corporate statistics box.' The 'corporate statistics box' contains those catchy little icons we hope to have you seeing everywhere you go. The profile is, well, a profile for the company.

A homebrew Mediawiki--the same software that runs the super-famous Wikipedia.com--extension had to be written to harvest and store this data in sustainable manner. It is my hope to clean it up in time for the conference to make it available for an early download for any one interested, but that's a different post for a different time. Right now, we're in API Land, and it's where we are going to stay...until I get distracted again.

So, anyway, lets jump right in and start playing with raw responses:

All right, lets say you're some under-appreciated project lead/dev working on a 'mashup' that keeps track and alerts end-users with known workers' rights violations and you want to aggregate Knowmore's bountiful data stores (sometimes it feels like we're Aesop's ants) with your own.  You can request all company profiles with poor workers' rights ratings Knowmore.org has to offer with one easy to construct request:

http://www.knowmore.org/wiki/api/api.php?request=profile&worker=1&format...

Now you have a simple XML response at your finger tips to parse and do as you please with.

Okay, same story, but now lets pretend you're working on a project promoting the use of Internet-based boycotts to pressure companies into going greener. You can add to your own list of companies and URLs with Knowmore.org's through another simple request to the Knowmore.org API:

http://www.knowmore.org/wiki/api/api.php?request=companyUrl&enviro=1&for...

Woot another list.

It's pretty simple right? But what if you don't want the entire list every time? Maybe you just want to record changes in company ratings? Why? I don't know. Maybe you administer a feed that sends its users updates whenever a company's ratings change or are established, like a corporate monitor feed? Regardless, data from the Knowmore.org API can be filtered by date very easily. Lets request ratings for companies that have been modified since May 15th:

http://www.knowmore.org/wiki/api/api.php?request=ratings&from=20080515&f...
 
Well, I'm sure you get the point by now. If you want to see all the modules and their documentation available for the Knowmore.org API, send an empty request to http://www.knowmore.org/wiki/api/api.php That will give you the most up to date documentation available.

This is about it for the brief introduction of the Knowmore.org API (yeah, that was brief...). Keep you eyes trained on this blog, though. Part II is coming and I will show you how to take this:
Knowmore.org API XML Output

And turn it into something like this:
Sample API-Driven Corp Stats box

Which could end up finding itself in places like this:
Knowmore.org and Reuters

Comments

I want to Know More about Knowmore.org

Hi Eric, Great blog post. Thank you for sharing your progress on developing the API for Knowmore.org. The concept rocks. Your icons are great. And the implementation seems to be coming along splendidly. Well done. What I see here is corporate oversight / auditing / reporting from the bottom-up. Looking forward to connecting in San Jose.  

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Subscribe to Net2News

Sign up for NetSquared's e-newsletter

Latest Comments

User login



Sitemap

About

Share

Projects

Conferences

Partner