CPAN Meta DB

This is (yet another) CPAN metadata database that provides REST API for the CPAN distributions, intended to be used by CPAN clients such as cpanminus. Currently the only implemented endpoint is the resolver to get distribution file names from package names (a.k.a 02packages.details.txt.gz) but there's a plan to implement more to extract information from META.yml etc. See also CPANDB and CPANIDX for the similar works.

APIs

/v1.0/package/Package::Name
Returns the latest distribution file path that contains the package and its version string ('undef' is a valid version string) in YAML format. Returns 404 status code if the package is not found. (Example)

Notes

By using CPAN Meta DB through cpanm, you're sending the module you're about to install, the version of cpanm installation, IP address as well as your local perl version (as of 1.6004 or later). You can opt it out by setting --mirror-only option to not use CPAN Meta DB for faster index resolution, or by using --no-report-perl-version since version 1.6008.

The collected data is stored securely on the application server (by hashing the IP address to be anonymized) and our CDN provider fastly (terms), and used to make the service more reliable (e.g. blacklisting DoS attacks) and for data mining purposes such as perl version stats. Unmasked IP addresses are never stored, published nor shared with third parties (besides Fastly, who serves the cached content in behalf of our servers).