reddit.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
New to Corsair? See API access, authentication, and error handling.
Feeds
getAll
feeds.getAll
Get posts from /r/all feed
Risk: read
await corsair.reddit.api.feeds.getAll({});
| Name | Type | Required | Description |
|---|---|---|---|
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
posts | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
posts full type
posts full type
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
}[]
getPopular
feeds.getPopular
Get posts from /r/popular feed
Risk: read
await corsair.reddit.api.feeds.getPopular({});
| Name | Type | Required | Description |
|---|---|---|---|
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
posts | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
posts full type
posts full type
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
}[]
Listings
subredditsNew
listings.subredditsNew
Get new subreddit listings
Risk: read
await corsair.reddit.api.listings.subredditsNew({});
| Name | Type | Required | Description |
|---|---|---|---|
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
subreddits | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
subreddits full type
subreddits full type
{
id: string,
name: string,
display_name: string,
display_name_prefixed: string,
title: string,
description: string | null,
description_html: string | null,
public_description: string | null,
subscribers: number,
active_user_count?: number | null,
accounts_active?: number | null,
over18: boolean,
quarantine: boolean,
restrict_posting?: boolean,
restrict_commenting?: boolean,
icon_img: string | null,
banner_img: string | null,
community_icon: string | null,
primary_color: string | null,
created_utc: number,
created: number,
lang: string,
allow_discovery?: boolean,
submit_text_label?: string | null,
wiki_enabled?: boolean,
subreddit_type?: string
}[]
subredditsPopular
listings.subredditsPopular
Get popular subreddit listings
Risk: read
await corsair.reddit.api.listings.subredditsPopular({});
| Name | Type | Required | Description |
|---|---|---|---|
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
subreddits | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
subreddits full type
subreddits full type
{
id: string,
name: string,
display_name: string,
display_name_prefixed: string,
title: string,
description: string | null,
description_html: string | null,
public_description: string | null,
subscribers: number,
active_user_count?: number | null,
accounts_active?: number | null,
over18: boolean,
quarantine: boolean,
restrict_posting?: boolean,
restrict_commenting?: boolean,
icon_img: string | null,
banner_img: string | null,
community_icon: string | null,
primary_color: string | null,
created_utc: number,
created: number,
lang: string,
allow_discovery?: boolean,
submit_text_label?: string | null,
wiki_enabled?: boolean,
subreddit_type?: string
}[]
Posts
getById
posts.getById
Get posts by fullname IDs
Risk: read
await corsair.reddit.api.posts.getById({});
| Name | Type | Required | Description |
|---|---|---|---|
names | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
posts | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
posts full type
posts full type
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
}[]
getComments
posts.getComments
Get a post and its comments
Risk: read
await corsair.reddit.api.posts.getComments({});
| Name | Type | Required | Description |
|---|---|---|---|
post_id | string | Yes | — |
limit | number | No | — |
depth | number | No | — |
context | number | No | — |
sort | confidence | top | new | controversial | old | random | qa | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
post | object | Yes | — |
comments | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
post full type
post full type
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
}
comments full type
comments full type
Search
global
search.global
Search all of Reddit
Risk: read
await corsair.reddit.api.search.global({});
| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | — |
sort | relevance | hot | top | new | comments | No | — |
t | hour | day | week | month | year | all | No | — |
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
restrict_sr | boolean | No | — |
sr_name | string | No | — |
type | link | sr | user | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
posts | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
posts full type
posts full type
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
}[]
subreddit
search.subreddit
Search within a subreddit
Risk: read
await corsair.reddit.api.search.subreddit({});
| Name | Type | Required | Description |
|---|---|---|---|
subreddit | string | Yes | — |
q | string | Yes | — |
sort | relevance | hot | top | new | comments | No | — |
t | hour | day | week | month | year | all | No | — |
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
posts | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
posts full type
posts full type
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
}[]
subreddits
search.subreddits
Search for subreddits by name
Risk: read
await corsair.reddit.api.search.subreddits({});
| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | — |
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
subreddits | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
subreddits full type
subreddits full type
{
id: string,
name: string,
display_name: string,
display_name_prefixed: string,
title: string,
description: string | null,
description_html: string | null,
public_description: string | null,
subscribers: number,
active_user_count?: number | null,
accounts_active?: number | null,
over18: boolean,
quarantine: boolean,
restrict_posting?: boolean,
restrict_commenting?: boolean,
icon_img: string | null,
banner_img: string | null,
community_icon: string | null,
primary_color: string | null,
created_utc: number,
created: number,
lang: string,
allow_discovery?: boolean,
submit_text_label?: string | null,
wiki_enabled?: boolean,
subreddit_type?: string
}[]
Subreddits
getAbout
subreddits.getAbout
Get subreddit metadata and info
Risk: read
await corsair.reddit.api.subreddits.getAbout({});
| Name | Type | Required | Description |
|---|---|---|---|
subreddit | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
name | string | Yes | — |
display_name | string | Yes | — |
display_name_prefixed | string | Yes | — |
title | string | Yes | — |
description | string | null | Yes | — |
description_html | string | null | Yes | — |
public_description | string | null | Yes | — |
subscribers | number | Yes | — |
active_user_count | number | No | — |
accounts_active | number | No | — |
over18 | boolean | Yes | — |
quarantine | boolean | Yes | — |
restrict_posting | boolean | No | — |
restrict_commenting | boolean | No | — |
icon_img | string | null | Yes | — |
banner_img | string | null | Yes | — |
community_icon | string | null | Yes | — |
primary_color | string | null | Yes | — |
created_utc | number | Yes | — |
created | number | Yes | — |
lang | string | Yes | — |
allow_discovery | boolean | No | — |
submit_text_label | string | null | No | — |
wiki_enabled | boolean | No | — |
subreddit_type | string | No | — |
getControversial
subreddits.getControversial
Get controversial posts from a subreddit
Risk: read
await corsair.reddit.api.subreddits.getControversial({});
| Name | Type | Required | Description |
|---|---|---|---|
subreddit | string | Yes | — |
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
t | hour | day | week | month | year | all | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
posts | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
posts full type
posts full type
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
}[]
getHot
subreddits.getHot
Get hot posts from a subreddit
Risk: read
await corsair.reddit.api.subreddits.getHot({});
| Name | Type | Required | Description |
|---|---|---|---|
subreddit | string | Yes | — |
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
posts | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
posts full type
posts full type
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
}[]
getNew
subreddits.getNew
Get new posts from a subreddit
Risk: read
await corsair.reddit.api.subreddits.getNew({});
| Name | Type | Required | Description |
|---|---|---|---|
subreddit | string | Yes | — |
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
posts | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
posts full type
posts full type
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
}[]
getRising
subreddits.getRising
Get rising posts from a subreddit
Risk: read
await corsair.reddit.api.subreddits.getRising({});
| Name | Type | Required | Description |
|---|---|---|---|
subreddit | string | Yes | — |
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
posts | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
posts full type
posts full type
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
}[]
getTop
subreddits.getTop
Get top posts from a subreddit with time filter
Risk: read
await corsair.reddit.api.subreddits.getTop({});
| Name | Type | Required | Description |
|---|---|---|---|
subreddit | string | Yes | — |
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
t | hour | day | week | month | year | all | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
posts | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
posts full type
posts full type
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
}[]
Users
getAbout
users.getAbout
Get user profile information
Risk: read
await corsair.reddit.api.users.getAbout({});
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
name | string | Yes | — |
link_karma | number | Yes | — |
comment_karma | number | Yes | — |
total_karma | number | Yes | — |
is_employee | boolean | No | — |
is_mod | boolean | No | — |
is_gold | boolean | No | — |
created_utc | number | Yes | — |
has_verified_email | boolean | Yes | — |
verified | boolean | No | — |
icon_img | string | null | Yes | — |
is_suspended | boolean | No | — |
pref_show_snoovatar | boolean | No | — |
accept_followers | boolean | No | — |
getComments
users.getComments
Get a user’s comments
Risk: read
await corsair.reddit.api.users.getComments({});
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | — |
sort | new | hot | top | No | — |
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
t | hour | day | week | month | year | all | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
comments | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
comments full type
comments full type
{
id: string,
name: string,
body: string,
body_html: string,
author: string | null,
author_fullname?: string,
score: number,
ups: number,
downs: number,
depth?: number,
parent_id: string,
link_id: string,
created_utc: number,
controversiality: number,
gilded?: number,
edited: boolean | number,
score_hidden?: boolean,
collapsed?: boolean,
archived?: boolean,
locked?: boolean,
stickied?: boolean,
permalink: string,
subreddit: string,
subreddit_name_prefixed: string,
over_18?: boolean
}[]
getOverview
users.getOverview
Get a user’s mixed posts and comments
Risk: read
await corsair.reddit.api.users.getOverview({});
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | — |
sort | new | hot | top | No | — |
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
t | hour | day | week | month | year | all | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
items | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
items full type
items full type
(
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
} | {
id: string,
name: string,
body: string,
body_html: string,
author: string | null,
author_fullname?: string,
score: number,
ups: number,
downs: number,
depth?: number,
parent_id: string,
link_id: string,
created_utc: number,
controversiality: number,
gilded?: number,
edited: boolean | number,
score_hidden?: boolean,
collapsed?: boolean,
archived?: boolean,
locked?: boolean,
stickied?: boolean,
permalink: string,
subreddit: string,
subreddit_name_prefixed: string,
over_18?: boolean
}
)[]
getSubmitted
users.getSubmitted
Get a user’s submitted posts
Risk: read
await corsair.reddit.api.users.getSubmitted({});
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | — |
sort | new | hot | top | No | — |
limit | number | No | — |
after | string | No | — |
before | string | No | — |
count | number | No | — |
t | hour | day | week | month | year | all | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
posts | object[] | Yes | — |
after | string | No | — |
before | string | No | — |
dist | number | Yes | — |
posts full type
posts full type
{
id: string,
name: string,
title: string,
selftext: string | null,
selftext_html: string | null,
url: string,
author: string | null,
author_fullname?: string,
subreddit: string,
subreddit_name_prefixed: string,
subreddit_id?: string,
score: number,
ups: number,
downs: number,
upvote_ratio: number,
num_comments: number,
over_18: boolean,
spoiler: boolean,
stickied: boolean,
archived?: boolean,
locked?: boolean,
hide_score?: boolean,
created_utc: number,
permalink: string,
thumbnail: string,
total_awards_received?: number
}[]