> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sociavault.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Subreddit Posts

> Get recent posts from a subreddit with engagement metrics

<Note>
  💳 **1 credit** per request
</Note>


## OpenAPI

````yaml GET /v1/scrape/reddit/subreddit
openapi: 3.1.0
info:
  title: SociaVault API
  version: 1.0.0
  description: >-
    # SociaVault API Documentation


    The SociaVault API provides comprehensive access to social media data
    extraction across multiple platforms.


    ## Features


    - **Multi-Platform Support**: TikTok, Instagram, YouTube, Facebook, Twitter,
    Reddit, Threads, and more

    - **Credit-Based System**: Pay-as-you-go pricing with transparent credit
    costs

    - **High Performance**: Fast, reliable data extraction

    - **Comprehensive Data**: Detailed user profiles, videos, posts, comments,
    and analytics


    ## Authentication


    All API requests require authentication using an API key in the `X-API-Key`
    header:


    ```bash

    X-API-Key: sk_live_your_api_key_here

    ```


    Get your API key from the [SociaVault
    Dashboard](https://sociavault.com/dashboard).


    ## Credits


    Each endpoint consumes credits based on data complexity:

    - Simple requests (profiles): 1 credit

    - Complex requests (demographics): 20+ credits

    - Paginated requests: Credits per page


    Check your credit balance in the dashboard or via the API.


    ## Support


    - **Documentation**: https://docs.sociavault.com

    - **Email**: support@sociavault.com

    - **Discord**: https://discord.gg/sociavault
  contact:
    name: SociaVault Support
    email: support@sociavault.com
    url: https://sociavault.com/support
  license:
    name: Commercial
    url: https://sociavault.com/terms
servers:
  - url: https://api.sociavault.com
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: account
    description: Account management and credit balance
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/account
  - name: tiktok
    description: Scrape TikTok profiles, videos, and more
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/tiktok
  - name: tiktok-shop
    description: Everything about TikTok Shop
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/tiktok-shop
  - name: instagram
    description: Gets Instagram profiles, posts, and reels
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/instagram
  - name: youtube
    description: Scrape YouTube channels, videos, and more
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/youtube
  - name: linkedin
    description: Scrape LinkedIn
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/linkedin
  - name: facebook
    description: Get public Facebook profiles and posts
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/facebook
  - name: facebookAdLibrary
    description: Scrapes the Facebook (Meta) Ad Library
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/facebookAdLibrary
  - name: facebookMarketplace
    description: Search Facebook Marketplace and pull full listing details
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/facebookMarketplace
  - name: googleAdLibrary
    description: >-
      Scrape the Google Ad Transparency Library. *This only gets the public ads.
      Some ads you need to log in for and sadly we can't get those. Also, since
      there are so many variations, the return types might not all be 100% the
      same.
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/googleAdLibrary
  - name: linkedinAdLibrary
    description: Search the LinkedIn Ad Library
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/linkedinAdLibrary
  - name: twitter
    description: Get Twitter profiles, tweets, followers and more
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/twitter
  - name: reddit
    description: Scrape Reddit posts and comments
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/reddit
  - name: threads
    description: Get Threads posts
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/threads
  - name: google
    description: Scrape Google search results
    externalDocs:
      description: Learn more
      url: https://docs.sociavault.com/platforms/google
paths:
  /v1/scrape/reddit/subreddit:
    get:
      tags:
        - reddit
      summary: Subreddit Posts
      description: Get recent posts from a subreddit with engagement metrics
      operationId: reddit_Subreddit_Posts
      parameters:
        - name: subreddit
          in: query
          description: Subreddit name
          required: true
          schema:
            type: string
        - name: timeframe
          in: query
          description: Timeframe to get posts from.
          required: false
          schema:
            type: string
            enum:
              - all
              - day
              - week
              - month
              - year
        - name: sort
          in: query
          description: Sort order.
          required: false
          schema:
            type: string
            enum:
              - best
              - hot
              - new
              - top
              - rising
        - name: after
          in: query
          description: After to get more posts. Get 'after' from previous response.
          required: false
          schema:
            type: string
            example: t3_1234567890
        - name: trim
          in: query
          description: Set to true for a trimmed down version of the response
          required: false
          schema:
            type: boolean
            example: false
      responses:
        '200':
          description: >-
            Successful response


            **Key Response Fields:**

            - `data.posts[n].id`: Short Reddit post ID

            - `data.posts[n].title`: Post title text

            - `data.posts[n].author`: Reddit username of the poster

            - `data.posts[n].subreddit`: Name of the subreddit

            - `data.posts[n].score`: Net upvote score

            - `data.posts[n].upvote_ratio`: Ratio of upvotes vs total votes
            (0–1)

            - `data.posts[n].num_comments`: Comment count

            - `data.posts[n].url`: Full URL to the post

            - `data.posts[n].created_utc`: Unix timestamp of post creation

            - `data.posts[n].is_video`: Whether the post contains a video

            - `data.after`: Pagination cursor — pass as `after` param for the
            next page
          content:
            application/json:
              examples:
                full:
                  summary: Full Response
                  value:
                    success: true
                    data:
                      success: true
                      posts:
                        '0':
                          approved_at_utc: null
                          subreddit: AskReddit
                          selftext: ''
                          author_fullname: t2_hopuf4nq9
                          saved: false
                          mod_reason_title: null
                          gilded: 0
                          clicked: false
                          title: 'Women: What blowjob tips would you give other women?'
                          link_flair_richtext: {}
                          subreddit_name_prefixed: r/AskReddit
                          hidden: false
                          pwls: 6
                          link_flair_css_class: null
                          downs: 0
                          top_awarded_type: null
                          hide_score: false
                          name: t3_1qzdptk
                          quarantine: false
                          link_flair_text_color: dark
                          upvote_ratio: 0.81
                          author_flair_background_color: null
                          subreddit_type: public
                          ups: 4708
                          total_awards_received: 0
                          media_embed: {}
                          author_flair_template_id: null
                          is_original_content: false
                          user_reports: {}
                          secure_media: null
                          is_reddit_media_domain: false
                          is_meta: false
                          category: null
                          secure_media_embed: {}
                          link_flair_text: null
                          can_mod_post: false
                          score: 4708
                          approved_by: null
                          is_created_from_ads_ui: false
                          author_premium: false
                          thumbnail: ''
                          edited: 1770571371
                          author_flair_css_class: null
                          author_flair_richtext: {}
                          gildings: {}
                          content_categories: null
                          is_self: true
                          mod_note: null
                          created: 1770568900
                          link_flair_type: text
                          wls: 6
                          removed_by_category: null
                          banned_by: null
                          author_flair_type: text
                          domain: self.AskReddit
                          allow_live_comments: false
                          selftext_html: null
                          likes: null
                          suggested_sort: null
                          banned_at_utc: null
                          view_count: null
                          archived: false
                          no_follow: false
                          is_crosspostable: false
                          pinned: false
                          over_18: true
                          all_awardings: {}
                          awarders: {}
                          media_only: false
                          can_gild: false
                          spoiler: false
                          locked: false
                          author_flair_text: null
                          treatment_tags: {}
                          visited: false
                          removed_by: null
                          num_reports: null
                          distinguished: null
                          subreddit_id: t5_2qh1i
                          author_is_blocked: false
                          mod_reason_by: null
                          removal_reason: null
                          link_flair_background_color: ''
                          id: 1qzdptk
                          is_robot_indexable: true
                          report_reasons: null
                          author: workethic290
                          discussion_type: null
                          num_comments: 1774
                          send_replies: true
                          contest_mode: false
                          mod_reports: {}
                          author_patreon_flair: false
                          author_flair_text_color: null
                          permalink: >-
                            /r/AskReddit/comments/1qzdptk/women_what_blowjob_tips_would_you_give_other_women/
                          stickied: false
                          url: >-
                            https://www.reddit.com/r/AskReddit/comments/1qzdptk/women_what_blowjob_tips_would_you_give_other_women/
                          subreddit_subscribers: 57727945
                          created_utc: 1770568900
                          num_crossposts: 0
                          media: null
                          is_video: false
                      after: t3_1qzkwjb
                    creditsUsed: 1
                trimmed:
                  summary: Trimmed Response
                  value:
                    success: true
                    data:
                      success: true
                      posts:
                        '0':
                          id: 1qzdptk
                          author: workethic290
                          author_fullname: t2_hopuf4nq9
                          subreddit: AskReddit
                          title: 'Women: What blowjob tips would you give other women?'
                          selftext: ''
                          downs: 0
                          name: t3_1qzdptk
                          upvote_ratio: 0.81
                          ups: 4718
                          total_awards_received: 0
                          score: 4718
                          created: 1770568900
                          num_comments: 1778
                          url: >-
                            https://www.reddit.com/r/AskReddit/comments/1qzdptk/women_what_blowjob_tips_would_you_give_other_women/
                          subreddit_subscribers: 57727955
                          is_video: false
                          created_utc: 1770568900
                      after: t3_1qz6363
                    creditsUsed: 1
        '400':
          description: Bad Request - Invalid parameters or missing required fields
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Missing required parameter: handle'
                  endpoint:
                    type: string
                  credits_required:
                    type: integer
                required:
                  - error
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid API key
                  docs:
                    type: string
                    example: https://docs.sociavault.com/authentication
                required:
                  - error
        '402':
          description: Payment Required - Insufficient credits
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Insufficient credits
                  required:
                    type: integer
                    example: 1
                    description: Credits required for this request
                  available:
                    type: integer
                    example: 0
                    description: Credits currently available
                required:
                  - error
                  - required
                  - available
        '500':
          description: Internal Server Error - Service configuration or processing error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Service configuration error
                required:
                  - error
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: |-
        API key for authentication. Format: `sk_live_xxxxxxxxxxxxx`

        Get your API key from the [Dashboard](https://sociavault.com/dashboard).

````