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

Discussion URL to post record Resolve a selected thread URL to its post ID, title, author, subreddit, text, creation timestamp, and source permalink.
Recursive reply arrays Traverse body.post_comments and each node's replies array to preserve the returned parent-child conversation structure.
Post and comment voting context Read post score and upvote_ratio alongside comment score and up_votes without treating them as permanent engagement values.
Reported totals kept separate Keep meta.totalComments and post.num_comments distinct from the number of nodes your application actually receives and traverses.

Live API Demo

GET /api/project/reddit/post-details

Request cost is temporarily unavailable. No price is assumed.

View pricing

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'
📢
Need Help?
If you encounter API issues or need other API requirements, please contact us.
Contact Us

Use Cases

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.

Related operations

Guides

View Subscription Plans →