The "No Access-Control-Allow-Origin" header is usually a server problem. This means that the server is configured only to allow the person to access the API if the request comes from the same domain as the server. You either need to run the script from the website to which you are requesting data, or you need to change the server configuration to allow access to all domains.
If you do not have access to the server and you do not want to run the script in a browser, then I think you can use a browser without a header, such as PhantomJS, to go to the page, insert the script element in the dom that contains you script, execute function, and then return the data from the API. I could write the code for you, but to be honest, it's a little complicated. You will need to know how to use node.js and phantom.js. I personally used phantom.js for the Node package 'html-pdf', but I'm sure with a little reading you could figure out how to do this.
source share