Google Places ID lookup question

Hi everyone, I’m in the process of building another geo directory and in order to generate Google Maps URL I need Google Places ID. Anyone has a good way of programmatically retrieving these based on the business name and address? Thanks! šŸ™