This information is at BBRef, although I don't doubt it could be at Fangraphs, Retrosheet, etc. or in digitized book form.
https://www.baseball-reference.com/
Look for league by year, e.g., AL 2012, and then within that page, drill down to SPLITS for batting or pitching stats. It goes back some number of decades, so you'll be able to find a lot of data. It varies in that the farther back you go, the less you get, but that makes sense.