API Documentation
Introduction
The BackType API allows you to develop applications that leverage our dataset and interact with our website. All requests to the BackType API are HTTP GET and POST requests. The API is available for non-commercial use and each user is limited to 1000 requests per day. The API is provided free of charge, but its use is subject to our Terms of Use. Please contact us if you would like that limit extended or if you would like to request any additional functionality.
Commercial Use
Currently, our API is available for non-commercial use. If you would like to use our API in a commercial application, please contact us. Provide as much detail as you can about your proposed application and how you would like our business relationship to work. We will review your proposal and get back to you as soon as possible.
Wire Format
All BackType API responses are available in two data formats: JSON and XML. To specify an output format, request the appropriate extension.
Authentication
Please login and re-visit this page to obtain your API key. If you aren't yet registered for BackType, click here to sign up.
All requests require the following parameters:
| Parameter | Required | Description |
|---|---|---|
key |
Yes | API key |
Response
JSON responses are in the following format:
totalresults– Number of resultsstartindex– Index of the starting resultitemsperpage– Number of results per pagecomments[]url– Permalink for comment on BackTypecommenturl– Permalink for the commentcontent– The comment in either plaintext or HTMLdate– The date the comment was published, in GMT e.g. 2008-10-01 06:21:43
blogurl– The blog's URLtitle– The title of the blog
posturl– The blog post's URLtitle– The title of the blog post
authorname– The name published with the commenturl– The author's URLusername– Username
profilename– The user's name published on their profileurl– The user's website published on their profiledescription– The user's description on their profileimage– The path to a user's profile picture
sharerurlusername– Username
profilename– The user's name published on their profileurl– The user's website published on their profiledescription– The user's description on their profileimage– The path to a user's profile picture
statsdata[]total– The number of mentionsdate– The date for the interval
blog_ids– The internal blog IDs specified as filters (comma delimited)url_ids– The internal author url IDs specified as filters (comma delimited)top_blogs[]id– The internal ID of the blogurl– The blog's URLtitle– The title of the blog
top_urls[]id– The internal ID of the author's URLname– The name of the authorurl– The author's URL
followers[]username– Username
profilename– The user's name published on their profileurl– The user's website published on their profiledescription– The user's description on their profileimage– The path to a user's profile picture
following[]urls[]nameurl
users[]username– Username
profilename– The user's name published on their profileurl– The user's website published on their profiledescription– The user's description on their profileimage– The path to a user's profile picture
profilename– The user's name published on their profileurl– The user's website published on their profiledescription– The user's description on their profileimage– The path to a user's profile picture
Callbacks
The callback property can be used to wrap the output to a function call using the JSON format:
GET http://api.backtype.com/user/user/comments.json?callback=foo&key=key
Images
The image property can be used to fetch user profile pictures in mini, thumbnail, preview, or original sizes:
GET http://www.backtype.com/go/image/p/{m,t,p,o}/image.jpg
Pagination
All requests outlined below (except retrieving a user's profile) support the following parameter for pagination:
| Parameter | Default | Required | Description |
|---|---|---|---|
page |
1 |
No | The page number (there are 25 results per page) |
itemsperpage |
25 |
No | The number of items per page (must be between 10-100) |
Comments Search
Search all the comments on BackType for a given string.
| Parameter | Default | Required | Description |
|---|---|---|---|
q |
Yes | The query string you want to search comments for | |
start |
No | Search for comments made after this date YYYY/MM/DD | |
end |
No | Search for comments made before this date YYYY/MM/DD |
GET http://api.backtype.com/comments/search.json?q=backtype&key=key
Comments Search Stats
Retrieve stats for a given query on BackType. BackType Trends was built using this method.
| Parameter | Default | Required | Description |
|---|---|---|---|
q |
Yes | The query string you want to search comments for | |
start |
2008/09/01 |
No | Include stats for comments made after this date YYYY/MM/DD – stats can not be retrieved before 2008/09/01 |
end |
Now |
No | Include stats for comments made before this date YYYY/MM/DD |
period |
0 |
No | Group mentions by day, week, month, or year (0, 1, 2, or 3, respectively) |
blog_ids |
No | Comma delimited list of internal blog IDs | |
url_ids |
No | Comma delimited list of internal author url IDs | |
top_blogs |
0 |
No | Whether or not you would like a list of internal blog IDs of the top blogs contributing to mentions |
top_urls |
0 |
No | Whether or not you would like a list of internal author url IDs of the top authors contributing to mentions |
GET http://api.backtype.com/comments/search/stats.json?q=backtype&key=key
Comments by Author URL
Retrieve comments written by a particular author.
GET http://api.backtype.com/url/url/comments.json?key=key
Comments by BackType User
Retrieve comments claimed by a BackType user.
GET http://api.backtype.com/user/user/comments.json?key=key
Comments Shared by BackType User
Retrieve comments shared by a BackType user.
GET http://api.backtype.com/user/user/shared.json?key=key
Home Feed Comments
Retrieve comments written by authors followed by a BackType user.
GET http://api.backtype.com/user/user/home/comments.json?key=key
Home Feed Shared Comments
Retrieve comments shared by users followed by a particular BackType user.
GET http://api.backtype.com/user/user/home/shared.json?key=key
User Followers
Retrieve users following a particular BackType user.
GET http://api.backtype.com/user/user/followers.json?key=key
User Following
Retrieve users being followed by a particular BackType user.
GET http://api.backtype.com/user/user/following.json?key=key
User Profile
Retrieve a BackType user's profile.
GET http://api.backtype.com/user/user/profile.json?key=key
Post Comments
Retrieve excerpts of comments for a post.
| Parameter | Required | Description |
|---|---|---|
url |
Yes | The post url to return comments for |
GET http://api.backtype.com/post/comments.json?url=http://blog.backtype.com/2008/10/backtype-on-friendfeed/&key=key
Post Stats
Retrieve stats for a post.
| Parameter | Required | Description |
|---|---|---|
url |
Yes | The post url to return stats for |
GET http://api.backtype.com/post/stats.json?url=http://blog.backtype.com/2008/10/backtype-on-friendfeed/&key=key
Blog ID
Retrieve a blog's internal BackType ID. To be used as a filter for the comment stats method.
| Parameter | Required | Description |
|---|---|---|
url |
Yes | The blog url to return an internal ID for |
GET http://api.backtype.com/blog/id.json?url=http://blog.backtype.com&key=key
URL ID
Retrieve an author url's internal BackType ID. To be used as a filter for the comment stats method.
| Parameter | Required | Description |
|---|---|---|
url |
Yes | The author url to return an internal ID for |
GET http://api.backtype.com/url/id.json?url=http://www.techcrunch.com&key=key