API JS Doesn't Allow Cross Domain

So I started working with the H5 API today. I setup my website and copy pasted there javascript example and filled in the appropriate information to just make a basic request. Then it returns

> XMLHttpRequest cannot load https://www.haloapi.com/stats/h5/players/darkcloud1592/matches?modes=arena&start=1&count=10&{body}. Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://cloudninestudios.net’ is therefore not allowed access. The response had HTTP status code 404.

Follow the link and I get :

> “{ “statusCode”: 401, “message”: “Access denied due to missing subscription key. Make sure to include subscription key when making requests to an API.” }”

I did the same thing I did in js in c# and it works. After reading through a few topics, apparently they don’t allow cross domain requests? Then why expose the API/provide a JS example?
http://cloudninestudios.net/halo/

EDIT:
Using the php work around from :
https://www.halowaypoint.com/en-us/forums/01b3ca58f06c4bd4ad074d8794d2cf86/topics/anyone-have-a-working-javascript-jquery-example/e9bdc607-2cfc-42ca-a7f5-88c9673cd41f/posts

Work’s pretty great! Though I would mention my one change :

I use a variable for the API_ENDPOINT, since it could be unclear what he meat there. $_GET[“url”]