Fetch a Reddit post and its comments
/v1/reddit/posturl required
Reddit post URL (e.g., https://reddit.com/r/nodejs/comments/abc123/...)
max_comments optional
Maximum number of comments to fetch (default: 50, max: 500)
{
"post": {
"id": "1k6i5ah",
"title": "What is the most upvoted post on Reddit?",
"url": "https://www.reddit.com/r/NoStupidQuestions/comments/1k6i5ah/what_is_the_most_upvoted_post_on_reddit/",
"author": "example_user",
"subreddit": "NoStupidQuestions",
"score": 12500,
"upvotes": 12500,
"downvotes": 0,
"comments_count": 342,
"created_at": "2024-01-15T10:30:00Z",
"content": "What is the most upvoted post on Reddit? I'm curious to know..."
},
"comments": [
{
"id": "comment1",
"author": "helpful_redditor",
"score": 2840,
"content": "The most upvoted posts are usually in the most popular subreddits...",
"created_at": "2024-01-15T10:35:00Z"
}
]
}curl -X GET "https://api.webscrapingapis.com/v1/reddit/post?url=https://www.reddit.com/r/NoStupidQuestions/comments/1k6i5ah/what_is_the_most_upvoted_post_on_reddit/&max_comments=50" \
-H "x-api-key: YOUR_API_KEY"