Reddit

Subreddit Posts

Fetch posts from a given subreddit with chosen filters. See the `cursor` query parameter below for information on how to manage pagination (fetch more posts).

API Pricing (per request): 2 units

Try the API

get/reddit/subreddit/posts

Request

  • Base URL: https://ensembledata.com/apis
  • URL: https://ensembledata.com/apis/reddit/subreddit/posts
  • Auth: none declared

Query parameters

namestring required

Subreddit to be searched.

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

An enumeration.

Type of posts to fetch.

period'hour' | 'day' | 'week' | 'month' | 'year' | 'all' required

An enumeration.

ATTENTION: The time filter applies only to sort type 'top'.

cursorstring

Parameter to manually handle pagination. Each response contains a nextCursor which can be used to retrieve the next page of results by sending it as the next cursor. If the nextCursor is not present in the response, it means that there are no more results to retrieve.

tokenstring required

Private token assigned to each client to access the APIs.

Response

Successful Response

unknown required

Changes

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