Get Post Details and Available Comments
View all Reddit Posts, Comments & Community Data endpoints →Pass the full URL of one public Reddit discussion in url. The response contains meta.status, meta.totalComments, body.post, and body.post_comments. Observed post fields include id, title, author, subreddit, selftext, created_utc, score, ups, upvote_ratio, num_comments, permalink, and url. Each returned comment node uses id, author, content, up_votes, score, created_utc, and a replies array that can contain further comment nodes. Some numeric-looking fields in nested replies were strings, so normalize types before calculations. The checked historical discussion returned post p0esdp in wallstreetbets, meta.totalComments=194, and 76 top-level comment objects plus nested replies. Reported totals and top-level array length are different measurements; neither establishes that every comment is available. This endpoint has no cursor parameter and does not provide a documented way to expand missing comments. Text can be empty or unavailable for some posts; treat voting fields as a snapshot rather than a fixed score.
API Features
Live API Demo
🔒 Sign in to try it live
Log in to call this API with your own API key. New accounts get 100 free credits — no card required.
Log in / Sign upNo active API key found. Create one in your Dashboard, then reload this page. Dashboard →
/api/project/reddit/post-details API Response (JSON)
{} curl -X GET 'https://api.opendata-api.com/api/project/reddit/post-details?key=<API_KEY>&url=https%3A%2F%2Fwww.reddit.com%2Fr%2Fwallstreetbets%2Fcomments%2Fp0esdp%2Fdo_hedge_funds_beat_the_market_i_analyzed_the'
Query Result
Use Cases
- Create an evidence sheet for a selected product discussion using the post text and returned comments, with a link back to the original thread.
- Flatten nested replies into parent-child records for a client-generated CSV export or conversation-structure analysis.
- Compare locally saved snapshots of a launch or support thread to identify newly returned feedback and changes in available voting fields.
- Review a known discussion for an editorial case study while clearly labeling missing, deleted, or otherwise unavailable responses.
Frequently asked questions
What URL should I pass to retrieve a post and its comments?
Use a full public discussion URL containing /r/<community>/comments/<post-id>/, not the subreddit listing URL. The checked example is the wallstreetbets discussion with post ID p0esdp; its URL is provided as the input example.
Why can the returned comment tree differ from the reported comment total?
meta.totalComments is a reported total, while body.post_comments contains the top-level objects actually returned. The checked thread reported 194 and returned 76 top-level objects plus nested replies. Count all traversed reply nodes separately, and do not interpret either number as proof of exhaustive retrieval.
How do I parse nested comments and export them to CSV?
Read comment text from content, then recursively traverse replies arrays. Carry the parent node's ID in your own output rows. Normalize numeric-looking strings in nested replies before using scores or timestamps. CSV generation is client-side; this endpoint returns JSON.
Can I paginate or expand missing comments with this endpoint?
No comment cursor or expansion parameter is documented here. The cursor used by subreddit listing endpoints does not apply to this comment tree. Work with the available returned nodes rather than promising every reply.