POST/api/v1/community-postsCommunity

Community Posts

Retrieve a feed of posts from any public subreddit. You can sort by hot, new, top, rising, or controversial, just like browsing Reddit natively.

Ready to try it?

Create a free account — 30 requests included, no credit card.

Get free API key →

Request Parameters

Send as a JSON body in your POST request.

ParameterTypeRequired
subredditstringYes
sortstringNo
timestringNo
limitnumberNo
afterstringNo

Code Examples

curl

curl -X POST https://subscraper.dev/api/v1/community-posts \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "subreddit": "MachineLearning",
    "sort": "top",
    "time": "week",
    "limit": 10
  }'

TypeScript SDK

const feed = await client.getCommunityPosts({
  subreddit: "MachineLearning",
  sort: "top",
  time: "week",
  limit: 10
});
Install the SDK →

Sample Response

{
  "posts": [
    {
      "id": "t3_xyz789",
      "title": "New Paper: Attention Is All You Need (Revisited)",
      "author": "researcher_1",
      "score": 850,
      "numComments": 234,
      "url": "https://arxiv.org/abs/...",
      "createdAt": "2023-10-20T09:00:00Z"
    }
  ],
  "after": "t3_xyz789"
}

Common Use Cases

  • Building a custom Reddit client or reader
  • Monitoring a niche community for new trends
  • Aggregating top weekly content for a newsletter
  • Tracking competitor subreddits

Credits

Each call to /api/v1/community-posts uses 1 credit. Free tier includes 30 credits. View pricing →

Related Tools & Guides

All developer tools →

Related Endpoints

Start using /community-posts now

Free tier — 30 requests, no credit card required.