Search APIs
Loading…
← API Store
Social

Reddit

Reddit

Subreddit posts

GET /reddit/v1/subreddit
Test this endpoint

Pass the same sort and time with the cursor. Pass next_cursor back as cursor for the next posts. next_cursor is null on the last page. flair, nsfw and domain filter the posts of the feed page (about 25); with any of them the answer adds applied_filters and page_count (posts on the page before filtering). Keep following next_cursor for more matches. Every response includes credits_used: the credits this call cost.

Each call costs 1 credits; failed calls are free. Run it in the console playground to see a live result.

Parameters

NameTypeDescription
subredditrequiredstring Example: python
sorthot | new | top | rising | controversial | bestFeed order: hot (default), new, top, rising, controversial, best. Example: hot
timehour | day | week | month | year | allTime range for top/controversial: hour, day (default), week, month, year, all.
cursorstringCursor from `next_cursor` on the previous response; `next_cursor` is null on the last page.
flairstringOnly posts whose flair contains this text (case-insensitive), e.g. discussion.
nsfwexclude | onlyexclude: leave out NSFW posts; only: NSFW posts only.
domainstringOnly posts linking to this domain (or its subdomains), e.g. github.com, i.redd.it, or self.python for text posts.

Every endpoint also takes: raw、fields、fresh、output、records

