# Read Reddit from a Python script with one HTTP request, no PRAW setup

From Python, send one POST to the RouterGrowth run endpoint with your key, the capability social.posts and a subreddit, and read the posts from the JSON response. There is no PRAW install, no Reddit app, client id or user agent string to register, and the same request shape works for X, LinkedIn and YouTube.

HTML page: https://www.routergrowth.com/tools/reddit/python
Part of: [Reddit tools](https://www.routergrowth.com/tools/reddit.md)

## The call

[`social.posts`](https://www.routergrowth.com/catalog/social.posts): Recent public posts for a social handle.

Price on this network: $0.00665 per post plus $0.07 per call, $0.002 minimum a call. The exact quote is shown before every run.

## What a real run returned

Run on 2026-10-19: 4 records in 54.8 s for $0.1015. Personal fields are masked. r/learnpython read with a limit of five returned four posts from the last two days, from a roadmap question to the weekly Ask Anything thread.

| text | community | posted |
|---|---|---|
| Python roadmap | r/learnpython | 2026-10-18 |
| How are you supposed to figure out python commands w/o AI? | r/learnpython | 2026-10-18 |
| Ask Anything Monday - Weekly Thread | r/learnpython | 2026-10-19 |

## How to do it

1. **Get a key.** Create a key in the RouterGrowth dashboard and keep it in an environment variable.
2. **Send one request.** With requests or httpx, POST to /v1/run with a Bearer header and a body naming social.posts and the input: platform reddit, handle r/name, limit.
3. **Poll if needed.** A subreddit read can take a few minutes. If the response says running, GET /v1/runs/{run_id} until it is done.
4. **Loop over posts.** result.posts is a list of dicts with text, body, engagement, created_at and url, ready for pandas or a CSV writer.

## Ask it like this

- Write me a Python script that reads the newest posts in r/learnpython every morning and saves them to a CSV. (`social.posts`)
- In Python, search Reddit and X for the same phrase and merge the posts into one table. (`social.search`)

## Connect

MCP server: `https://api.routergrowth.com/mcp`

```bash
claude mcp add --transport http routergrowth https://api.routergrowth.com/mcp
```

```bash
npm install -g routergrowth && routergrowth setup
routergrowth run -c social.posts -i '{"platform": "reddit", "handle": "r/learnpython", "limit": 5}'
```

```bash
curl -X POST https://api.routergrowth.com/v1/run \
  -H "Authorization: Bearer $ROUTERGROWTH_API_KEY" \
  -d '{"capability": "social.posts", "input": {"platform": "reddit", "handle": "r/learnpython", "limit": 5}}'
```

## Worth knowing

- **PRAW is not needed.** PRAW wraps Reddit's own API and needs your Reddit app. This is plain HTTP to an independent API, so any HTTP client works.
- **Same call, other networks.** Change platform to x, linkedin or youtube and the same script reads those, with the same field names.
- **Read only.** Nothing in this call posts, votes or sends messages on Reddit.

## Questions

### Is there a Python SDK?

No SDK is required. The API is plain JSON over HTTPS, and the routergrowth CLI covers shell scripts.

### How do I handle a long run?

Read the run id from the first response and poll the runs endpoint until status is succeeded.

### Can I keep using PRAW for posting?

Yes. This call only reads public posts; anything that writes to Reddit stays with your own setup.

### What do I get when a subreddit is quiet?

Fewer posts than the limit, and the charge follows the posts returned.

## Related

- [A hosted Reddit scraper your agent runs by naming a subreddit](https://www.routergrowth.com/tools/reddit/scraper.md)
- [Scrape the newest posts of any public subreddit into clean rows](https://www.routergrowth.com/tools/reddit/post-scraper.md)
- [Read a subreddit's posts without registering a Reddit developer app](https://www.routergrowth.com/tools/reddit/developer-api.md)
- [Scrape the comments on a Reddit thread by pasting its link](https://www.routergrowth.com/tools/reddit/comment-scraper.md)
- [Search every public subreddit for a phrase, in one API call](https://www.routergrowth.com/tools/reddit/search-api.md)
- [What Reddit data costs through RouterGrowth, and how a call is billed](https://www.routergrowth.com/tools/reddit/api-pricing.md)
- [Search Reddit from your agent without a Reddit developer account](https://www.routergrowth.com/tools/reddit/api.md)
