Everything about APIs (JSON, CORS-Problem)

My aim was to concetrate on building up a front-end, now I stuck with API requests (no data -> no frontend)

My first approach was to load data via AJAX from the yahoo finance API. Here I have a problem with CORS.
Ok, take a step back, I chose https://dummyapi.io/ in order to practice the whole thing.
When I don’t have problems with CORS here I cannot access the JSOn data (for whatever reason),

Here is the code that I used for dummyapi:

const url =

  .then((res) => {
    return res.json();
  .then((data) => {

error: index.html:1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

Ok, I don’t get JSON back here, looks more like HTML…

Is there a way to approach the whole topic!?? Thanks.