Profile Posts
An account's posts, newest first, 25 a page.
GET
apiKeyheader
AuthorizationBearer <token>An API key from the dashboard: Authorization: Bearer sapi_….
handle?stringThe username, with or without u/.
url?stringThe profile's link, instead of handle.
sort?stringnew (the default), hot, top or controversial.
Value in
"new""hot""top""controversial"time?stringFor top and controversial: hour, day, week, month, year or all
(the default).
Value in
"hour""day""week""month""year""all"cursor?stringnextCursor of the previous page.
maxAge?integerHow old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.
Format
int64Range
0 <= valueThe answer.
application/json- response
A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.
data*array<>pagination*import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.reddit.profilePosts({ handle: "GallowBoob", sort: "top" });Example Response
{ "data": [ { "id": "fgghrs", "url": "https://www.reddit.com/user/GallowBoob/comments/fgghrs/everything_in_balance_except_karma/", "text": null, "createdAt": "2020-03-10T16:27:45.000Z", "author": { "id": "iqsg6", "username": "GallowBoob", "displayName": null, "avatarUrl": null, "verified": false, "url": "https://www.reddit.com/user/GallowBoob/" }, "stats": { "views": null, "likes": 7951, "comments": 66, "shares": null, "saves": null, "engagementRate": null }, "media": [ { "kind": "image", "url": "https://preview.redd.it/41i4qishgvl41.jpg?auto=webp&s=0f8bda1a9109f0ff36c9f5a3ac998ea4426aef13", "thumbnailUrl": null, "width": 828, "height": 862, "durationSeconds": null } ], "hashtags": [], "mentions": [], "ext": { "title": "Everything in balance. Except karma ⬆️⬆️⬆️", "kind": "image", "subreddit": "u_GallowBoob", "score": 7951, "upvoteRatio": 0.94, "link": null, "domain": "i.redd.it", "flair": null, "nsfw": false, "spoiler": false, "locked": true, "stickied": true, "crossposts": 6, "crosspostOf": null, "awards": 0, "editedAt": null, "snippet": null } }, { "id": "gh5c5i", "url": "https://www.reddit.com/r/nextfuckinglevel/comments/gh5c5i/this_man_jogged_2_miles_through_his_neighborhood/", "text": null, "createdAt": "2020-05-10T17:13:40.000Z", "author": { "id": "iqsg6", "username": "GallowBoob", "displayName": null, "avatarUrl": null, "verified": false, "url": "https://www.reddit.com/user/GallowBoob/" }, "stats": { "views": null, "likes": 271569, "comments": 10328, "shares": null, "saves": null, "engagementRate": null }, "media": [ { "kind": "video", "url": "https://v.redd.it/hxxifx1a0zx41/DASH_720?source=fallback", "thumbnailUrl": "https://external-preview.redd.it/a643-QGL2QOJX_lQAVMc_5XZj5Nc-v10gwC0muubDLI.png?format=pjpg&auto=webp&s=9bb46929121c6890fcb7448d043c5869a3e1c5de", "width": 404, "height": 720, "durationSeconds": 15 } ], "hashtags": [], "mentions": [], "ext": { "title": "This man jogged 2 miles through his neighborhood carrying a TV in his hands to prove that “looking like a suspect” who committed a robbery isn’t a good enough excuse for the murder of Ahmaud Arbery. Neighbors waived hello to him as he jogged.", "kind": "video", "subreddit": "nextfuckinglevel", "score": 271569, "upvoteRatio": 0.95, "link": null, "domain": "v.redd.it", "flair": "⬆️TOP POST ⬆️", "nsfw": false, "spoiler": false, "locked": true, "stickied": false, "crossposts": 57, "crosspostOf": null, "awards": 0, "editedAt": null, "snippet": null } } ], "pagination": { "nextCursor": "t3_79ad1b", "hasMore": true }}