As of angular 5, there is a module inside angular core called TransferStateModule
that does this for you. https://angular.io/api/platform-browser/TransferState
You simply add your API response to the cache on serverside together with an StateKey (basically just like a string), it get's written to the DOM as Json before the index.html file is send to the client, there you ask for the StateKey and get the result from the Json.
In the official Universal Starter Kit you can see where and what to register: https://github.com/angular/universal-starter
Update Angular 6
You don’t need to set the State key yourself. The new TransferStateModule has an HttpClient Interceptor that sets the keys automatically! You can still do it yourself if you want to have more control but now it’s as easy as adding the module (the newest universal starter kit has it imported by default!)