Skip to content
cheapxapi

How to search tweets by date.

Type since: and until: into the X search box with dates written YYYY-MM-DD, then switch to the Latest tab. since: includes its date; until: does not, so set it to the day after the last day you want.

Or fill in the builder below and it writes the query for you.

Build the search.

Pick the first and last day you want, both included. The builder moves until: one day forward so the last day isn’t dropped, then gives you the query, a link that opens it on X, and the same search as an API call.

Search query

from:NASA
Open this search on X ↗

Same search through the API

curl "https://api.cheapxapi.com/twitter/tweet/advanced_search?query=from%3ANASA&queryType=Latest" \
  -H "x-api-key: YOUR_KEY"

The end-date catch.

since: starts at the beginning of its date. until: stops at the beginning of its date, so that whole day is left out. Searching Tuesday to Thursday means writing until: Friday.

since:Tue until:Thu
  1. Mon—
  2. TueIncluded
  3. WedIncluded
  4. ThuLeft out
  5. Fri—

Thursday is the until: date, so its tweets don’t appear. To get Tuesday through Thursday, write since:Tue until:Fri with the real dates.

Every date operator.

Date and time search operators on X
OperatorMatches
since:YYYY-MM-DDOn or after this date (included).
until:YYYY-MM-DDBefore this date. The date itself is not included.
since:YYYY-MM-DD_HH:MM:SS_UTCOn or after an exact time, in the time zone you name.
until:YYYY-MM-DD_HH:MM:SS_UTCBefore an exact time.
since_time:UNIX until_time:UNIXBetween two Unix timestamps, in seconds.
from:usernameOnly tweets posted by one account. Combine with any of the above.

Export a whole date range.

Scrolling the Latest tab works for a quick look. For a spreadsheet of every tweet in the range, send the same query to a search API and follow the cursor page by page.

On cheapxapi that is the advanced search endpoint: up to 20 tweets per request at $0.0006, about $0.03 per 1,000 tweets. The Python script in Twitter scraper API saves the results to CSV; paste your date query into its QUERY line.

Get your API key

Questions.

How do I search tweets by date on X?

Type since: and until: with dates in YYYY-MM-DD format into the X search box, for example from:NASA since:YYYY-MM-DD until:YYYY-MM-DD, then open the Latest tab. On the web, the Advanced search form has date fields that write the same operators for you.

Why are tweets from my end date missing?

Because until: excludes its own date: until:YYYY-MM-DD returns tweets from before that day. To include the last day of your range, set until: to the day after it. The builder on this page does that for you.

Can I search tweets by exact time?

Yes. Add a time and time zone to the date, such as since:YYYY-MM-DD_08:00:00_UTC, or use since_time: and until_time: with Unix timestamps in seconds.

How do I export every tweet from a date range?

Run the same query through a search API and follow the cursor until there are no more pages. On cheapxapi each request returns up to 20 tweets for $0.0006, about $0.03 per 1,000 tweets.