Yes, its totally possible, in fact it could easily be used as a replacement for many of the functions of nodejs, and php.
Then connecting to databases can easily be done with Firebase, and Parse.
Connecting to api's is also fairly simple via ajax.
Parsing data would then need to be handled via third party plugs.