Enterprise Integration Zone is brought to you in partnership with:

Steven is CEO and Co-founder of 3scale networks: one of the worlds leading providers of API Management Infrastructure (http://www.3scale.net). Steven is a DZone MVB and is not an employee of DZone and has posted 63 posts at DZone. You can read more from them at their website. View Full User Profile

Primal API: 3 Steps to a Smart Personalized Web for Your Application

06.20.2013
| 1661 views |
  • submit to reddit
Whereas many data APIs provide the data you need, Primal’s data service combines human expertise with smart machines to also help you organize and integrate this data. Through Primal’s API, which is powered by 3scale, you can incorporate content from the web into your app in an easy and filtered way. How? Keep reading.

This is a guest post by Peter Sweeney, Founder & President of Primal. Peter is a serial entrepreneur who has extensive experience creating and growing Internet-based companies. He’s passionate and focused on disruptive innovations that provide new mass-market opportunities. And as Primal’s President, he leads R&D, product development and market strategy.

Recently, the idea of a portal is getting a reboot. But as much as the Web has advanced for human consumption, it remains a very inhospitable place for a large contingent of users, namely machines.

Back in the early days of the Web, the Yahoo! Directory filled a huge gap in the ecosystem.

This portal helped us make sense of the Web. It organized content based on topics, connected those topics into a hierarchy to make sense of it all, and standardized the presentation of the content so that it was convenient and accessible.

But where can you find a portal that makes content from the Web accessible in your application?

Primal's product

If you want to incorporate content from the Web into your app, let alone personalize it to the individual interests of your users, you’re undoubtedly confronting some daunting problems:

  • the content isn’t described in a way your application can understand;

  • the content isn’t organized in a way that matches your app; and

  • the content isn’t presented in a way that makes it easy to incorporate into your user experience.

In the sections that follow, we’re going to introduce you to a simple solution. Primal is like a personalized Web portal for your app. It’s a data service that makes it easy to incorporate Web content from sources you trust, tailored to the needs of each individual user of your application.

Solution Walkthrough: Camera Reviews

Imagine you’ve built an application that will revolutionize how people find and buy cameras. You’ve built the expertise into your app that gets the sales process down to a science.

Well, almost. You know that there’s a tremendous amount of information on the Web that’s important to the buying decision, like camera reviews and consumer discussions, that’s still not a part of your solution.

Camera reviews blog - Primal

Source: Yahoo Shopping

But that information is a mess of unstructured content. How do you get it into a form that you can incorporate within your app? How do you tailor the content to the individual users of your application, as they consider specific cameras and various features?

We’ll show you how easy it is to use Primal, in three steps:

  • Step 1: Choose your content sources

  • Step 2: Select the keywords that represent your user’s interests

  • Step 3: Integrate filtered content in your app

Step 1: Choose your sources

Primal makes it easy to pull together the trusted sources of content that your users need. Just like the editor of a directory, you can tailor the results to your unique perspective and expertise. Under your direction, Primal’s artificial intelligence organizes your information on-the-fly, giving you convenient access to popular news stories, videos, social media, or in this case, camera reviews.

Out-of-the-box, Primal supports any website or RSS that’s accessible on the open Web. Below is a list of sources we curated using Primal directly on the Web.

Primal content sources camera blog

Doing this programmatically through our data service is just as simple:

POST payload:

{
    ”CameraReviews”: {
        ”default”: false,
        ”contents”: {
            ”http://www.cameralabs.com”: {
            },
            ”http://www.photographyblog.com/reviews/”: {
            },
            ”http://www.trustedreviews.com/digital-cameras”: {
            },
            ”http://www.consumerreports.org/cro/digital-cameras.htm”: {
            },
            ”http://reviews.cnet.com/digital-cameras”: {
            }
        }
    }
}

Step 2: Choose your topics

Great, now you’ve got the trusted sources of content you want to use in your app. But you need the content organized around the specific topics of interest from your application.

Just like humans need directories to make sense of the world, machines need connected topics (called semantic representations) to understand your application.

Primal addresses this need in an elegant way. You simply surface topics of interest in your app using keywords. Primal’s AI uses these inputs to create semantic data structures called interest graphs. Each interest graph you create is like a portal to the Web that machines can understand.

For example, if your app is helping people find a camera, the topics of interest might include camera brands and models, product features and benefits. It might even include ways that the camera will be used, such as “travel”, “weddings”, or “hanging out with friends”.

The POST method is used via Primal’s data service to create each interest graph. In the example below, we’ve created an interest graph using a specific camera model and the product attributes of interest to the specific user of your app.

POSThttps://data.primal.com/Camera/Nikon+D7100/wireless+sharing; digital+slr;1080p

Step 3: Get your filtered content

Now that your app has a Web portal personalized to the needs of your individual users, you can use it to retrieve filtered content from the Web. Primal retrieves the latest content in real-time, keeping it as fresh as possible.

The GET method is used via Primal’s data service to retrieve filtered content. You can focus Primal on whatever collection of content sources you want to use.

GEThttps://data.primal.com/Camera/Nikon+D7100/wireless+sharing;digital+slr;1080p

Primal returns the content filtered and organized in a standardized, consistent way. This makes it really easy to incorporate the content into your user experience.

Presenting Personalized Web Content in Your Application

The screen capture below mashes up Primal’s content as rendered in Feedly, a newsreader, and Yahoo’s shopping comparison app.

Camera mashup blog - Primal

Getting started

For more information, check out our data service support site.
When you’re ready to dive in, we’re at your disposal if you need any help exploring this use case or recreating the demo.

When you’re ready start building your own solution, our Getting Started guide will get you up and running in minutes.

Check this out for more information on our affordable pricing plans for companies of all sizes.
If you’d like to stay in the loop on our progress, subscribe to our blog or follow us on Twitter.
And if you’re interested in working with us directly, we’re hiring!



Published at DZone with permission of Steven Willmott, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)