Reddit API search by date: filter posts by time
Reddit API search by date: which time windows the search endpoint supports, how to filter posts to an exact date range in Python, and what to use for older posts.
Piyushh · November 13, 2026 · 3 min read

Reddit API search by date works in two steps. Pick the nearest time window the endpoint offers, then trim the results to your exact dates in code. That's how it works in ChatterAPI, because reddit.search takes a time window rather than a start and end date.
We checked this against the tool's input schema in our code on 2026-11-13. time accepts hour, day, week, month, year or all, and defaults to all. Reddit search has no since or until, though X search has both.
We couldn't load Reddit's own API documentation today, so we make no claim about how Reddit's native endpoints handle dates. If you plan to call them directly, check Reddit's current docs.
What the time parameter does
time value | Use it for |
|---|---|
hour, day | Live monitoring |
week, month | Recent discussion |
year | A year of context |
all | Everything Reddit's search returns |
Pair it with sort: new puts the freshest posts first, top the highest scores, relevance the best matches, and hot or comments cover the rest. A basic request:
curl "https://api.chatterapi.com/v1/reddit/search?q=best+crm+for+small+business&time=year&sort=new" \
-H "Authorization: Bearer $CHATTERAPI_KEY"
Each post carries a createdAt timestamp, so every row includes its date. This row comes from a recorded sample captured 2026-10-07, trimmed:
{
"id": "1wdihhj",
"title": "What CRM should a small business use?",
"subreddit": "CRM",
"score": 51,
"createdAt": "2026-09-11T14:52:16.000Z"
}
Filter to an exact date range in Python
Use the nearest window that covers your range, page through the results, and keep only the rows between your dates. Say you want posts from 1 to 31 October 2026:
import os
import datetime as dt
import requests
HEADERS = {"Authorization": f"Bearer {os.environ['CHATTERAPI_KEY']}"}
START = dt.datetime(2026, 10, 1, tzinfo=dt.timezone.utc)
END = dt.datetime(2026, 11, 1, tzinfo=dt.timezone.utc)
def posts_in_range(q, time="month", max_pages=5):
cursor = None
for _ in range(max_pages):
params = {"q": q, "time": time, "sort": "new"}
if cursor:
params["cursor"] = cursor
r = requests.get("https://api.chatterapi.com/v1/reddit/search",
params=params, headers=HEADERS, timeout=60)
r.raise_for_status()
body = r.json()
for p in body["data"]:
created = dt.datetime.fromisoformat(p["createdAt"].replace("Z", "+00:00"))
if START <= created < END:
yield p
cursor = body["page"]["nextCursor"]
if not body["page"]["hasMore"] or not cursor:
break
for p in posts_in_range('"cold email"'):
print(p["createdAt"][:10], p["score"], p["subreddit"], p["title"][:70])
Three notes on the script:
- Pick a
timewide enough to reach your dates.monthonly covers roughly the last month from today, so a range that ended two months ago needsyear. Run this late in November and October fits insidemonth. In January it does not. max_pagessets your budget. Each page costs 2 credits, so five pages cap the spend at 10. Failed calls cost nothing.- Timestamps are in UTC. Compare in UTC, or convert both sides to the zone you care about.
We did not run this script for the post. A test key returns the same recorded page whatever you pass, so try it with a live key on a small max_pages first.
A narrow range in a busy topic
If you search a broad phrase over year, the 25 rows on each page may cover only part of that period, and you still pay for the pages that fall outside your range. You can cut that cost two ways:
- Use a tighter window, such as
weekwhen your range falls in the last week. - Search inside one subreddit by adding
subreddit=SaaS, or usereddit.subreddit_postswithsort=newto read a community's newest posts directly.
Quote exact phrases to get better matches. The Reddit search API guide shows how unquoted queries drift.
Comments have no time filter
reddit.search_comments has no time parameter. Use sort=new to monitor recent comments, then filter on the date field in the response, as above.
Older posts and deleted posts
Search returns only what Reddit's own search returns, and only for posts that still exist. A live API can't recover deleted content. For history you need the archives: our Pushshift vs PullPush vs Arctic Shift post checked each one on 2026-10-14 and explains which still answers. To set up recurring checks, Reddit keyword monitoring shows how to poll with time=day.
Search by time range now
Before writing any code, try a query and a time window in the free Reddit search tool. Each match shows its title, subreddit, score, comment count and age.