How to use embedded packages to call and query addresses

I want to fuzzy search for place names in osm maps and only deploy to application to search for place names.How can I call the api for searching place names when embedded in a java package how to search place names