The Twitter API platform currently offers a few different options for programmatically searching the index of Tweets. These options range from the standard 7-day Search API (search/tweets) to the enterprise Full-Archive Search API. Each option offers a varying level of access and query capabilities - see the below summary for more details:

API Category Supported history Query capability
Search API: search/tweets Standard 7 days, limited index Basic
30-Day Search API Enterprise 30 days Premium operators
Full-Archive Search API Enterprise Full-archive (back to 2006) Premium operators