Maps API
I would like to create a custom map and put pins programmatically on locations based on data from our database. Is there some open source api which allows me to do this or should I use gmaps?
Leaflet is probably the most common JS library for embedding OpenStreetMap into a website. OSM also has a wiki page regarding other options.
Welcome to the wonderful world of OpenStreetMap
But also please use a search engine? "Open-source map api" on DDG would have given you the answer pretty much right away
"LMGTFY" has its place, but this is a question that has many possible options and thus warrants discussion.
If OP had done a modicum of research had specific questions, or was asking if their research was complete, maybe you'd have a point.