Moodbase API (beta)

Getting started

Quick start 1 - If you use .NET you can pick up the example project using the web service here.
Quick start 2 - All functionality can be used via the forms in this page. Just select the data you want and you will get the files back.

FAQ

Q : What is moodbase?
A : We are the first to offer "mood" classification of comments. We help you analyze comments made on your site to better understand what feelings, emotions and what the general mood of a conversation is.
You can read more about us and our site in the about us page

Q : What sort of data might I expect to get through the API?
A : When analyzing comments, we try to figure out how "funny" something is , or how "scary" people said it is. We give each such mood a score, and when possible also provide a percentile for the conversation within a specific domain, so convesations can be ranked and compared.
We also provide the comments and words that best contribute to the moods which we found relevant.

Q : What do the score numbers in the data mean?
A : Basically the bigger the number the bigger the chance the convesation can be labeled with that mood.
So if one item has a funny score of 0.2 it is probably funnier then an item with funny score of 0.1
An item with -0.3 for scary score is scarier/more likely to be scary then something with scary -0.4 etc...
Use the scores for comparison between items. When possible we provide percentile with the score, so you know where the item stands compared to its domain's history.
For our site we take anything that is above the 99% and put it as a featured item, and anything with 98% can be shown in search results.

Q : What does the API provide?
A : We give access to our data, and access to our semantic classifier.

Q : Why these 6 moods?
A : These moods are the ones we like, and use for our site. We have a few more moods but we dont always use them (no one wants to see a site with "sad" content right?!

Q : Can I create another mood?
A : Sure, we can help you define and then classify your content, contact us we love a challange.

Q : What are the chances you already classified a page?
A : We only classify a handfull of content pages, mostly for the purpose of our site http://moodbase.com The rule of thumb is that the more buzz that link got on social networks the chances are higher that we processed it.

Q : Is there a limitation on the API?
A : There is a usage limit of 1000 dev calls a day. If you need more please contact us

API calls

This section is meant for developers and will explain the usage of our API methods.
The API provides acces to our already classified data, and access to our classifier itself.
You can do one of the following:
1) Retrieve our data for an already classified URL.
2) Classify online a bulk of concataneted comments in English.
3) Retreive Aggregation data (tops), for a specific domain - assuming we have it.

API Method: Get Moodbase data for URL


Service URLhttp://services.moodbase.com/getURLdata.aspx
Input parameter 1 : "Url"The URL of the content page requested
OutputA file in JSON format containing the results of our classification engine.
You can see the explanation of the output here
Example #1Post the parameters to the service url, using http "GET" method
http://services.moodbase.com/getURLdata.aspx?Url=http://www.youtube.com/watch?v=vxm3jl7E8t4
Example #2Use this form :
Url :

API Method: Analysis of comments

This method enables developers to run Moodbase functionality against any collection of comments,
this may be an easy way for test driving our classification technology.
Service URLhttp://services.moodbase.com/getdata.aspx
Input parameter 1 : "Comments"A concatenated string containing the comments to be analyzed
Input parameter 2 : "Separator"A string used to specify a seperation between the different comments within the concatenated string
Input parameter 3 : "Domain" (optional)The domain in which the comments where written - This is used to better analyze the comments since each domain has minor differences
OutputA file in JSON format containing the results of our classification engine.
You can see the explanation of the output here
Example #1Post the parameters to the service url using http "POST" method
you can also use this form :
Concatenated comments :
Comment Seperator :
Comment source domain :

API Method: Get Moodbase tops data for domain


Service URLhttp://services.moodbase.com/gettops.aspx
Input parameter 1 : "domain"The domain for which the tops data is needed.
Input parameter 2 : "time"The time resulution for retreiving the tops data
Optional values are : d (day), w (week), a (all time)
Input parameter 3 (Optional) : "mood"Return results only for items classified in a specific moods
Optional values are : funny, scary, weird, amazing, romantic, beautiful
OutputA file in JSON format containing a list of links and order
Example #1Post the parameters to the service url, using http "GET" method
http://services.moodbase.com/gettops.aspx?domain=youtube.com&time=d&mood=funny
Example #2Use this form :
domain :
time :
time :

Output explanation


In general, the API returns a textual structure containing our unique results such as emotional scores, best describing comments , word tag cloud , sentiment analysis and so on... The structure is given using a JSON format (more on JSON format can be found here:http://json.org/ , you can download many json decoders online, like this one for javascript ).
Here is what you might expect of an average output
{
  "Scores":
    {"weird":0.116657918923909, "beautiful_percentile":-1, "interesting_percentile":-1, "stupid_percentile":-1, "funny_percentile":0.979, "scary":-0.404739073233185, "amazing_percentile":-1, "weird_percentile":0.993, "sad_percentile":-1, "stupid":0, "funny":0.17261992688979, "romantic_percentile":-1, "scary_percentile":0.99, "interesting":0, "romantic":-0.412207215337022, "amazing":0.152948623281382, "beautiful":-0.232869228117904, "sad":0},
  "Details":
    {"TagCloud_0":
      {"score":118.345336914063, "word":"tickle"},     "TagCloud_1":
      {"score":80.8662414550781, "word":"boob"},     "BestComment_0":
      {"commentWords":"tickle;groove;boob;", "commentText":" Tickle and groove.. 'not that boob "},
    "BestComment_1":
      {"commentWords":"tickle;boob;lol;", "commentText":" tickle that BOOB\ufeff lol "},
    "TagCloud_4":
      {"score":42.1309280395508, "word":"jiggle"},
    "TagCloud_3":
      {"score":50.1345367431641, "word":"groove"},
    "TagCloud_2":
      {"score":50.3664360046387, "word":"elmo"}
    "sentiment":-0.139767799980731,
  }
}
Explanation of the fields:
Scores : These are the results of the classification score for a given mood, when we have enough data on a specific domain, we also provide the percentile for the item within the domain. A score of 1 means something on one domain but aomething slightly different on another, this is usually since users are not the same and each domain has a language of its own.
Tag_Cloud : these are the best words we found in the comments that can be used to describe or tag the content.
Best_Comment : Selected comments, which we think are good representation of the mood of the conversation.
sentiment : A general sentiment among the comments ,values between -1 (negative) and 1 (positive).

Web service and .NET

It is also possible to use all the API calls through our Web Service, which is located at http://services.moodbase.com/MoodBaseService.asmx
You can find an example project written in C#/.NET here