1. Official Reddit Search Parameters, Sort Orders & Lucene Syntax
Under the hood, Reddit's search engine evaluates queries using Lucene syntax by default, combined with sort order and time-window parameters. Whether you query through PRAW or directly via ForumData API's synchronous REST endpoint, understanding these parameters prevents noisy false positives.
- Boolean Operators (AND, OR, NOT & Grouping): Use uppercase boolean keywords and parentheses to combine brand and intent terms—for example: (supabase OR neon OR planetscale) AND (pricing OR migration) NOT hiring.
- Lucene Field Prefixes (title:, selftext:, author:, flair:, site:): Restrict matches to specific submission fields such as title:"rate limit", selftext:429, author:spez, or site:github.com, or pass ?subreddit=saas to scope the query to a single community.
- Incremental Unix Epoch Polling (?since=): Combine sort=new with ?since=<unix_timestamp> to fetch only threads created after your last poll checkpoint. Empty polls return count: 0 and deduct 0 Credits.
Primary Source Billing & Rate-Limit Citations
“sort – Can be one of: 'relevance', 'hot', 'top', 'new', or 'comments'. (default: 'relevance'). syntax – Can be one of: 'cloudsearch', 'lucene', or 'plain' (default: 'lucene'). time_filter – Can be one of: 'all', 'day', 'hour', 'month', 'week', or 'year' (default: 'all').”
— PRAW Official Documentation — Subreddit.search() Parameters (praw.readthedocs.io/en/stable/code_overview/models/subreddit.html, retrieved 2026-11-11 · web.archive.org snapshot)
While PRAW requires an approved OAuth2 client ID and is throttled to 60–100 QPM ($0.24/1K commercial calls even on empty polls), ForumData API exposes the same search parameters at GET /v1/posts/search with 30–300 RPM concurrency and $0.10 per 1,000 returned posts ($0.00 when empty).
30-Day First-Party Gateway Telemetry (30d) & 10K / 100K / 1M Cost Scale
Machine-readable /telemetry.json ↗- 30d Gateway Latency (p50 / p95)
- 10ms cached p50 · 1232ms blended p50 / 2057ms p95
- 30d HTTP 200 Success Rate
- 100.0% HTTP 200 on valid calls (58/58, 0 gateway 5xx)
- 10K / 100K / 1M Enriched Records TCO
- 10K records: $1.00 PAYG ($0.61 Business) vs $2.40+ Official OAuth ($0.24/1K calls)100K records: $10.00 PAYG ($6.06 Business) vs $24.00+ Official OAuth1M records: $100.00 PAYG ($60.61 Business) vs $240.00+ Official OAuth
Interactive Boolean Sandbox
Want to test your boolean query against live subreddit data before writing code? Launch our free browser-based Reddit Brand Mention Search Tester.
| Operator / Parameter | Query Syntax Example | GET /v1/posts/search Behavior | Typical Engineering Use Case |
|---|---|---|---|
| Boolean AND / OR / NOT | query=(stripe OR lemon) AND webhook NOT hiring | Evaluates Lucene boolean logic across title + selftext | Competitor & buying-intent social listening |
| Exact Phrase Quotes | query="rate limit exceeded" OR "403 blocked" | Matches exact multi-word error strings or product names | Bug triage & developer pain-point discovery |
| Title / Body Field Filter | query=title:alternative AND selftext:pricing | Scopes token match to submission title or body text | High-precision B2B lead generation |
| Subreddit Scope (?subreddit=) | subreddit=saas&query=churn&sort=new | Restricts search to r/saas (or omit for global search) | Vertical community monitoring |
| Time Window (?time_filter=) | time_filter=day&sort=top&limit=100 | Filters top/hot/relevance to hour, day, week, month, year, all | Daily digest & RAG trend summarization |
| Incremental Epoch (?since=) | sort=new&since=1794000000 | Returns only posts with created_utc > since (0 Credits if empty) | 60-second cron alerting without duplicate charges |
Search Reddit posts with boolean operators in Python, TypeScript & cURL
Query GET /v1/posts/search across all subreddits or a single subreddit with boolean operators, sort=new, time_filter=week, and incremental ?since= filtering.
curl -sS "https://api.forumdataapi.com/v1/posts/search?query=(postgres+OR+supabase)+AND+vector&subreddit=LocalLLaMA&sort=new&time_filter=month&limit=25" \
-H "x-api-key: rd_live_your_api_key"import requests
res = requests.get(
"https://api.forumdataapi.com/v1/posts/search",
headers={"x-api-key": "rd_live_your_api_key"},
params={
"query": "(postgres OR supabase) AND vector",
"subreddit": "LocalLLaMA",
"sort": "new",
"time_filter": "month",
"limit": 25,
},
timeout=15,
)
res.raise_for_status()
payload = res.json()
for post in payload["data"]["items"]:
print(post["id"], post["subreddit_name_prefixed"], post["title"], post["permalink"])const params = new URLSearchParams({
query: "(postgres OR supabase) AND vector",
subreddit: "LocalLLaMA",
sort: "new",
time_filter: "month",
limit: "25",
});
const res = await fetch(`https://api.forumdataapi.com/v1/posts/search?${params}`, {
headers: { "x-api-key": "rd_live_your_api_key" },
});
const { data, meta } = await res.json();
console.log(`Matched ${data.count} posts (${meta.credits_used} credits)`, data.items);{
"code": 0,
"provider": "https://forumdataapi.com",
"status": "ok",
"data": {
"items": [
{
"id": "1xnwx71",
"post_id": "t3_1xnwx71",
"subreddit": "LocalLLaMA",
"subreddit_name_prefixed": "r/LocalLLaMA",
"title": "Benchmarking pgvector on Supabase vs Qdrant for 1M RAG chunks",
"selftext": "We tested HNSW index build times and p95 recall...",
"author": "rag_builder",
"score": 84,
"upvote_ratio": 0.96,
"num_comments": 31,
"created_utc": 1793819393,
"permalink": "https://reddit.com/r/LocalLLaMA/comments/1xnwx71/benchmarking_pgvector_on_supabase_vs_qdrant/"
}
],
"count": 1,
"next_cursor": "t3_1xnwx71",
"has_more": false
},
"meta": {
"request_id": "9c82a10f-41e9-4b02-9a11-7e5c9104d2a1",
"endpoint": "/v1/posts/search",
"credits_used": 2,
"cache_hit": false,
"latency_ms": 214
}
}Want to inspect live 200 OK JSON before signing up? Run 3 real API calls right in your browser:
Try 3 Free Live Runs in Playground (No Login) →GET /v1/posts/search API Schema & Parameters →
Inspect full query parameter types, cursor pagination, and response schema for Reddit post search.
Test your boolean query in the Brand Mention Tester →
Run live boolean search expressions across any subreddit in your browser with instant JSON export.
Real-Time Reddit Brand Mention Monitoring API →
Build a zero-empty-poll-cost cron worker using ?since= Unix timestamps and Slack/webhook alerts.
Pushshift Alternative 2026: Live Search & Comments API →
Migrate legacy api.pushshift.io submission and comment search scripts to /v1/posts/search in 5 minutes.
Interactive Engineering Workbench · GET /v1/posts/search
Verify real-time latency, pagination math & JSON schema
Frequently Asked Questions
- How do I use boolean operators (AND, OR, NOT) in the Reddit Search API?
- Pass uppercase boolean operators inside the query parameter of GET /v1/posts/search—for example, query=(nextjs OR remix) AND (auth OR clerk) NOT tutorial. You can also filter by field using title:, selftext:, author:, or flair:.
- Does ForumData API charge credits when a Reddit search query returns 0 posts?
- No. Empty search responses (data.items.length === 0) and HTTP 4xx/5xx responses cost 0 Credits ($0.00). Non-empty responses cost 1 Credit ($0.0001) per returned post (minimum 2 Credits per non-empty call).
- Can I search posts created after a specific Unix timestamp like Pushshift?
- Yes. Pass sort=new and since=<unix_epoch_seconds> to GET /v1/posts/search to retrieve only posts published after that timestamp.