reddit_get_subreddit_posts 4 credits
Fetch one page of posts from a single subreddit, the community-monitoring primitive. subreddit_name is the name without the r/ prefix. sort defaults to the subreddit's own front-page order (best); use sort=new for monitoring. sort=top and controversial need a range, but the window is currently not applied upstream on this feed: top returns the subreddit's all-time top posts whatever range says (time-windowed tops are a known gap here; reddit_search's range DOES work for keyword queries). Costs 4 credits per page; a cursor page is a NEW call priced the same way. Reddit splices about one promoted ad into every feed page; these are dropped by default, so set include_promoted=true only when ads ARE the data you want (ad intelligence, who targets this community) -- kept ads carry is_promoted=true. Returns post summaries (title, author, upvotes, comment_count, created_at, permalink, id) with a cursor for older posts; bodies and discussions come from reddit_get_post with the returned ids. For keyword search across all of Reddit use reddit_search; this tool takes no query.
Part of the Reddit toolset: /docs/reddit.
Parameters#
| Param | Required | Type | Description |
|---|---|---|---|
subreddit_name | yes | string | Subreddit name without the r/ prefix, e.g. 'selfhosted'. |
sort | no | string | Defaults to the subreddit's front-page order. |
range | no | string | Required with sort=top or controversial, but currently not applied upstream on this feed (results are all-time). |
include_promoted | no | boolean | Keep the promoted ads Reddit splices into the feed (marked is_promoted). Default drops them. |
cursor | no | string | Cursor from a previous page for older posts. |
freshness | no | string | recent (default) serves cached data from the last few hours when available; realtime forces a live fetch for +2 credits (refunded if we fall back to cached data). Trial keys are cached-only and reject realtime with TRIAL_CAP_EXCEEDED; paying upgrades this same key to unlock it. |
max_credits | no | integer | Spend ceiling for this one call. The call is rejected (nothing charged) if its quote exceeds this. Only the quote is ever reserved, never this ceiling. |
REST#
GET /v1/reddit/subreddit-posts · auth: required · metered: true
curl "https://api.veezee.io/v1/reddit/subreddit-posts?subreddit_name=selfhosted&sort=new" \
-H "Authorization: Bearer $VEEZEE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"MCP#
{
"method": "tools/call",
"params": {
"name": "reddit_get_subreddit_posts",
"arguments": {
"subreddit_name": "selfhosted",
"sort": "new"
}
}
}Input examples#
Monitor a community for new posts
{
"subreddit_name": "selfhosted",
"sort": "new"
}
All-time top posts
{
"subreddit_name": "programming",
"sort": "top",
"range": "all_time"
}
Ad intelligence: who advertises to this community
{
"subreddit_name": "programming",
"include_promoted": true
}
Output#
Returns a reddit_posts envelope. Full field list: /docs/fields#reddit_posts.
Errors#
REST returns application/problem+json; MCP returns the same content as an error result. message is written as the next-turn instruction.
| Code | HTTP status | Retriable | Meaning |
|---|---|---|---|
INVALID_INPUT | 400 | no | A parameter failed validation. Check param and message for what to fix. |
NOT_FOUND | 404 | no | Nothing matches the given identifier or URL. |
UNAUTHORIZED | 401 | no | Invalid, revoked, or unusable API key. |
NOT_ENTITLED | 403 | no | This account is not enabled for the platform you called. |
INSUFFICIENT_CREDITS | 402 | no | Your balance can't cover this call's quote. Check get_usage or add credits. |
QUOTE_EXCEEDS_MAX_CREDITS | 402 | no | The call's quote is higher than the max_credits you set. Nothing was charged. |
IDEMPOTENCY_KEY_REQUIRED | 400 | no | This is a metered call; send an Idempotency-Key header. |
IDEMPOTENCY_KEY_REUSED | 409 | no | That Idempotency-Key was already used with different arguments. Use a new key for a new call. |
CONCURRENCY_LIMIT | 429 | yes | Too many calls in flight for this key's plan. Wait for one to finish. |
RATE_LIMITED | 429 | yes | Too many calls per minute for this key's plan. Back off and retry. |
TRIAL_CAP_EXCEEDED | 403 | no | A trial-only limit was hit (concurrency, rate, search size, or realtime fetches). |
BUDGET_EXHAUSTED | 503 | no | A configured spend budget has been used up. |
UPSTREAM_UNAVAILABLE | 502 | yes | LinkedIn data wasn't reachable. Safe to retry. |
PAYLOAD_TOO_LARGE | 413 | no | The request or response exceeded the size limit. |
INTERNAL | 500 | yes | Something failed on our side. Safe to retry. |
AUTH_REQUIRED | 401 | no | |
KEY_REQUIRED | 401 | no | No API key was sent. Mint one free at POST /v1/keys/mint and retry. |
Errors a payment can fix: the offer fields
Errors a payment can fix add fields to the base error shape. INSUFFICIENT_CREDITS, TRIAL_CAP_EXCEEDED, and BUDGET_EXHAUSTED carry upgrade_url (a link to hand to your human) and offer, its machine-readable twin. RATE_LIMITED and CONCURRENCY_LIMIT carry both on trial accounts only, where a paid plan raises the limit.
Fields inside offer:
offer_version: currently 1.reason: the error code that produced the offer.currency:"usd".recommended: the pack to lead with, currentlyflex.packs: each pack'spack,mode,price_usd_cents,creditsorcredits_per_month, andwhen, a short label for when that pack fits.rails: currentlystripe_checkout.checkout_url: the same account-bound link asupgrade_url.resume: how to continue after payment, per code (next paragraph).refund_policy: the refund terms in plain text.
After payment, follow resume: INSUFFICIENT_CREDITS retries the same call with the same Idempotency-Key; TRIAL_CAP_EXCEEDED and BUDGET_EXHAUSTED retry with a fresh key; the two limit codes clear on their own with back-off, payment only raises the limit. INSUFFICIENT_CREDITS also sets credits_required: the credits the failed call needed. The failed attempt charged nothing.