POST/v1/data/reddit/search
Reddit Search
Search Reddit for posts matching keywords. Optionally restrict to a specific subreddit. Supports relevance, hot, top, new, and comments sorting.
Target Latency
1.2s - 4.5s
Credits
2 cr/req
Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
| query | string | REQUIRED | Search keywords (1-500 characters). |
| limit | number | optional | Maximum results to return (1-100). |
| sort | string | optional | Sort order: "relevance", "hot", "top", "new", "comments". |
| subreddit | string | optional | Restrict search to a specific subreddit (1-100 characters). |
cURL Example
curl -X POST "https://api.datablue.dev/v1/data/reddit/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "web scraping python best practices",
"limit": 10,
"sort": "relevance",
"subreddit": "python"
}'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.73,
"query": "web scraping python best practices",
"subreddit": "python",
"sort": "relevance",
"count": 10,
"results": [
{
"id": "8h9i0j1",
"title": "What are the best practices for web scraping in Python in 2026?",
"author": "curious_dev",
"subreddit": "python",
"score": 567,
"upvote_ratio": 0.93,
"num_comments": 89,
"url": "https://www.reddit.com/r/python/comments/8h9i0j1/best_practices_scraping/",
"permalink": "/r/python/comments/8h9i0j1/best_practices_scraping/",
"selftext": "I'm building a scraping pipeline and want to know the current best practices...",
"created": "2026-03-25T09:00:00Z",
"is_video": false,
"is_self": true,
"over_18": false,
"stickied": false,
"flair": "Discussion",
"awards": 1
}
]
}