Skip to content
Navigation

Look Up Posts by ID (Alias)

GET /v1/reddit/posts/by_id
1 credit per request Permission: reddit:read

Alias for /v1/reddit/by_id. Looks up to 100 posts by fullname (t3_), bare ID, or URL.

Authorization

  • bearerAuth: optional HTTP
  • apiKeyAuth: optional API key in header

Query parameters

  • ids: required string

    Comma-separated list of up to 100 Reddit post IDs or URLs.

Returns

200

The requested posts.

JSON
  • items: required array ofobject
    • kind: required post|comment
    • post: optional object
      • id: optional string
      • name: optional string
      • domain: optional string
      • is_self: optional boolean
      • flair: optional string
      • spoiler: optional boolean
      • stickied: optional boolean
      • locked: optional boolean
      • removed: optional boolean
      • subreddit: optional string
      • title: optional string
      • author: optional string
      • score: optional integer
      • upvote_ratio: optional number
      • num_comments: optional integer
      • url: optional string
      • selftext: optional string
      • created_at: optional string
        format: date-time
      • is_video: optional boolean
      • over_18: optional boolean
      • media: optional array ofobject
        • type: optional image|video|gallery
        • url: optional string
        • width: optional integer
        • height: optional integer
        • caption: optional string
      • poll: optional object
        • total_votes: optional integer
        • is_closed: optional boolean
        • options: optional array ofobject
          • id: optional string
          • text: optional string
          • vote_count: optional integer
      • crosspost_of: optional object
        • id: optional string
        • subreddit: optional string
        • title: optional string
        • author: optional string
      • comments: optional array ofobject
        • id: optional string
        • parent_id: optional string

          t3_<post id> for a top-level comment, t1_<comment id> for a reply.

        • author: optional string
        • score: optional integer
        • body: optional string
        • created_at: optional string
          format: date-time
        • depth: optional integer
        • is_submitter: optional boolean

          Written by the original poster.

        • controversy: optional integer
        • replies: optional array ofobject
          • id: optional string
          • parent_id: optional string

            t3_<post id> for a top-level comment, t1_<comment id> for a reply.

          • author: optional string
          • score: optional integer
          • body: optional string
          • created_at: optional string
            format: date-time
          • depth: optional integer
          • is_submitter: optional boolean

            Written by the original poster.

          • controversy: optional integer
          • replies: optional array ofobject
    • comment: optional object
      • id: optional string
      • name: optional string
      • post_id: optional string
      • post_title: optional string
      • subreddit: optional string
      • author: optional string
      • score: optional integer
      • body: optional string
      • created_at: optional string
        format: date-time
      • parent_id: optional string
      • is_submitter: optional boolean
      • controversiality: optional integer
  • missing: required array ofstring

400

Bad request (invalid parameter or unknown action)
JSON

One of the following:

  • ErrorResponse
    • error: required string

      Human-readable error message

    • error_code: optional forbidden_scope|rate_limited|daily_quota_exceeded|insufficient_credits|duplicate_transaction

      Machine-readable error code. Known values include: forbidden_scope, rate_limited, daily_quota_exceeded, insufficient_credits, duplicate_transaction. Additional codes may be introduced in future releases.

  • Error
    • error: required object
      • code: required string
      • message: required string
      • retryable: required boolean
      • retry_after: optional integer

        Seconds to wait before retrying.

401

Missing or invalid API key or OAuth access token
JSON

One of the following:

  • ErrorResponse
    • error: required string

      Human-readable error message

    • error_code: optional forbidden_scope|rate_limited|daily_quota_exceeded|insufficient_credits|duplicate_transaction

      Machine-readable error code. Known values include: forbidden_scope, rate_limited, daily_quota_exceeded, insufficient_credits, duplicate_transaction. Additional codes may be introduced in future releases.

  • Error
    • error: required object
      • code: required string
      • message: required string
      • retryable: required boolean
      • retry_after: optional integer

        Seconds to wait before retrying.

402

The account has no credits left (insufficient_credits).
JSON
  • error: required object
    • code: required string
    • message: required string
    • retryable: required boolean
    • retry_after: optional integer

      Seconds to wait before retrying.

429

Rate limit or daily request quota exceeded
JSON

One of the following:

  • ErrorResponse
    • error: required string

      Human-readable error message

    • error_code: optional forbidden_scope|rate_limited|daily_quota_exceeded|insufficient_credits|duplicate_transaction

      Machine-readable error code. Known values include: forbidden_scope, rate_limited, daily_quota_exceeded, insufficient_credits, duplicate_transaction. Additional codes may be introduced in future releases.

  • Error
    • error: required object
      • code: required string
      • message: required string
      • retryable: required boolean
      • retry_after: optional integer

        Seconds to wait before retrying.

503

A temporary problem reaching Reddit (upstream_busy, upstream_timeout, upstream_error). Retry shortly; nothing was billed.
JSON
  • error: required object
    • code: required string
    • message: required string
    • retryable: required boolean
    • retry_after: optional integer

      Seconds to wait before retrying.

Type to search…

↑↓ navigate ↵ select Esc close