{
  "cached": false,
  "count": 24,
  "credits_used": 1,
  "next_cursor": "dDNfMXg4OWJucQ==",
  "posts": [
    {
      "archived": false,
      "attributes": {
        "author": "Key-Koala-8259",
        "author-id": "t2_2dvo4lstj5",
        "award-count": "0",
        "class": "block relative cursor-pointer group bg-neutral-background focus-within:bg-neutral-background-hover hover:bg-neutral-background-hover xs:roun…",
        "comment-count": "4",
        "content-href": "https://www.reddit.com/r/Python/comments/1xdgdc2/litellm_11070_on_pypi_was_malicious_oct_21_it/",
        "created-timestamp": "2026-10-23T14:57:54.148000+0000",
        "data-expected-lcp": true,
        "data-ks-item": true,
        "domain": "self.Python",
        "feedIndex": "25",
        "hide-awards-button": true,
        "icon": "https://styles.redditmedia.com/t5_hqiqf2/styles/profileIcon_ao50kv39kozg1.jpeg?width=64&height=64&frame=1&auto=webp&crop=64%3A64%2Csmart&s=9…",
        "id": "t3_1xdgdc2",
        "is-ama": true,
        "is-awardable": true,
        "is-desktop-viewport": true,
        "is-embeddable": true,
        "is-slim-card": true,
        "moderation-verdict": "",
        "pdp-target": "_self",
        "permalink": "/r/Python/comments/1xdgdc2/litellm_11070_on_pypi_was_malicious_oct_21_it/",
        "post-language": "en",
        "post-title": "LiteLLM 1.107.0 on PyPI was malicious (Oct 21): it runs on every Python start via a .pth file.",
        "post-type": "multi_media",
        "score": "13",
        "subreddit-id": "t5_2qh0y",
        "subreddit-name": "Python",
        "subreddit-prefixed-name": "r/Python",
        "upvote-ratio": "0.7407407407407407",
        "view-context": "SubredditFeed",
        "view-type": "cardView"
      },
      "author": "Key-Koala-8259",
      "author_icon": "https://styles.redditmedia.com/t5_hqiqf2/styles/profileIcon_ao50kv39kozg1.jpeg?width=64&height=64&frame=1&auto=webp&crop=64%3A64%2Csmart&s=9…",
      "author_id": "t2_2dvo4lstj5",
      "author_profile": null,
      "award_count": 0,
      "comment_count": 4,
      "comments": "4",
      "content_url": "https://www.reddit.com/r/Python/comments/1xdgdc2/litellm_11070_on_pypi_was_malicious_oct_21_it/",
      "created_at": "2026-10-23T14:57:54.148000+0000",
      "domain": "self.Python",
      "feed_index": 25,
      "flair": "News",
      "flairs": [
        "News"
      ],
      "id": "t3_1xdgdc2",
      "images": [],
      "language": "en",
      "locked": false,
      "media": [],
      "nsfw": false,
      "permalink": "/r/Python/comments/1xdgdc2/litellm_11070_on_pypi_was_malicious_oct_21_it/",
      "post_type": "multi_media",
      "score": "13",
      "score_value": 13,
      "spoiler": false,
      "stickied": false,
      "subreddit": "Python",
      "subreddit_id": "t5_2qh0y",
      "subreddit_prefixed": "r/Python",
      "text": "I wrote this up. How to check safely and what to rotate\nShort version: if you installed an unpinned litellm between 11:39 and 13:23 UTC on O…",
      "text_html": "<p>\n      I wrote this up. <object role=\"none\"><a rpl class=\"relative pointer-events-auto a\n  \n  \n  \n  \n  underline\n  \n  cursor-pointer\" hre…",
      "title": "LiteLLM 1.107.0 on PyPI was malicious (Oct 21): it runs on every Python start via a .pth file.",
      "upvote_ratio": 0.7407407407407407,
      "url": "https://www.reddit.com/r/Python/comments/1xdgdc2/litellm_11070_on_pypi_was_malicious_oct_21_it/"
    },
    {
      "archived": false,
      "attributes": {
        "author": "Positive-Food-9915",
        "author-id": "t2_cu56o0k2",
        "award-count": "0",
        "class": "block relative cursor-pointer group bg-neutral-background focus-within:bg-neutral-background-hover hover:bg-neutral-background-hover xs:roun…",
        "comment-count": "6",
        "content-href": "https://www.reddit.com/r/Python/comments/1xdlm9d/tried_decouple_dynaconf_pydanticsettings_and_more/",
        "created-timestamp": "2026-10-23T18:14:09.503000+0000",
        "data-expected-lcp": true,
        "data-ks-item": true,
        "domain": "self.Python",
        "feedIndex": "27",
        "hide-awards-button": true,
        "icon": "https://preview.redd.it/snoovatar/avatars/fd0aae32-645e-4d4d-838a-cd3a11467e13-headshot.png?width=64&height=64&crop=smart&auto=webp&s=24330d…",
        "id": "t3_1xdlm9d",
        "is-awardable": true,
        "is-desktop-viewport": true,
        "is-embeddable": true,
        "moderation-verdict": "",
        "pdp-target": "_self",
        "permalink": "/r/Python/comments/1xdlm9d/tried_decouple_dynaconf_pydanticsettings_and_more/",
        "post-language": "en",
        "post-title": "Tried decouple, Dynaconf, pydantic-settings and more: still hitting the same config gaps. Just me?",
        "post-type": "text",
        "score": "4",
        "subreddit-id": "t5_2qh0y",
        "subreddit-name": "Python",
        "subreddit-prefixed-name": "r/Python",
        "upvote-ratio": "0.7",
        "view-context": "SubredditFeed",
        "view-type": "cardView"
      },
      "author": "Positive-Food-9915",
      "author_icon": "https://preview.redd.it/snoovatar/avatars/fd0aae32-645e-4d4d-838a-cd3a11467e13-headshot.png?width=64&height=64&crop=smart&auto=webp&s=24330d…",
      "author_id": "t2_cu56o0k2",
      "author_profile": null,
      "award_count": 0,
      "comment_count": 6,
      "comments": "6",
      "content_url": "https://www.reddit.com/r/Python/comments/1xdlm9d/tried_decouple_dynaconf_pydanticsettings_and_more/",
      "created_at": "2026-10-23T18:14:09.503000+0000",
      "domain": "self.Python",
      "feed_index": 27,
      "flair": "Discussion",
      "flairs": [
        "Discussion"
      ],
      "id": "t3_1xdlm9d",
      "images": [],
      "language": "en",
      "locked": false,
      "media": [],
      "nsfw": false,
      "permalink": "/r/Python/comments/1xdlm9d/tried_decouple_dynaconf_pydanticsettings_and_more/",
      "post_type": "text",
      "score": "4",
      "score_value": 4,
      "spoiler": false,
      "stickied": false,
      "subreddit": "Python",
      "subreddit_id": "t5_2qh0y",
      "subreddit_prefixed": "r/Python",
      "text": "I've tried a bunch of config tools over the years, including python-decouple, Dynaconf and pydantic-settings. Each one is good at its job, b…",
      "text_html": "<p>\n      I&#39;ve tried a bunch of config tools over the years, including python-decouple, Dynaconf and pydantic-settings. Each one is good…",
      "title": "Tried decouple, Dynaconf, pydantic-settings and more: still hitting the same config gaps. Just me?",
      "upvote_ratio": 0.7,
      "url": "https://www.reddit.com/r/Python/comments/1xdlm9d/tried_decouple_dynaconf_pydanticsettings_and_more/"
    },
    "… 22 more"
  ],
  "subreddit": "python"
}
Response fields (76)

