Glitch cannot contact api

i’m trying to request a json from a website(https://some-random-api.ml) via node-fetch
const response = await fetch('https://some-random-api.ml/animu/pat').then(response => response.json());

but it outputs this

FetchError: request to Some Random Api • Home failed, reason: getaddrinfo ENOTFOUND some-random-api.ml some-random-api.ml:443

i contacted some developers, and they said that only glitch users are experiencing this, is there a way to fix this?

I tried visiting the website, looks like the Website returned:

This simply means that the website doesn’t exist anymore, i’ve personally used this API before and had no issues with it prior. I suggest contacting the developer at telk@protonmail.com about it

The site is working fine for me, it could be the DNS resolver being used by Glitch and other users’ ISP’s. (My DNS resolver is 1.1.1.1).

1 Like

Ideally you could tell Node or the fetch command to use a different DNS server. I don’t know how to do that, but a hacky workaround could be to get Node to run curl:

$ curl --resolve some-random-api.ml:443:104.31.89.68 https://some-random-api.ml

It is hacky because it will stop working if the website changes its IP address.

Option 2: ask Glitch to fix their DNS :slight_smile: