Searching Twitter by Date
Twitter's (X's) date search works through two operators: `since:YYYY-MM-DD` and `until:YYYY-MM-DD`. Combine them to bracket a window. The catch — the web UI silently caps how far back you can go (usually 7-14 days reliably, sometimes more for highly-engaged accounts), while the API can reach further depending on tier and provider.
If you're trying to find a specific tweet from a year ago, you'll likely need both: search by date and a content fragment, OR pull the user's full historical timeline through the API.
Below is the operator reference, what the web UI actually delivers, when to switch to API, and example queries for common "find a tweet from a date" scenarios.
Basic Date Operators
since:YYYY-MM-DD — tweets posted on or after this date (UTC).
until:YYYY-MM-DD — tweets posted strictly before this date (UTC). Note: the date you pass is excluded, so `until:2025-03-15` returns tweets through 2025-03-14 23:59 UTC.
since_time:UNIX_TIMESTAMP / until_time:UNIX_TIMESTAMP — finer than day-level. Use when you need to bracket by hours.
Combining: `since:2025-01-01 until:2025-04-01` returns Q1 2025 tweets matching whatever other filters you've added.
Edge case: date operators use UTC, not your local timezone. A tweet posted at 11pm PST on March 15 counts as March 16 UTC.
Web UI Date Search Limitations
Type `since:2023-01-01 until:2023-12-31 yourkeyword` into the web search bar — you'll get results, but with hidden caveats:
Depth cap. Twitter only returns up to a few hundred results per query, even if more match. After scrolling, you'll hit a cliff with no "see older" option.
Recency bias. Results favor recent matches even within your specified window. Older tweets that match are sometimes silently omitted.
No machine-readable export. You see results in the UI but can't easily download them as CSV/JSON.
For one-off lookups ("did this account tweet about X in June 2024?"), the web UI is fine. For comprehensive analysis, you need API.
API Date Search — Same Operators, Better Behavior
Advanced Search endpoints on the X API and third-party providers (TwitterAPI.io, etc.) accept the same `since:` / `until:` operators with consistent behavior:
Pagination. Cursor-based, lets you walk through the entire result set in chunks of 100.
Historical depth. Third-party APIs typically expose 30-90 days deep. Official Pro tier reaches farther; Enterprise unlocks full archive.
Combinable. Stack with `from:`, `lang:`, `has:media`, `min_faves:N` etc. for precision queries.
Pricing. At $0.15 per 1,000 tweets returned via third-party, an exhaustive 6-month historical sweep on a brand keyword (~50K matches) costs around $7.50.
Common Use Cases
"Find that tweet I half-remember from last summer": `from:USERNAME "partial phrase" since:2024-06-01 until:2024-09-01`
"Audit all tweets from a competitor account in Q1": `from:competitor since:2025-01-01 until:2025-04-01 -filter:replies`
"Crisis postmortem — all brand mentions during a specific incident window": `acmecorp since:2025-03-15 until:2025-03-22`
"Historical hashtag campaign reach": `#yourtag since:2024-09-01 until:2024-10-01`
"Find a viral tweet from a year ago": `topic min_faves:1000 since:2024-05-01 until:2024-05-31`
When Date Search Fails
Some scenarios where `since:` / `until:` won't help:
Tweet was deleted. Date search doesn't recover deleted content. Try the Wayback Machine for the URL.
Account was suspended. Suspended accounts' tweets disappear from search. Recovery options are limited.
Account is protected. Date search only sees public tweets. Protected accounts require follower approval.
The date is too far back (> 90 days) for your access tier. Upgrade tier or accept the depth limit.
import requests
from datetime import date, timedelta
API_KEY = "YOUR_API_KEY"
HEADERS = {"X-API-Key": API_KEY}
def search_window(query: str, start: date, end: date, max_results: int = 500):
"""Search tweets in a date window. Paginates until exhausted or hits max."""
out = []
cursor = None
full_query = f"{query} since:{start.isoformat()} until:{end.isoformat()}"
while len(out) < max_results:
params = {"query": full_query, "limit": 100, "sort": "recent"}
if cursor:
params["cursor"] = cursor
r = requests.get(
"https://api.twitterapi.io/v1/search/advanced",
params=params,
headers=HEADERS,
timeout=30,
)
body = r.json()
out.extend(body["data"])
cursor = body.get("next_cursor")
if not cursor:
break
return out[:max_results]
# Example: find all NASA tweets in March 2025
tweets = search_window("from:nasa", date(2025, 3, 1), date(2025, 4, 1))
print(f"Found {len(tweets)} tweets")
for t in tweets[:10]:
print(f" {t['created_at']}: {t['text'][:80]}")Frequently asked
How do I search Twitter for tweets from a specific date?
Use `since:YYYY-MM-DD until:YYYY-MM-DD keyword` in the search bar or API. Note: `until:` is exclusive (the date itself is not included). All dates are UTC, so a late-night PST tweet counts as the next day.
How far back can I search Twitter by date?
Web UI reliably goes back 7-14 days. API on third-party providers: 30-90 days deep. Official X API Pro tier: similar. Full archive (years back): Enterprise tier only ($42K+/month) or specialized historical data resellers.
Why doesn't my date search return old tweets I know exist?
Most common cause: web UI silently caps depth at a few hundred results, so older matches get hidden. Switch to API for cursor-based pagination through the full window. Also check: was the tweet deleted? Was the account suspended?
Can I search a specific day, not just a date range?
Yes: `since:2025-03-15 until:2025-03-16` returns tweets from that single day (UTC). For hour-level precision, use `since_time:` and `until_time:` with Unix timestamps.
Does date search work with hashtags and accounts?
Yes, stack them: `#yourtag since:2025-01-01 until:2025-02-01` returns that hashtag's tweets in January 2025. Combine with `from:USERNAME` to scope to one account, `lang:en` for language, `min_faves:100` for engagement threshold.
Continue reading
Starter credits cover end-to-end testing. No card, no application queue.