Any api to check GPG keys for packages without downloading packages to local?

Qixiang Wan <[email protected]> Thu, 12 Jan 2017 23:36:04 +0800
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
Hi,

Is there any api in yum that can be used to check GPG keys for packages 
without downloading packages to local? I need to check all packages that 
are available in the repo, so I don't want to download so much packages 
to local to check that. I checked the api doc at 
http://yum.baseurl.org/api/yum/, but with no luck. And this old page 
(http://yum.baseurl.org/wiki/SecuredRemoteData) says it is possible to
  ask "Is package X signed with a key in the rpmdb" and "Does key Y 
exist in the rpmdb", anyone know how can I do that?

I guest one possible solution may be download the header of all 
available packages first then get the signature from header, which api 
can be used to download headers of all available package?