Launch Your own API

Daylife is launching a new service today – the Enterprise API, which is a new component of the Daylife Platform.

Enterprise API will help a publisher/blogger establish an API for their content. They can choose to keep the API private or spread the love and make it public to developers.

How did we come to this idea?

We have been working at the Daylife API for almost two years now, and one of the most commonly used features by our partners and developers has been the filtering of content by a set of sources (what we call source filtering) to either:

a) Surface their own content or their partners’ content (Sky News topic pages);

b) Present a different perspective of news about a topic/subject by only showing content from, say, Travel sources (USA Today’s Cruise Log) or Conservative Politics sources or just blogs.

c) Give us an exclusive private feed of their media so we “Daylife-ize” that content and give you a full set of APIs to query for that content. Washington Post gave us an exclusive photo feed and now they use our Search API to build photo galleries on events like the 2008 Elections or the Olympics.

So we saw value in a publisher having an API for their content either for private or public use.

How does it work?

Say  you are Jeff Jarvis@Buzzmachine; the API to get his articles about Journalism will look something like this:

http://buzzmachine.enterpriseapi.daylife.com/articles/Journalism?format=xml

The notable things about the Enterprise API:

  • It returns you related articles, images, quotes and topics about any topic in the world.
  • The response can be in XML, JSON, PHP-serialized or HTML format.
  • Every method has its own set of parameters to tweak the data. The common parameters across all APIs:
    • days_back – To get data from back in time. The default is 30 days.
    • since_when – To browse into your archives.
    • sort – You can sort your results by date or relevance to the topic. The default is relevance.
    • limit – Number of results you need. Default is 10 and max is 100.
    • offset – Paginate through more results by jumping to a result. Default is 0.
  • The APIs cache the responses for 15 minutes for the same request.
  • We host and monitor the APIs for you.

What do you need to do?

The only pre-requisite to use this product is that you need to have a RSS feed of your content. We will add the feed to our system and start indexing your data (if it’s not already there!).

This product is in a private alpha, so send us an email and we will get you setup.

Yahoo! BOSS has a $2000 bonus for the Daylife Developer Challenge

Yahoo! opened up their search platform with a new API product Yahoo! BOSS. The BOSS API lets you submit a search query and get web, news and image search results in XML or JSON formats.

Yahoo! BOSS

Yahoo! BOSS

I wrote up a basic python client to get web results from the BOSS API and integrated it with the new Daylife customization wizard that lets you add a web search module on any daylife page.

Our friends at Yahoo! have gotten a great response from the launch of the BOSS API. To kick it up a notch, they have offered a bonus prize of $2000 (woot!) to raise the stakes in the Daylife Developer Challenge.

The BOSS API is pretty simple to use. You can combine queries using logical operators, apply filters such as exclude hate and filter content, simply paginate through the results and one simple feature that makes me happy – it returns the total result count!

There is also a BOSS Mashup Framework that you can use to build a BOSS application. Also, there is a screencast from Vik Singh in the BOSS team to use the API.

Trendrr – Daylife mashup

I saw a demo of Trendrr at the Apr 1st New York Tech meetup. Seemed like an easy way to throw all your data at one place and get some graphs in basic layouts (line,bar,area charts). Mark Ghuneim well utilized his 5 minute demo slot to show what trendrr can do and how their users have used their API. The best graph I liked was the one tracking someone’s CPU usage. You can then embed these graphs anywhere you want or export the data as xml, json or even an excel spreadsheet.

So I got my hands dirty today playing with the Trendrr API to push trending data in news from daylife about any topic. Signed up on trendrr.com, read some documentation about how to use the API and jumped right in. I have written a php script that is calling the daylife API to get the data and the trendrr api to publish it.

I have hosted the script for you to create your own trendrr graphs (more details below) or download it to customize the data that you send to trendrr.

Here are some of the graphs:

Here is my feedback to the Trendrr folks:

  1. The API is great because its simple
  2. Its always tricky to keep things simple and introduce advanced features. The graph currently is exported as an image. If it could be exported as HTML, I would love to have the capability to click on the data point and go to the real source of that data. In that case, the trendrr API will need to accept a link along with each data point. The timeline widget on the daylife.com topic pages support similar functionality.
  3. The delay between sending the data through the API and it showing up on the graphs is pretty significant. It would be great if does not take more than a minute.

Read more below about how I implemented the mashup of Trendrr and Daylife APIs.

Continue reading

Cookbook – What is it?

We started putting together everything that we or daylife‘s API users have done with the API as collection of posts on this drupal powered site called The Cookbook. Michael asked me to write a few lines as to what I think the cookbook is. This is what I came up with:

The Cookbook is a collection of recipes from daylifers and the cookbook community to discover what you can do with the Daylife platform. These recipes are ideas, how-tos, sample code, case studies, FAQs for what you can do with the Daylife platform. It is a place to post your recipes for the projects you have cooked with the Daylife platform and share your knowledge and expertise with the community. Share, Steal, Post, Comment, Love, Applaud, Criticize, Go Crazy!

Suggestions to improve?