---
title: "How to get Reddit data"
description: "Get subreddit posts, full comment threads, search and user history as Reddit’s own JSON, now that the Data API is closing. The timeline, working code, a real response and prices."
canonical_url: https://groundsocial.dev/guides/how-to-get-reddit-data
---
# How to get Reddit data

> Get subreddit posts, full comment threads, search and user history as Reddit’s own JSON, now that the Data API is closing. The timeline, working code, a real response and prices.

_Checked 2026-11-27._

Reddit stopped accepting new Data API apps on 31 October 2026 and ends public access in March 2027. A data API that reads public Reddit for you returns the same Things and Listings reddit.com’s JSON does, so existing parsers and PRAW keep working. A page of up to 100 subreddit posts is 1 credit.

> **Checked 27 November 2026** Every request on this page was run against the live API on that date, and the sample response is from that run. Official-API facts link to the platform’s own pages.

## The official Reddit API

Reddit’s Data API is closing to the public. Reddit announced the timeline on 30 September 2026:

- **31 October 2026**: no new requests for public Data API access are accepted.
- **12 January 2027**: access is removed for approved apps and bots that have not registered.
- **March 2027**: public API access ends.
- Until then, existing apps keep the free tier of 100 queries a minute per OAuth client, averaged over 10 minutes. Commercial pricing was only ever by private agreement.

