POST/api/v1/postContent

Get Post & Comments

Retrieve the complete content of a Reddit post, along with its nested comment tree, author details, and metadata. Just provide the Reddit URL.

Ready to try it?

Create a free account — 30 requests included, no credit card.

Get free API key →

Request Parameters

Send as a JSON body in your POST request.

ParameterTypeRequired
urlstringYes
commentLimitnumberNo
sortstringNo

Code Examples

curl

curl -X POST https://subscraper.dev/api/v1/post \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.reddit.com/r/programming/comments/12345/best_languages/",
    "commentLimit": 10,
    "sort": "top"
  }'

TypeScript SDK

const thread = await client.getPost({
  url: "https://www.reddit.com/r/programming/comments/12345/best_languages/",
  commentLimit: 10,
  sort: "top"
});
Install the SDK →

Sample Response

{
  "post": {
    "id": "t3_12345",
    "title": "What are the best programming languages to learn in 2024?",
    "body": "I am a beginner and wondering where to start...",
    "author": "coding_newbie",
    "subreddit": "programming",
    "score": 1205,
    "upvoteRatio": 0.95
  },
  "comments": [
    {
      "id": "t1_abcde",
      "author": "senior_dev",
      "body": "I highly recommend starting with Python or JavaScript.",
      "score": 450,
      "replies": [
        {
          "id": "t1_abcdf",
          "author": "coding_newbie",
          "body": "Thanks! Why Python over JS?",
          "score": 15,
          "replies": []
        }
      ]
    }
  ]
}

Common Use Cases

  • Scraping discussion threads for AI context
  • Extracting Q&A pairs from AMA (Ask Me Anything) threads
  • Analyzing community reactions to news/announcements
  • Archiving important threads

Credits

Each call to /api/v1/post uses 1 credit. Free tier includes 30 credits. View pricing →

Related Tools & Guides

All developer tools →

Related Endpoints

Start using /post now

Free tier — 30 requests, no credit card required.