getNamedEntities method for API wrapper