API

API v2 documentation.

/api/v2/getPostList/<source>/<sort>[/page]

Returns a post list. source can be home, all or a box. sort must be one of hot, top or new.

Fields returned for each post found:

  • comments: the total count of comments for that post
  • content: the content of the post if it is a text post
  • flair: the flair of the post or null if there is no flair
  • link: the post's link or null if it is a text post
  • nsfw: true if the post was marked as NSFW
  • pid: the post's unique ID
  • posted: date/time the post was posted
  • score: the sum of upvotes-downvoted
  • sub: the name of the box the post belongs to
  • thumbnail: filename of the post's thumbnail
  • title: title of the post
  • user: name of the user that created the post
  • uid: unique identifier for user

Example response:
  {
    "posts": [
      {
        "comments": 3,
        "content": "",
        "deleted": 0,
        "edited": null,
        "flair": null,
        "link": null,
        "nsfw": false,
        "pid": 1,
        "posted": "Fri, 08 Feb 2029 17:28:05 GMT",
        "ptype": 0,
        "score": 1,
        "sid": "205068b5-b266-4d99-b794-1103a559ce46",
        "sub": "upvoto",
        "thumbnail": "",
        "title": "Test post, please ignore",
        "uid": "8d7cf4e5-fc76-4896-a220-30a67412f1c4",
        "user": "upvoto",
        "userstatus": 0
      }
    ],
    "status": "ok"
  }