There is an eco.json"eco" GitHub project file available which I believe (based, based on the name), is based on the Encyclopedia of Chess Openings.
This project used to provide a JSON file with all openings, but now provides a set of tab-separated files with columns for ECO code, name, FEN, and moves.
To give you an idea of the format of the file, here's the entry for Ruy Lopez: Marshall, Main Line, Spassky Variation, which happens to be the longest opening in the file:
{'c'C89 Ruy Lopez: 'C89'Marshall,
'f':Main '5rk1Line, Spassky Variation 5rk1/5ppp/p1pbr3/1p1n3q/P2P2b1/1BPQB1P1/1P1N1P1P/R3R1K1 w -',
'id':- 3320,
'm': 'e2e4e2e4 e7e5 g1f3 b8c6 f1b5 a7a6 b5a4 g8f6 e1g1 f8e7 f1e1 b7b5 a4b3 e8g8 c2c3 d7d5 e4d5 f6d5 f3e5 c6e5 e1e5 c7c6 d2d4 e7d6 e5e1 d8h4 g2g3 h4h3 c1e3 c8g4 d1d3 a8e8 b1d2 e8e6 a2a4 h3h5',
'n': 'Ruy Lopez: Marshall, Main Line, Spassky Variation'}h3h5