With the Alpaca Data API you can access historical minute data back 5 years - we currently do not have data further back than 2016. Although there are a few missing data points towards the beginning, this is an issue we are working towards solving as soon as possible.

Market Data - Documentation | Alpaca
Alpaca API lets you build and trade with real-time market data for free.