APIs are where the data is. A web page shows a user what the interface chooses to show; the API behind it returns whatever the server decides that caller is allowed to have. The most common serious API flaw is not exotic — it is an endpoint that forgot to check who is asking. If your own schema says an operation needs authentication and it answers an anonymous request anyway, that is a data exposure waiting to be found.
The schema itself is a map. A public Swagger file or GraphQL introspection tells an attacker every operation, parameter and type you have, which saves them most of the work of reconnaissance. Sometimes that is intended — a public API — and sometimes it was left on from development. Credentialed CORS and leaked stack traces are similar: small configuration choices that hand an outsider more than they should have.
Because this check works from your own contract rather than guessing URLs, it stays small and predictable. It reads what you have already published, asks a bounded number of questions, and never changes data.