Extend reply in case of duplicate account

When trying to create an account with a name that exists you get the ‘duplicate’ error. That’s OK, but would be nice to extend it with the account ID of the existing account.
No you get stuck since there is no way to search (through) the API for an account by name. Which really sucks, since that is what you would do when attempting to create an account, before creating it.