> ## 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 Search

> Search within a subreddit for posts, comments, or media matching a query

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


## OpenAPI

````yaml GET /v1/scrape/reddit/subreddit/search
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/search:
    get:
      tags:
        - reddit
      summary: Subreddit Search
      description: Search within a subreddit for posts, comments, or media matching a query
      operationId: reddit_Subreddit_Search
      parameters:
        - name: subreddit
          in: query
          description: Subreddit name (e.g. 'Fitness', not 'r/Fitness' or a full URL)
          required: true
          schema:
            type: string
            example: Fitness
        - name: query
          in: query
          description: Search query to find matching content
          required: false
          schema:
            type: string
            example: push ups
        - name: filter
          in: query
          description: >-
            Type of content to search for (default: posts). Response will only
            include the matching key
          required: false
          schema:
            type: string
            enum:
              - posts
              - comments
              - media
            example: posts
        - name: sort
          in: query
          description: >-
            Sort order. For posts/media: relevance, hot, top, new, comments. For
            comments: relevance, top, new
          required: false
          schema:
            type: string
            enum:
              - relevance
              - hot
              - top
              - new
              - comments
            example: relevance
        - name: timeframe
          in: query
          description: Timeframe to filter results
          required: false
          schema:
            type: string
            enum:
              - all
              - year
              - month
              - week
              - day
              - hour
            example: all
        - name: cursor
          in: query
          description: Cursor for pagination. Get 'cursor' from previous response
          required: false
          schema:
            type: string
      responses:
        '200':
          description: >-
            Successful response with search results


            **Key Response Fields:**

            - `data.posts[n].id`: Reddit fullname of the post (e.g.
            `t3_1o09lhe`)

            - `data.posts[n].title`: Title text of the post

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

            - `data.posts[n].votes`: Net upvote count

            - `data.posts[n].num_comments`: Number of comments on the post

            - `data.posts[n].created_at_iso`: ISO 8601 creation timestamp

            - `data.posts[n].subreddit.name`: Name of the subreddit the post
            belongs to

            - `data.cursor`: Base64 pagination cursor — pass as `cursor` param
            to retrieve the next page
          content:
            application/json:
              example:
                success: true
                data:
                  success: true
                  posts:
                    '0':
                      id: t3_1o09lhe
                      post_id: t3_1o09lhe
                      title: Daily Simple Questions Thread - October 07, 2025
                      url: >-
                        https://www.reddit.com/r/Fitness/comments/1o09lhe/daily_simple_questions_thread_october_07_2025/
                      permalink: >-
                        /r/Fitness/comments/1o09lhe/daily_simple_questions_thread_october_07_2025/
                      nsfw: false
                      spoiler: false
                      is_crosspost: false
                      subreddit:
                        id: t5_2qhx4
                        name: Fitness
                        nsfw: false
                        quarantined: false
                        icon: >-
                          https://b.thumbs.redditmedia.com/Ted4KOMuRbaCYlDS55cTqjpVVZ2ENHKtYFbBFjI1i2o.png
                        banner: null
                        description: >-
                          A place for the pursuit of physical fitness goals.


                          Please see the r/Fitness Wiki and FAQ at
                          https://thefitness.wiki for help with common
                          questions.
                        weekly_visitors: 913382
                        weekly_contributions: 2229
                      votes: 22
                      num_comments: 128
                      created_at: 2025-10-07T09:01:26.103000+0000
                      created_at_iso: '2025-10-07T09:01:26.103Z'
                      thumbnail: null
                      thumbnail_blurred: false
                      position: 0
                      relative_position: 0
                  cursor: >-
                    eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiM1wiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIzXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfN19wb3N0X3NlYXJjaFwiOlwiN1wiLFwic2VjdGlvbl8zX3BpcGVsaW5lXzBfc2lkZWJhcl9jb21tdW5pdHlfaW5mb1wiOlwiMFwifSIsImV4cGVyaWVuY2Vfc2VsZWN0aW9uIjoicG9zdF93aXRoX2NvbW11bml0eV9zaWRlYmFyIiwiZXhwZXJpZW5jZV92ZXJzaW9uIjoiZGVmYXVsdCIsInNlY3Rpb25fMl9waXBlbGluZV83X3Bvc3Rfc2VhcmNoIjoiNyJ9
                credits_used: 1
        '400':
          description: Bad Request - Missing or invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: >-
                      Subreddit name is required (e.g. 'Fitness', not
                      'r/Fitness')
        '402':
          description: Payment Required - Insufficient credits
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Insufficient credits
                  required:
                    type: integer
                    example: 1
                  available:
                    type: integer
                    example: 0
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).

````