Researchers are passing around lists of tweet IDs ("dehydrated", they call them) that can be "rehydrated" (that is, turned back into full tweets) if you have the right permission from twitter to do so.
The whole setup is really shameful.
It would be de-facto illegal to build a "Google for Twitter" today. I settled on doing it for ActivityPub/Mastodon because it's less likely I'll get sued into oblivion for creating a search engine that way.
I am working on some fediverse aggregator projects. Let me know if you want to talk.
Nowadays you'd need to sign up for an API key, probably pay some amount of money, and provide twenty different forms of contact to use something like that. That's assuming it was allowed to exist in the first place, since it might take views away from google.com.