Field paths and types observed in the sample response; the live response is authoritative.

$object
$.cachedboolean
$.countinteger
$.credits_usedinteger
$.next_cursorstring
$.postsarray
$.posts[]object | string
$.posts[].archivedboolean
$.posts[].attributesobject
$.posts[].attributes.authorstring
$.posts[].attributes.author-idstring
$.posts[].attributes.award-countstring
$.posts[].attributes.classstring
$.posts[].attributes.comment-countstring
$.posts[].attributes.content-hrefstring
$.posts[].attributes.created-timestampstring
$.posts[].attributes.data-expected-lcpboolean
$.posts[].attributes.data-ks-itemboolean
$.posts[].attributes.domainstring
$.posts[].attributes.feedIndexstring
$.posts[].attributes.hide-awards-buttonboolean
$.posts[].attributes.iconstring
$.posts[].attributes.idstring
$.posts[].attributes.is-amaboolean
$.posts[].attributes.is-awardableboolean
$.posts[].attributes.is-desktop-viewportboolean
$.posts[].attributes.is-embeddableboolean
$.posts[].attributes.is-slim-cardboolean
$.posts[].attributes.moderation-verdictstring
$.posts[].attributes.pdp-targetstring
$.posts[].attributes.permalinkstring
$.posts[].attributes.post-languagestring
$.posts[].attributes.post-titlestring
$.posts[].attributes.post-typestring
$.posts[].attributes.scorestring
$.posts[].attributes.subreddit-idstring
$.posts[].attributes.subreddit-namestring
$.posts[].attributes.subreddit-prefixed-namestring
$.posts[].attributes.upvote-ratiostring
$.posts[].attributes.view-contextstring
$.posts[].attributes.view-typestring
$.posts[].authorstring
$.posts[].author_iconstring
$.posts[].author_idstring
$.posts[].author_profilenull
$.posts[].award_countinteger
$.posts[].comment_countinteger
$.posts[].commentsstring
$.posts[].content_urlstring
$.posts[].created_atstring
$.posts[].domainstring
$.posts[].feed_indexinteger
$.posts[].flairstring
$.posts[].flairsarray
$.posts[].flairs[]string
$.posts[].idstring
$.posts[].imagesarray
$.posts[].languagestring
$.posts[].lockedboolean
$.posts[].mediaarray
$.posts[].nsfwboolean
$.posts[].permalinkstring
$.posts[].post_typestring
$.posts[].scorestring
$.posts[].score_valueinteger
$.posts[].spoilerboolean
$.posts[].stickiedboolean
$.posts[].subredditstring
$.posts[].subreddit_idstring
$.posts[].subreddit_prefixedstring
$.posts[].textstring
$.posts[].text_htmlstring
$.posts[].titlestring
$.posts[].upvote_rationumber
$.posts[].urlstring
$.subredditstring