It's a bit older code but try something like this:
// you could replace the following line with just getting the current page
var pageInfo = PageInfoProvider.GetPageInfo(SiteContext.CurrentSiteName, "/SomeAliasPath", "en_US", "/", true);
var zone = pageInfo.TemplateInstance.WebPartZones.First(z => z.ZoneID == "yourzoneid");
var webPart = zone.WebParts.First(w => w.ControlID.ToLower() == "yourwidgetcodename");
var webPartValue = webPart.GetValue("SomeCustomProperty");