GET /stats
Example Request
{
"by_source": {
"engadget": {
"comments_count": 54810,
"articles_count": 207
},
"mashable": {
"comments_count": 1633,
"articles_count": 144
},
"wired": {
"comments_count": 3111,
"articles_count": 127
}
},
"comments_count": 59554,
"articles_count": 478
}
GET /articles/recent
Parameters
Parameter | Description |
num
optional
|
|
Example Request
/articles/recent.json?num=1
{
"articles": [
{
"id": "id-string",
"site": "example",
"title": "This is title",
"url": "http://example.com/post",
"author": "foo",
"posted_at": "2012-03-10T09:14:22Z",
"comments_count": 5,
}
]
}
GET /articles/search
Parameters
Parameter | Description |
q
required
|
Keyword to search. |
offset
optional
|
|
num
optional
|
|
Example Request
/articles/search.json?q=keyword
{
"total_results": 1,
"next_offset": 25,
"articles": [
{
"id": "id-string",
"site": "example",
"title": "This is title",
"url": "http://example.com/post",
"author": "foo",
"posted_at": "2012-03-10T09:14:22Z",
"comments_count": 5,
}
]
}
GET /articles/lookup
Parameters
Parameter | Description |
url
required
|
URL of an article to look up. |
Example Request
/articles/lookup.json?url=http://example.com/post
{
"article": {
"id": "id-string",
"site": "example",
"title": "This is title",
"url": "http://example.com/post",
"author": "foo",
"posted_at": "2012-03-10T09:14:22Z",
"comments_count": 5,
}
}
GET /articles/[id]/comments
Article ID is included in responses of /articles/lookup or /articles/search
Parameters
Parameter | Description |
sort
optional
|
The field for sorting comments. One of popular, recent, active, wordcount, controversial, random
(Default: popular)
|
offset
optional
|
|
num
optional
|
The number of comments to retrieve. |
highlighted
optional
|
If it is set to "true" or "false", filter the result. |
Example Request
/articles/[id]/comments.json
{
"article": { // same with /articles/lookup
"id": "id-string",
"site": "example",
"title": "This is title",
"url": "http://example.com/post",
"author": "foo",
"posted_at": "2012-03-10T09:14:22Z",
"comments_count": 5,
},
"comments": [
{
"id": "id-string",
"site": "example",
"body": "lorem ipsulm",
"posted_at": "2012-03-10T09:14:22Z",
"author": "name",
"author_url": "http://example.com",
"author_avatar_url": "http://example.com/avatar.jpg",
"subcomments_count": 0,
"depth": 0,
"up": 5,
"down": null,
"wordcount": 2,
}
]
}
GET /articles/[id]/related_articles
Parameters
Parameter | Description |
sort
optional
|
The field for sorting comments. One of relevancy, comments, recommended_comments, recent, random
(Default: relevancy)
|
offset
optional
|
|
num
optional
|
|
Example Request
/articles/[id]/related_articles.json?sort=popular
{
"total_results": 1,
"next_offset": 1,
"articles": [
{
"id": "id-string",
"site": "example",
"title": "This is title",
"url": "http://example.com/post",
"author": "foo",
"posted_at": "2012-03-10T09:14:22Z",
"comments_count": 5,
"score": 0.142,
}
]
}
GET /comments/on_related_articles
Parameters
Parameter | Description |
article_url
required
|
|
sort
optional
|
The field for sorting comments. One of popular, recent, active, wordcount, controversial
(Default: popular)
|
highlighted
optional
|
If it is set to "true" or "false", filter the result. |
Example Request
/comments/on_related_articles.json?article_url=http://example.com
{
"total_comments_on_related_articles": 24,
"comments": [
{
"id": "id-string",
"site": "example",
"body": "lorem ipsulm",
"posted_at": "2012-03-10T09:14:22Z",
"author": "name",
"author_url": "http://example.com",
"author_avatar_url": "http://example.com/avatar.jpg",
"subcomments_count": 0,
"depth": 0,
"up": 5,
"down": null,
"wordcount": 2,
"article": {
"id": "id-string",
"site": "example",
"title": "This is title",
"url": "http://example.com/post",
"author": "foo",
"posted_at": "2012-03-10T09:14:22Z",
"comments_count": 5,
"score": 0.142,
}
}
]
}