Loading…
100 free credits. No credit card required. Get a key
A page of posts from one community, sorted hot, new, top, rising or controversial, as a Reddit Listing of t3 Things with an after cursor.
GET /v1/reddit/subreddits/{name}/posts1 credit per callRefunded on failureimport 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(){ "kind": "Listing", "data": { "after": null, "before": null, "dist": 1, "modhash": null, "geo_filter": "", "children": [ { "kind": "t3", "data": { "id": "1y3m2bd", "name": "t3_1y3m2bd", "title": "Benchmarked 14 quantizations of the same 8B model on a 3060. Q5_K_M is the sweet spot.", "author": "vram_goblin", "author_fullname": null, "subreddit": "LocalLLaMA", "subreddit_name_prefixed": "r/LocalLLaMA", "subreddit_id": null, "permalink": "/r/LocalLLaMA/comments/1y3m2bd/benchmarked_14_quantizations_of_the_same_8b_model/", "url": "https://www.reddit.com/r/LocalLLaMA/comments/1y3m2bd/benchmarked_14_quantizations_of_the_same_8b_model/", "domain": "self.LocalLLaMA", "created_utc": 1795450722, "score": 1932, "upvote_ratio": 0.98, "ups": null, "downs": null, "num_comments": 287, "selftext": "Same prompts, same seed, 500 questions per run. Tokens per second, memory and accuracy in the table below. Q4 loses more on reasoning than the averages suggest.", "selftext_html": null, "is_self": true, "over_18": false, "spoiler": false, "stickied": false, "locked": false, "archived": null, "link_flair_text": "Resources", "link_flair_template_id": null, "post_hint": null, "thumbnail": null, "edited": null, "removed_by_category": null, "gilded": null, "num_crossposts": null } } ] }}| Name | Type | Description |
|---|---|---|
namepath · required | string | Subreddit name, with or without "r/". "all" and "popular" also work for posts. Example: typescript. |
sortquery | "hot" | "new" | "top" | "rising" | "controversial" | Listing order. Default hot. One of hot, new, top, rising, controversial. |
tquery | "hour" | "day" | "week" | "month" | "year" | "all" | Time window for top and controversial. Default day. One of hour, day, week, month, year, all. |
limitquery | integer | Items per page, 1 to 100. Default 25. |
afterquery | string | Cursor: the previous page's data.after. Omit for the first page. |
200 with a LinkListing, in Reddit’s own shape.
| Field | Type | Description |
|---|---|---|
kind | "Listing" | |
data | object |
| Status | Meaning |
|---|---|
200 | A page of posts. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The subreddit, post or user does not exist. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Reddit is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
About this endpoint. Reddit is a trademark of Reddit, Inc. We are not affiliated with or endorsed by Reddit.
As far as Reddit’s own listing goes, usually about 1,000 posts per sort. Pass the previous page’s data.after as after.