Reddit

Fetch a Reddit post with comments, subreddit feed, or user

Fetch a Reddit post, subreddit, or user. Posts return comments; subreddit and user refs return metadata plus recent activity.

post/api/v1/reddit/get

Request

  • Base URL: https://glim.sh
  • URL: https://glim.sh/api/v1/reddit/get
  • Auth: one of:
    • none
    • API key in header x-api-key
    • HTTP bearer
    • API key in query parameter apiKey

Request body

refstring required

Reddit post, subreddit, or user reference. Best: a post URL, subreddit URL/r/name, or user URL/u/name. A bare base36 post id also works. A comment permalink (…/comments/<post>/comment/<id>/) returns that comment with its ancestor context and replies.

comment_sort'confidence' | 'top' | 'new' | 'controversial' | 'old' | 'qa'

Comment sort. Post refs only: subreddit/user listings always hydrate a fixed 2 top-level comments sorted by top.

comment_limitinteger

Max comments (post refs only)

comment_depthinteger

Max nesting depth (post refs only)

sort'hot' | 'new' | 'top' | 'rising'

Listing post sort

time'hour' | 'day' | 'week' | 'month' | 'year' | 'all'

Listing time range

limitinteger

Max listing posts (subreddit/user). Subreddit posts return full content + top comments; for user refs this also caps the comments returned.

cursorstring

Pagination cursor from a prior subreddit response's next_cursor

include_postsboolean

Include recent posts for user refs

include_commentsboolean

Include recent comments for user refs

Response

Reddit resource

object required

Changes

No recorded changes to this operation across all 1 revision of this API.