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

# Get a Reddit post

> Fetch a Reddit post and its top-level comments by URL.



## OpenAPI

````yaml get /v1/reddit/post
openapi: 3.1.0
info:
  title: Scrapio
  version: 1.0.0
  description: >-
    Turn any URL into structured data. Fetch raw HTML, crawl sites, extract
    structured content, interact with dynamic pages, and search the web through
    one API.
  contact:
    name: Scrapio Support
    url: https://scrapio.dev
  license:
    name: Proprietary
servers:
  - url: https://api.scrapio.dev
    description: Production
security:
  - bearerAuth: []
tags:
  - name: System
  - name: Fetch
  - name: Crawl
  - name: Map
  - name: Interact
  - name: Search
  - name: Google
  - name: Fast Search
  - name: Jobs
  - name: YouTube
  - name: Amazon
  - name: Walmart
  - name: Booking
  - name: Agoda
  - name: Airbnb
  - name: ChatGPT
  - name: Perplexity
  - name: Gemini
  - name: Bing
  - name: Reddit
  - name: TikTok
  - name: Apple App Store
  - name: Target
  - name: Monitors
paths:
  /v1/reddit/post:
    get:
      tags:
        - Reddit
      summary: Get a Reddit post
      description: >-
        Retrieves a Reddit post and its top-level comments. Backed by our own
        maintained `reddit_post` Web Scraping API target. Requires a Starter
        plan or higher.
      operationId: getRedditPost
      parameters:
        - name: url
          in: query
          required: true
          schema:
            type: string
            format: uri
            description: Reddit post URL
      responses:
        '200':
          description: Structured Reddit post and comments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedditPostResponse'
        '400':
          description: Invalid or missing url.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Reddit dedicated endpoints require a Starter plan or higher.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The requested post could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Daily credit cap exceeded, or the upstream provider rate-limited the
            request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Reddit upstream failed or returned an unusable response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Reddit execution backend unavailable or unconfigured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl
            "https://api.scrapio.dev/v1/reddit/post?url=https%3A%2F%2Fwww.reddit.com%2Fr%2Fnba%2Fcomments%2F17jrqc5%2F"
            \
              -H "Authorization: Bearer $SCRAPIO_API_KEY"
components:
  schemas:
    RedditPostResponse:
      type: object
      properties:
        provider:
          type: string
          enum:
            - reddit
        request_id:
          type: string
        post:
          type: object
          properties:
            id:
              type: string
            title:
              type: string
            author:
              anyOf:
                - type: string
                - type: 'null'
            subreddit:
              anyOf:
                - type: string
                - type: 'null'
            subreddit_prefixed:
              anyOf:
                - type: string
                - type: 'null'
            selftext:
              anyOf:
                - type: string
                - type: 'null'
            url:
              anyOf:
                - type: string
                - type: 'null'
            permalink:
              type: string
              format: uri
            score:
              anyOf:
                - type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                - type: 'null'
            upvote_ratio:
              anyOf:
                - type: number
                - type: 'null'
            num_comments:
              anyOf:
                - type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                - type: 'null'
            created_at:
              anyOf:
                - type: string
                - type: 'null'
            over_18:
              anyOf:
                - type: boolean
                - type: 'null'
            is_video:
              anyOf:
                - type: boolean
                - type: 'null'
            thumbnail:
              anyOf:
                - type: string
                - type: 'null'
            flair:
              anyOf:
                - type: string
                - type: 'null'
            awards_count:
              anyOf:
                - type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                - type: 'null'
          required:
            - id
            - title
            - author
            - subreddit
            - subreddit_prefixed
            - selftext
            - url
            - permalink
            - score
            - upvote_ratio
            - num_comments
            - created_at
            - over_18
            - is_video
            - thumbnail
            - flair
            - awards_count
          additionalProperties: false
        comments:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              author:
                anyOf:
                  - type: string
                  - type: 'null'
              body:
                anyOf:
                  - type: string
                  - type: 'null'
              score:
                anyOf:
                  - type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  - type: 'null'
              created_at:
                anyOf:
                  - type: string
                  - type: 'null'
              permalink:
                type: string
                format: uri
              parent_id:
                anyOf:
                  - type: string
                  - type: 'null'
              link_id:
                anyOf:
                  - type: string
                  - type: 'null'
            required:
              - id
              - author
              - body
              - score
              - created_at
              - permalink
              - parent_id
              - link_id
            additionalProperties: false
      required:
        - provider
        - request_id
        - post
        - comments
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
        diagnostics:
          type: object
          properties:
            outcome:
              type: string
              enum:
                - failed
            retryable:
              type: boolean
            blocked:
              type: boolean
            timed_out:
              type: boolean
          required:
            - outcome
            - retryable
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````