App · Social Media · 3 actions
Submit posts and comments and read subreddit listings on Reddit.
Actions
| Action | What it does |
|---|---|
| Comment on a post | Reply to a Reddit post or comment. |
| Get subreddit posts | List posts from a subreddit by hot, new, top, or rising. |
| Submit a post | Submit a text or link post to a subreddit from the connected account. |
Comment on a post
Reply to a Reddit post or comment. Provide the parent's fullname (a post is t3_… and a comment is t1_…).
Inputs
- Parent fullname
parent_idtextRequired - The fullname of the post or comment to reply to, for example, t3_1a2b3c.
- Comment
texttextRequired - The comment body (Markdown supported).
Outputs
bodytextidtextlink_idtextnametextpermalinktext
Example output
{
"body": "Thanks for sharing!",
"id": "9z8y7x",
"link_id": "t3_1a2b3c",
"name": "t1_9z8y7x",
"permalink": "/r/test/comments/1a2b3c/hello/9z8y7x/"
}Get subreddit posts
List posts from a subreddit by hot, new, top, or rising.
Inputs
- Subreddit
subreddittextRequired - The subreddit to read, for example, python.
- Sort
sorttext - Which listing to read.One of:
hot,new,top,rising. Default:hot. - Limit
limitnumber - Maximum number of posts to return (1-100).From 1 to 100. Default:
10.
Outputs
postslist
Example output
{
"posts": [
{
"author": "someuser",
"id": "1a2b3c",
"name": "t3_1a2b3c",
"num_comments": 12,
"permalink": "/r/python/comments/1a2b3c/interesting_article/",
"score": 128,
"subreddit": "python",
"title": "Interesting article",
"url": "https://example.com/article"
}
]
}Submit a post
Submit a text or link post to a subreddit from the connected account.
Inputs
- Subreddit
subreddittextRequired - The subreddit to post to, for example, test.
- Title
titletextRequired - The post title.
- Post type
post_typetext - Whether to submit a self (text) post or a link post.One of:
self(Text post),link(Link post). Default:self. - Text
texttext - Body text for a text post (ignored for link posts).
- Link URL
urltext - The URL for a link post (required when Post type is Link).
Outputs
idtext- The post's short ID.
nametext- The post's fullname (t3_...).
subreddittexttitletexturltext
Example output
{
"id": "1a2b3c",
"name": "t3_1a2b3c",
"subreddit": "test",
"title": "Hello from Lodol",
"url": "https://www.reddit.com/r/test/comments/1a2b3c/hello/"
}