Anonymous users accessing user datails over the REST API

Hi, I’m trying to access some gitlab.com user details using the anonymous REST API. I tried:

curl https://gitlab.com/api/v4/users/5014491
curl https://gitlab.com/api/v4/users?userName=CodeSandwich

but both of them return HTTP 403.
I also tried GraphQL, but it seems that all user-related details require authorization.

At the same time I can do:

curl https://gitlab.com/CodeSandwich

and get all the user details anonymously, just in a way less convenient way. I need to parse HTML and use XPaths that may stop working after the slightest website redesign, so I would prefer avoiding doing that.

How can I access user details without logging in or parsing HTML? Is it a bug that REST API is so restrictive about data available publicly and anonymously? Where should I report it?