CORE APIs
The Core APIs (or more accurately, the Core Recommendation APIs) are the best starting point for learning the body of BeliefNetworks APIs. These APIs allow callers to write queries against data that BeliefNetworks has crawled from the Internet and from the Twitterverse. They require nothing more than writing your code (an api key is necessary to increase your daily query volume).
All APIs return data in XML format. Developers should understand the Core APIs before moving on to the Custom APIs and building custom corpora. For a conceptual understanding of Recommendations and Concepts and their importance to the input to and output from the APIs, please refer back to the Overview.
Contents
Recommend Concepts
Description:
Takes supplied text or a URL and provides a list of concepts back.
Usage:
| HTTP Verb | Resource URL |
|---|---|
| GET | http://beliefnetworks.net/bnws/v1/recommendations/concepts?text=TEXT[&numresults=NUMBER] |
Where:
Output:
<root>
<recommendations>
<recommendation weight="CONCEPTWEIGHT">CONCEPT</recommendation>
</recommendations>
...
</root>
Where:
Examples:
GET http://beliefnetworks.net/bnws/v1/recommendations/concepts?text=dog
GET http://beliefnetworks.net/bnws/v1/recommendations/concepts?text=http://cnn.com
GET http://beliefnetworks.net/bnws/v1/recommendations/concepts?text=dog&numresults=3
Recommend Twitter Sites
Description:
Takes supplied text or a URL and provides a list of Twitter sites that have similar concepts.
Usage:
| HTTP Verb | Resource URL |
|---|---|
| GET | http://beliefnetworks.net/bnws/v1/recommendations/twitter-sites?text=TEXT[&numresults=NUMBER] |
Where:
Output:
<root>
<recommendations>
<recommendation weight="SITEWEIGHT">TWITTERUSER</recommendation>
<recommendationText>SAMPLESITETEXT</recommendationText>
</recommendations>
...
</root>Where:
Examples:
GET http://beliefnetworks.net/bnws/v1/recommendations/twitter-sites?text=dog
GET http://beliefnetworks.net/bnws/v1/recommendations/twitter-sites?text=http://cnn.com
GET http://beliefnetworks.net/bnws/v1/recommendations/twitter-sites?text=dog&numresults=3
Recommend Web Sites
Description:
Takes supplied text or a URL and provides a list of web sites that have similar concepts.
Usage:
| HTTP Verb | Resource URL |
|---|---|
| GET | http://beliefnetworks.net/bnws/v1/recommendations/web-sites?text=TEXT[&numresults=NUMBER] |
Where:
Output:
<root>
<recommendations>
<recommendation weight="SITEWEIGHT">SITE</recommendation>
<recommendationText>SAMPLESITETEXT</recommendationText>
</recommendations>
...
</root>Where:
Examples:
GET http://beliefnetworks.net/bnws/v1/recommendations/web-sites?text=dog
GET http://beliefnetworks.net/bnws/v1/recommendations/web-sites?text=http://cnn.com
GET http://beliefnetworks.net/bnws/v1/recommendations/web-sites?text=dog&numresults=3
Recommend Combined Sites
Description:
Takes supplied text or a URL and provides a list of web sites and twitter users that have similar concepts.
Usage:
| HTTP Verb | Resource URL |
|---|---|
| GET | http://beliefnetworks.net/bnws/v1/recommendations/combined-sites?text=TEXT[&numresults=NUMBER] |
Where:
Output:
<root>
<recommendations>
<recommendation weight="SITEWEIGHT">SITE</recommendation>
<recommendationText>SAMPLESITETEXT</recommendationText>
</recommendations>
...
</root>Where:
Examples:
GET http://beliefnetworks.net/bnws/v1/recommendations/combined-sites?text=dog
GET http://beliefnetworks.net/bnws/v1/recommendations/combined-sites?text=http://cnn.com
GET http://beliefnetworks.net/bnws/v1/recommendations/combined-sites?text=dog&numresults=3
