POST/v1/data/reddit/posts

Reddit Posts

Get posts from a subreddit with sorting (hot, new, top, rising, controversial) and time filtering. Returns full post metadata including score, comments, media, flair, and awards.

Target Latency

1.2s - 4.5s

Credits

2 cr/req

Parameters

NameTypeRequirementDescription
subredditstringREQUIREDSubreddit name (e.g. 'python' or 'r/python'). 1-100 characters.
sortstringoptionalSort order: "hot", "new", "top", "rising", "controversial".
limitnumberoptionalNumber of posts to return (1-100).
time_filterstringoptionalTime filter for top/controversial: "hour", "day", "week", "month", "year", "all".

cURL Example

curl -X POST "https://api.datablue.dev/v1/data/reddit/posts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "subreddit": "python",
  "sort": "top",
  "limit": 5,
  "time_filter": "week"
}'

System Responses

200 OK

Request processed successfully.

401 UNAUTHORIZED

Missing or invalid API key.

429 RATE LIMIT

System capacity exceeded.

500 SYSTEM FAILURE

Internal core exception.

EXAMPLE RESPONSE
{
  "success": true,
  "time_taken": 2.18,
  "subreddit": "python",
  "sort": "top",
  "count": 5,
  "posts": [
    {
      "id": "1b2c3d4",
      "title": "I wrote a Python library that makes web scraping 10x easier",
      "author": "scraperdev",
      "subreddit": "python",
      "score": 2847,
      "upvote_ratio": 0.96,
      "num_comments": 342,
      "url": "https://github.com/scraperdev/easyscrape",
      "permalink": "/r/python/comments/1b2c3d4/i_wrote_a_python_library/",
      "selftext": null,
      "created": "2026-03-30T15:30:00Z",
      "thumbnail": "https://b.thumbs.redditmedia.com/abc123.jpg",
      "is_video": false,
      "is_self": false,
      "over_18": false,
      "stickied": false,
      "flair": "Library",
      "awards": 5
    },
    {
      "id": "4e5f6g7",
      "title": "Python 3.14 Released - What's New",
      "author": "python_dev",
      "subreddit": "python",
      "score": 1923,
      "upvote_ratio": 0.98,
      "num_comments": 187,
      "url": "https://www.reddit.com/r/python/comments/4e5f6g7/python_314_released/",
      "permalink": "/r/python/comments/4e5f6g7/python_314_released/",
      "selftext": "The latest Python release brings several exciting features including...",
      "created": "2026-03-28T12:00:00Z",
      "is_video": false,
      "is_self": true,
      "over_18": false,
      "stickied": false,
      "flair": "News",
      "awards": 3
    }
  ]
}