Sources: [TechCrunch, 30 Sep 2026](https://techcrunch.com/2026/09/30/reddit-is-killing-rss-feeds-ending-public-api-access-because-of-ai-bots/), [Reddit Data API Wiki](https://support.reddithelp.com/hc/en-us/articles/16160319875092-Reddit-Data-API-Wiki).

## Quick start

1. **Get a key.** [Sign up](https://groundsocial.dev/app/sign-in?new=1) with an email code: 100 free credits, no card. An agent can sign itself up with `POST https://api.groundsocial.dev/v1/agent/signup`.
2. **Set it in your shell.** `export GROUNDSOCIAL_API_KEY=gs_live_…`
3. **Make the call.** A subreddit’s posts: `GET /v1/reddit/subreddits/LocalLLaMA/posts`, 1 credit.

cURL:

```bash
curl "https://api.groundsocial.dev/v1/reddit/subreddits/LocalLLaMA/posts?sort=new&limit=25" \
  -H "Authorization: Bearer $GROUNDSOCIAL_API_KEY"
```

TypeScript:

```ts
const res = await fetch('https://api.groundsocial.dev/v1/reddit/subreddits/LocalLLaMA/posts?sort=new&limit=25', {
  headers: { Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}` },
})
if (!res.ok) throw new Error((await res.json()).error.hint)
const data = await res.json()
```

Python:

```python
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/reddit/subreddits/LocalLLaMA/posts?sort=new&limit=25",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
```

## Sample response

Trimmed from the real response on 27 November 2026: lists cut to their first items and long strings shortened. Every field is described in the [tutorial](https://groundsocial.dev/tutorials/reddit/subreddit-posts/python).

```json
{
  "kind": "Listing",
  "data": {
    "after": "t3_1y68f63",
    "dist": 24,
    "children": [
      {
        "kind": "t3",
        "data": {
          "id": "1y6h57r",
          "name": "t3_1y6h57r",
          "title": "Nvidia halts chip shipments to South-East Asia amid US crackdown",
          "author": "fallingdowndizzyvr",
          "subreddit": "LocalLLaMA",
          "subreddit_name_prefixed": "r/LocalLLaMA",
          "permalink": "/r/LocalLLaMA/comments/1y6h57r/nvidia_halts_chip_shipments_to_southeast_asia/",
          "url": "https://www.thenationalnews.com/future/technology/2026/11/26/nvidia-halts-chip-shipments-to-south-east-asia-amid-us-crackdown/",
          "domain": "thenationalnews.com",
          "created_utc": 1795743693,
          "score": 23
        }
      }
    ]
  }
}
```

## Get every page

`/v1/reddit/subreddits/LocalLLaMA/posts` returns posts a page at a time, and each page costs 1 credit. Pass the response’s `data.after` back as `after` until it runs out.

TypeScript:

```ts
// Collect up to 5 pages of posts.
const first = 'https://api.groundsocial.dev/v1/reddit/subreddits/LocalLLaMA/posts?sort=top&t=month&limit=100'
const items: unknown[] = []
let cursor: string | undefined
for (let page = 0; page < 5; page++) {
  const url = new URL(first)
  if (cursor) url.searchParams.set('after', cursor)
  const res = await fetch(url, {
    headers: { Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}` },
  })
  if (!res.ok) throw new Error((await res.json()).error.hint)
  const data = await res.json()
  items.push(...(data.data?.children ?? []))
  cursor = data.data?.after ?? undefined
  if (!cursor) break
}
console.log(items.length, 'posts')
```

Python:

```python
import os, requests

# Collect up to 5 pages of posts.
FIRST = "https://api.groundsocial.dev/v1/reddit/subreddits/LocalLLaMA/posts?sort=top&t=month&limit=100"
headers = {"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"}
items, cursor = [], None
for page in range(5):
    params = {"after": cursor} if cursor else {}
    res = requests.get(FIRST, params=params, headers=headers)
    res.raise_for_status()
    data = res.json()
    items += (data.get("data") or {}).get("children") or []
    cursor = (data.get("data") or {}).get("after")
    if not cursor:
        break
print(len(items), "posts")
```

## What else you can get from Reddit

| What you get | Endpoint | Credits |
| --- | --- | --- |
| [A subreddit’s posts](https://groundsocial.dev/tutorials/reddit/subreddit-posts/python) | `GET /v1/reddit/subreddits/LocalLLaMA/posts` | 1 |
| [A post with its comment tree](https://groundsocial.dev/tutorials/reddit/thread-comments/python) | `GET /v1/reddit/posts/1xtaf06` | 1 |
| [A whole thread, every branch](https://groundsocial.dev/tutorials/reddit/full-comment-tree/python) | `GET /v1/reddit/posts/1xtaf06/thread` | 5 |
| [Search posts](https://groundsocial.dev/tutorials/reddit/search/python) | `GET /v1/reddit/search/posts` | 2 |
| [Search comments](https://groundsocial.dev/tutorials/reddit/comment-search/python) | `GET /v1/reddit/search/comments` | 2 |
| [Subscribers and description](https://groundsocial.dev/tutorials/reddit/subreddit/python) | `GET /v1/reddit/subreddits/LocalLLaMA` | 1 |
| [A user’s comments](https://groundsocial.dev/tutorials/reddit/user-comments/python) | `GET /v1/reddit/users/spez/comments` | 1 |

Each row links to its tutorial. Every Reddit endpoint and price: [Reddit API](https://groundsocial.dev/reddit-api).

## Tips

- Responses are Reddit’s own Things and Listings (`t3` posts, `t1` comments, `data.after` cursors), exactly as reddit.com’s `.json` gives them.
- PRAW and snoowrap switch by changing one URL: set `oauth_url` and `reddit_url` to `https://reddit.groundsocial.dev` and pass your key as the client secret.
- Reddit stops a listing at about 1,000 posts. For a deeper archive, page `top` for each time window and de-duplicate by `name`.
- Big threads end in `more` items; `/thread` expands every branch in one call.

## Use it from Claude or Cursor (MCP)

Every endpoint is also an MCP tool on the remote server `https://api.groundsocial.dev/mcp`. The `?platforms=reddit` below loads only the Reddit tools. The client signs in with OAuth, or send your key as a Bearer token. Tools used in this guide: `reddit_subreddit_posts`, `reddit_post_get`, `reddit_post_thread`, `reddit_search_posts`, `reddit_search_comments`, `reddit_subreddit_get`, `reddit_user_comments`.

Claude Code:

```bash
claude mcp add --transport http groundsocial "https://api.groundsocial.dev/mcp?platforms=reddit"
```

Cursor:

```json
{
  "mcpServers": {
    "groundsocial": {
      "url": "https://api.groundsocial.dev/mcp?platforms=reddit"
    }
  }
}
```

Claude.ai:

```text
Customize → Connectors → + Add → Add custom connector
URL: https://api.groundsocial.dev/mcp?platforms=reddit
```

> **Then ask** “List this month’s top 50 posts in r/LocalLLaMA, then read the comments on the top three and summarise what people disagree about.”

Setup for ChatGPT, VS Code, Windsurf, n8n and others: [MCP client setup](https://groundsocial.dev/mcp).

## Pricing

Pay per call from prepaid credits; no subscription. 100 free credits cover the examples on this page. Costs below are at the [credit packs](https://groundsocial.dev/pricing)’ highest and lowest rates.

| Job | Credits | Cost |
| --- | --- | --- |
| 1,000 posts from one subreddit (10 pages) | 10 | $0.01 → $0.00 |
| 1,000 threads, first page of comments | 1,000 | $1.00 → $0.40 |
| Daily keyword search, 30 days | 60 | $0.06 → $0.02 |

## FAQ

### Do I need a Reddit app or client id?

No. You only need a Groundsocial key, and nothing changes when Reddit’s public API closes.

### Do I get deleted comments?

No. You get what Reddit shows publicly at the time of the call; removed comments come back as `[deleted]` or `[removed]`, as on reddit.com.

### Can it post, vote or message?

No. It is read-only; writes answer `403`.

### Are failed calls charged?

No. A target that does not exist answers `404 target_not_found`, an upstream failure answers `503`, and neither costs anything. Credits never expire.

### Is Groundsocial official?

No. Groundsocial is an independent API that reads what the platform shows a logged-out visitor. Reddit is a trademark of Reddit, Inc. We are not affiliated with or endorsed by Reddit.

## Go deeper

- [Reddit tutorials: 30 endpoints in six languages](https://groundsocial.dev/tutorials/reddit)
- [How much does the Reddit API cost?](https://groundsocial.dev/answers/how-much-does-the-reddit-api-cost)
- [Is the Reddit API free?](https://groundsocial.dev/answers/is-the-reddit-api-free)
- [What are the Reddit API rate limits?](https://groundsocial.dev/answers/reddit-api-rate-limits)
- [Is Reddit shutting down its API?](https://groundsocial.dev/answers/is-reddit-shutting-down-its-api)
- [Can I still get a Reddit API key?](https://groundsocial.dev/answers/can-i-still-get-a-reddit-api-key)
- [Is there an MCP server for social media data?](https://groundsocial.dev/answers/social-media-mcp-server)
- [How do I give Claude access to Reddit?](https://groundsocial.dev/answers/how-to-give-claude-access-to-reddit)
- [Reddit API alternatives](https://groundsocial.dev/alternatives/reddit-api)
- [SocialCrawl alternatives](https://groundsocial.dev/alternatives/socialcrawl)
- [Groundsocial vs Reddit’s official API](https://groundsocial.dev/compare/reddit-official-api)
- [Reddit API pricing in 2026](https://groundsocial.dev/blog/reddit-api-pricing-2026)
- [Brand monitoring API](https://groundsocial.dev/use-cases/brand-monitoring-api)

## Related guides

- [How to get X (Twitter) data](https://groundsocial.dev/guides/how-to-get-x-twitter-data)
- [How to get YouTube data](https://groundsocial.dev/guides/how-to-get-youtube-data)

Reddit is a trademark of Reddit, Inc. We are not affiliated with or endorsed by Reddit.

_Canonical HTML: https://groundsocial.dev/guides/how-to-get-reddit-data_

## Site Navigation

### Global Hub
- [Home](https://groundsocial.dev/index.md)
- [Pricing](https://groundsocial.dev/pricing.md)
- [Endpoints](https://groundsocial.dev/endpoints.md)
- [For agents](https://groundsocial.dev/agents.md)
- [Docs](https://groundsocial.dev/docs.md)
- [Compare](https://groundsocial.dev/compare.md)
- [Blog](https://groundsocial.dev/blog.md)
- [Tutorials](https://groundsocial.dev/tutorials.md)
- [Changelog](https://groundsocial.dev/changelog.md)
- [llms.txt](https://groundsocial.dev/llms.txt)
- [Agent skill](https://groundsocial.dev/SKILL.md)

### On This Topic
- [Groundsocial: Social data in one API call](https://groundsocial.dev/index.md)
- [Pricing](https://groundsocial.dev/pricing.md)
- [Playground](https://groundsocial.dev/playground.md)
- [Use cases](https://groundsocial.dev/use-cases.md)
- [Brand monitoring API](https://groundsocial.dev/use-cases/brand-monitoring-api.md)
- [Social listening API](https://groundsocial.dev/use-cases/social-listening-api.md)
- [Comment scraping API](https://groundsocial.dev/use-cases/comment-scraping-api.md)
- [Influencer discovery API](https://groundsocial.dev/use-cases/influencer-discovery-api.md)
- [Video transcript API](https://groundsocial.dev/use-cases/video-transcript-api.md)
- [Ad library API](https://groundsocial.dev/use-cases/ad-library-api.md)
- [Review monitoring API](https://groundsocial.dev/use-cases/review-monitoring-api.md)
- [Trend detection API](https://groundsocial.dev/use-cases/trend-detection-api.md)
- [Social lead generation API](https://groundsocial.dev/use-cases/lead-generation-api.md)
- [Market research API](https://groundsocial.dev/use-cases/market-research-api.md)

## Structured data

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://groundsocial.dev/"},{"@type":"ListItem","position":2,"name":"Guides","item":"https://groundsocial.dev/guides"},{"@type":"ListItem","position":3,"name":"How to get Reddit data","item":"https://groundsocial.dev/guides/how-to-get-reddit-data"}]}
```
