“An API library is software. So it fits with copyrighting software so nothing wrong there.”
Nope. An API is NOT software. An API is a specification, like the list of ingredients in a cake. A list of cake ingredients IS NOT copyrightable, though a specific, written recipe that lists the ingredients IS copyrightable.
Likewise, a software library that implements an API IS copyrightable.
So, ideas are not copyrightable, but implementations of ideas rendered in terms of media ARE copyrightable.
This is an insane ruling.
I do understand the issue of an API being a standard, but also software. The standard becomes functional, and therefore not subject to copyright. The code that goes into the API can be subject to copyright, however.
There is an excellent analysis available - and one critical of Judge O’Malley.