How do I make an API request using javascript?

You could use

Fetch - https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
jQuery ajax - http://api.jquery.com/jquery.ajax/

Or any number of methods in JS to perform a HTTP request