glimglim.shdocs
Tools

Reddit API and MCP server

Search Reddit and read posts with their comment trees, subreddit feeds and user profiles, from your code or your AI agent. Call the REST endpoints under /api/v1/reddit/* or the MCP tools glim_reddit_search and glim_reddit_get, at $0.01 per search and $0.005 per read. You do not register a Reddit app or run a Reddit OAuth flow: pay per call from a wallet, or use a glim.sh API key.

Endpoints and tools

  • glim_reddit_search / POST /api/v1/reddit/search - $0.01 per call. query plus optional sort (relevance, hot, top, new, comments), time (hour to all), limit (1-10, default 10), cursor, start_date and end_date. Scope with subreddit: in the query (e.g. subreddit:python async); author:, site: and flair: work too. Each post comes back with its full text and top comments.
  • glim_reddit_get / POST /api/v1/reddit/get - $0.005 per call. One ref takes a post URL or id (returns the post plus its comment tree), a comment permalink (that comment with its context and replies), a subreddit (r/name or URL: its feed) or a user (u/name or URL: profile with recent posts, and comments on request).
  • GET shorthands for quick calls: GET /api/v1/reddit/search/:query and GET /api/v1/reddit/get/:ref, at the same prices.

Reddit API pricing

  • Search: $0.01 per call, up to 10 posts with full text and top comments.
  • Read a post, subreddit or user: $0.005 per call.
  • No subscription, no minimum and no monthly quota to buy: you pay only for the calls you make.

Pay per call with USDC on Base or Solana through x402, or with USDC.e on Tempo through MPP: an unpaid request returns HTTP 402 with the price, your client pays and retries, no account needed. Or top up a balance and send an API key; MCP clients can sign in over OAuth instead. Same endpoints, same prices. See Payments & auth.

Search Reddit via the API

request
curl -X POST https://glim.sh/api/v1/reddit/search \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"subreddit:LocalLLaMA mcp servers"}'
response (trimmed to 1 of 10 posts, without selftext and top_comments)
{
  "posts": [
    {
      "id": "1tpwg33",
      "title": "What's your favorite local MCP server?",
      "author": "Glittering_Focus1538",
      "subreddit": "LocalLLaMA",
      "permalink": "https://www.reddit.com/r/LocalLLaMA/comments/1tpwg33/whats_your_favorite_local_mcp_server/",
      "created_at": "2026-05-28T07:31:00.326Z",
      "time_ago": "2w ago",
      "public_metrics": { "score": 32, "num_comments": 76 }
    }
  ],
  "count": 10,
  "has_more": true,
  "next_cursor": "..."
}

Pass next_cursor back as cursor for the next page. To read one post with its whole discussion, send its URL to get:

read a post with its comments
curl -X POST https://glim.sh/api/v1/reddit/get \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref":"https://www.reddit.com/r/LocalLLaMA/comments/1tpwg33/","comment_sort":"top","comment_limit":20}'

Reddit MCP server

glim.sh is a hosted MCP server, so the install is one URL, https://glim.sh/mcp. Add it to your client:

Claude Code
$ claude mcp add -s user -t http glim https://glim.sh/mcp
Codex
$ codex mcp add glim --url https://glim.sh/mcp
OpenCode
$ opencode mcp add
Interactive: choose remote, paste https://glim.sh/mcp
Wallet
$ npx x402-proxy mcp add glim https://glim.sh/mcp
No account: your agent pays per call in USDC (x402) from a local wallet, auto-generated on first run.

To give an agent only the two Reddit tools, connect to https://glim.sh/mcp?tools=glim_reddit_search,glim_reddit_get. More clients and config formats are in the MCP quickstart.

Compared with the official Reddit Data API

Reddit runs its own Data API. The facts in its column below come from Reddit's Data API Wiki, Responsible Builder Policy and developer help page; check them for the current terms.

Reddit Data APIglim.sh
AccessRequest access and get explicit approval first.Pay per call from a wallet with no account, or sign up at glim.sh/app for an API key.
AuthA registered OAuth token; unidentified clients are throttled or blocked.An x402 or MPP payment, an x-api-key, or OAuth for MCP clients.
PricingFree access within the rate limits below.$0.01 per search, $0.005 per read.
Rate limitsFree access: 100 queries per minute per OAuth client id, averaged over 10 minutes.Billed per call. A search page holds up to 10 posts; cursor walks further pages.
CoverageRead and write (posting, moderation) for approved apps.Read-only: search, posts with comment trees, subreddit feeds, user profiles.
InterfaceHTTP API with OAuth.REST plus a hosted MCP server for AI agents.

Good to know

  • Subreddit-scoped queries (subreddit:name ...) return the most relevant results. Keep the default relevance sort for topic questions; top and hot rank by score and largely ignore the query text.
  • Posts are rendered from the live site, so comment text comes through in correct UTF-8, including non-Latin scripts.
  • Private, quarantined, gated and banned subreddits are not served: the response carries a refused reason instead of posts.
  • A malformed body or a ref that is not a Reddit post, subreddit or user returns 400 with a suggestion before any payment, so it costs nothing.

FAQ

Is there a free Reddit API?

Reddit's own Data API has free access: you request access, wait for approval, and stay within 100 queries per minute per OAuth client id. glim.sh is paid per call at the prices above.

How much does the Reddit API cost?

On glim.sh, $0.01 per search and $0.005 per post, subreddit or user read, with no subscription. Reddit's own Data API has free access within its rate limits, once Reddit approves your access.

Can I search Reddit with an API?

Yes. POST /api/v1/reddit/search (or the glim_reddit_search MCP tool) searches all of Reddit or one subreddit, with sort, time range and date filters, and returns each post with its full text and top comments.

Do I need a Reddit API key or OAuth app?

Not for glim.sh: you authenticate to glim.sh only, with a wallet payment or a glim.sh API key. Reddit's own Data API requires a registered OAuth token.

Prompts to try

  • "Find this month's top r/LocalLLaMA posts about quantization and read me the best comment threads."
  • "What does r/selfhosted think about this tool? Search and summarize the consensus."