Well, to be fair, libraries and SDKs do have APIs, it's what you mainly interact with when you use them, the defined interface that you programmatically use in your application.
You create a "web-service" and then describe it by describing its "interface" you are in fact creating that interface. That is how it is on the web because the web-tech does not give us a language in which to describe service-endpoints.
In non-web development the APIs can be described formally as function-signatures in any statically typed programming language.
Or is there some simple language in which to write descriptions of web-services?
Of course, there are tons, they're generally called IDLs (interface description languages), common examples are Protobufs, Avro, Thrift, etc.
They're not hugely popular for web services largely because the web was designed to avoid exactly this kind of a priori contractual requirements between communicating parties. But that's a much bigger conversation.