Yes, Google Apps Script isn’t limited to working with Google services. You access data from external non-Google services on the internet (for example, the Pokémon API) using built-in classes such as UrlFetchApp like so:
var response = UrlFetchApp.fetch("https://pokeapi.co/api/v2/pokemon/ditto"); Logger.log(response.getContentText()); // All details of Ditto would be logged