API basics - how to pull a password

You may wish to look at the documented valut management API.

Which as mentioned can be accomplished with bw serve command using the Bitwarden CLI.