Search Reddit comments by keyword. Returns comment content, parent post URL, subreddit, author, and publication date for each result. Supports fetching multiple pages of results in a single API call.
curl "https://apidirect.io/v1/reddit/comments?query=python&pages=2&sort_by=relevance" \
-H "X-API-Key: YOUR_API_KEY"
{
"posts": [
{
"title": "commenter on python",
"url": "https://reddit.com/r/python/comments/...",
"date": "2024-01-15 14:30:00",
"author": "commenter",
"source": "Reddit (Comment)",
"domain": "reddit.com",
"subreddit": "python",
"snippet": "Comment content...",
"type": "comment",
"sentiment": {
"emotions": {
"joy": 40,
"trust": 55,
"fear": 0,
"surprise": 10,
"sadness": 0,
"disgust": 0,
"anger": 0,
"anticipation": 30
},
"dominant_emotion": "trust",
"emotional_intensity": 5,
"polarity": "positive"
}
}
],
"pages": 2,
"count": 50
}