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

# Read a public subreddit feed

> Loads public posts up to the requested limit within a bounded read and includes available subreddit rules. Results remain partial; no client pagination.



## OpenAPI

````yaml https://api.vexqo.dev/openapi.json get /reddit/r/{subreddit}/posts
openapi: 3.1.0
info:
  title: Vexqo API
  description: >-
    Public Meta Ad Library, Reddit, Hacker News, Product Hunt, eBay, TikTok and
    Instagram data. Authenticate with X-API-Key. Follow response links for
    related resources and supported pagination; each collection request can use
    credits. Social lookups are fresh by default; max_age explicitly allows
    cached public data.
  version: 0.1.0
servers:
  - url: https://api.vexqo.dev
security: []
paths:
  /reddit/r/{subreddit}/posts:
    get:
      tags:
        - Reddit
      summary: Read a public subreddit feed
      description: >-
        Loads public posts up to the requested limit within a bounded read and
        includes available subreddit rules. Results remain partial; no client
        pagination.
      operationId: subreddit_posts_reddit_r__subreddit__posts_get
      parameters:
        - name: subreddit
          in: path
          required: true
          schema:
            type: string
            title: Subreddit
        - name: sort
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sort
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 10
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedditResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    RedditResponse:
      properties:
        operation:
          type: string
          enum:
            - search
            - subreddit
            - post
          title: Operation
        posts:
          items:
            $ref: >-
              #/components/schemas/src__adapters__inbound__http__reddit_contract__Post
          type: array
          maxItems: 100
          title: Posts
        comments:
          items:
            $ref: >-
              #/components/schemas/src__adapters__inbound__http__reddit_contract__Comment
          type: array
          maxItems: 50
          title: Comments
        subreddit_rules:
          anyOf:
            - items:
                $ref: '#/components/schemas/SubredditRule'
              type: array
              maxItems: 100
            - type: 'null'
          title: Subreddit Rules
        partial:
          type: boolean
          title: Partial
        has_more:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has More
        stopping_reason:
          type: string
          enum:
            - empty
            - visible_page_only
            - limit_reached
            - load_timeout
          title: Stopping Reason
        sort:
          type: string
          title: Sort
        source:
          $ref: >-
            #/components/schemas/src__adapters__inbound__http__reddit_contract__Source
        posts_returned:
          type: integer
          minimum: 0
          title: Posts Returned
          default: 0
        comments_returned:
          type: integer
          minimum: 0
          title: Comments Returned
          default: 0
        links:
          additionalProperties:
            anyOf:
              - type: string
              - type: 'null'
          type: object
          title: Links
      additionalProperties: false
      type: object
      required:
        - operation
        - posts
        - comments
        - partial
        - has_more
        - stopping_reason
        - sort
        - source
      title: RedditResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    src__adapters__inbound__http__reddit_contract__Post:
      properties:
        id:
          type: string
          pattern: ^[a-z0-9]{3,16}$
          title: Id
        url:
          type: string
          title: Url
        title:
          type: string
          minLength: 1
          title: Title
        body:
          anyOf:
            - type: string
            - type: 'null'
          title: Body
        excerpt:
          anyOf:
            - type: string
            - type: 'null'
          title: Excerpt
        status:
          type: string
          enum:
            - available
            - removed
            - deleted
            - body_unavailable
          title: Status
        subreddit:
          anyOf:
            - type: string
            - type: 'null'
          title: Subreddit
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
        score:
          anyOf:
            - type: integer
            - type: 'null'
          title: Score
        comment_count:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Comment Count
        links:
          additionalProperties:
            type: string
          type: object
          title: Links
      additionalProperties: false
      type: object
      required:
        - id
        - url
        - title
        - body
        - status
        - subreddit
        - author
        - score
        - comment_count
      title: Post
    src__adapters__inbound__http__reddit_contract__Comment:
      properties:
        id:
          type: string
          pattern: ^t1_[a-z0-9]+$
          title: Id
        parent_id:
          anyOf:
            - type: string
              pattern: ^t[13]_[a-z0-9]+$
            - type: 'null'
          title: Parent Id
        body:
          anyOf:
            - type: string
            - type: 'null'
          title: Body
        status:
          type: string
          enum:
            - available
            - removed
            - deleted
            - body_unavailable
          title: Status
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
        score:
          anyOf:
            - type: integer
            - type: 'null'
          title: Score
      additionalProperties: false
      type: object
      required:
        - id
        - parent_id
        - body
        - status
        - author
        - score
      title: Comment
    SubredditRule:
      properties:
        number:
          type: integer
          minimum: 1
          title: Number
        title:
          type: string
          minLength: 1
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
      additionalProperties: false
      type: object
      required:
        - number
        - title
        - description
      title: SubredditRule
    src__adapters__inbound__http__reddit_contract__Source:
      properties:
        platform:
          type: string
          const: reddit
          title: Platform
        method:
          type: string
          enum:
            - rendered_public_page
            - http_public_page
          title: Method
        url:
          type: string
          title: Url
        observed_at:
          type: string
          title: Observed At
      additionalProperties: false
      type: object
      required:
        - platform
        - method
        - url
        - observed_at
      title: Source
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.