Comment by fkarg
certainly not free, but with F1TV Access you have access to historical and real time data through the API. There should be decent documentation on it out there, otherwise projects like Multiviewer or this TUI wouldn't be quite realistic.