Yes! You can use the API function (in Python) gmsh.model.getClosestPoint(dim, tag, coord)
gmsh.model.getClosestPoint(dim, tag, coord)