December 2016 Archives

Working with the MetaCPAN API

This is the fourth article in a series about MetaCPAN. The first article described the two main parts that make up the MetaCPAN project: the API and the search interface. The second article gave a high level overview of how the API uses Elasticsearch to hold and search information about CPAN distributions and authors. The third article showed how MetaCPAN fits into the rest of the CPAN ecosystem.

In this article we'll show how you can use the MetaCPAN API to get information about releases to CPAN. We'll start off with a very simple query, then gradually refine it to narrow down which releases are returned, and what information you request for each release.

This article is brought to you by Elastic, who were a Gold sponsor for meta::hack. We were very happy to have their support, especially given the central role that Elasticsearch plays in MetaCPAN.

About Neil Bowers

user-pic Perl hacker since 1992.