Add the base url (https://dataservice.accuweather.com) of the API endpoint:
const url = `https://dataservice.accuweather.com/locations/v1/cities/search?apikey=${apiKey}&q=${city}`;