List system packages from Fedora/RHEL database (yum)

Log in to Vote
4 Votes • 1 Comment
It's really cool how DuckDuckGo can show the packages from Debian/Ubuntu, but for Fedora and RHEL administrators (CentOS too) this isn't very useful, as package names are often different, and in some cases provide a totally different application.

It would
The Fedora Package Database has a JSON API that is easily accessible to determine whether or not a package exists.

For instance a package that does exist returns a bunch of JSON information, and a 200 OK status code.

If you supply a wildcard, chances are you'll get multiple packages returned. The first one is the most relevant.

If a package doesn't exist, we get a JSON error and a 404 status code returned.

Basic Perl example (Perl isn't my forte as you can tell :P)
require LWP::UserAgent;
my $ua = LWP::UserAgent->new;
# probably a good idea to cache this locally. package names
#   don't change (and if they do, they probably 301 or "just work")
my $response = $ua->get('' .
my $exists = ($response->is_success && $response->status_line == 200);
• posted 4 years and 4 months ago • type: Spice (API calls) Under Review

A PR has been submitted and is under review:
posted by Moollaza Staff4 years and 10 days ago Link