Yes, it is possible to retrieve output from run-script API command. It's returned being encoded to base64 inside the show-task API command response.

Getting run-script output through HTTP request

Run run-script command (it's asynchronous) and save the task-id from the response.

Run show-task command providing task-id that was saved in step 1. You have to run show-task command several times until response will contain status "succeeded". You have to run show-task with details-level set to "full".

Parse show-task response and extract the base64 encoded result by following path showTaskResult.tasks[0]["task-details"][0].responseMessage

Decode the base64 encoded result (In Javascript it can be done with atob function).