user16626: I am looking for a free online opening database that gives information not only on the number of games played, but also some history behind them. For example, some information such as "this move was the main line that was mostly played in the 1990s, but nowadays it has the refutation move xxx and thus the new main line is yyy, etc."

user3884: Wikibooks does that approximately. But since there isn't one common consensus opinion about what is the main line at any given point in time, I don't think there can be one source that categorizes every opinion.
Opening books and opening chessable courses will be your best source for one specific opening/repertoire.

16626: <p>I am looking for a free online opening database that gives information not only on the number of games played, but also some history behind them. For example, some information such as &quot;this move was the main line that was mostly played in the 1990s, but nowadays it has the refutation move xxx and thus the new main line is yyy, etc.&quot;</p>
 3884: <p><a href="https://en.wikibooks.org/wiki/Chess_Opening_Theory/1._e4/1...e5/2._Nf3/2...Nc6/3._Bc4" rel="nofollow noreferrer">Wikibooks</a> does that approximately. But since there isn't one common consensus opinion about what is the main line at any given point in time, I don't think there can be one source that categorizes every opinion.</p>
<p>Opening books and opening chessable courses will be your best source for one specific opening/repertoire.</p>
