Can I create a Google account programmatically?

NO

The only possible way to do this would be to use a web automation framework. Python is great for web automation using tools such as mechanize. I've never done it in Java, but you should do a google search for java programmatic web browser or java web automation.

On top of that you would have to incorporate an OCR package to beat the captcha.

There is a reason that google, nor anyone else, allows the programmatic creation of accounts. Spammers would have a field day. Within days there would be no valid accounts left for any new users to use. In short, it would be a disaster.


Yes

(ish)

The Admin SDK Directory API allows you to create accounts which work with Google tools (Gmail, Calendar, etc.) but are not @gmail.com / @googlemail.com accounts.

This is used by companies to automate creation of accounts for online google tools when new users are added to networks and similar scenarios.

User management is documented here.

This replaces the provisioning API which was deprecated in 2013.