Nothing really much to compare API vs API.
DigitalOcean API is service DO provides you to manage your resources. Via API you can do absolutely everything that you can in Web Control Panel.
Take a look at DO API Docs.
There are also API Wrappers that you can use to build apps that uses DO API.
Official ones are
droplet_kit written in Ruby and
godo written in Go.
Also, there is official command-line API CLI -
doctl. You can use from console, use it scripts, whatever you want.
About Google API. They also has API and it seems great. I’m not so familiar with their platform but you can take a look at their docs.
If you have further questions, feel free to ask anything.