JSON API for PyPi - how to list packages?

Piotr Migdal picture Piotr Migdal · Jan 29, 2014 · Viewed 10.8k times · Source

There is a JSON API for PyPI which allows getting data for packages:

http://pypi.python.org/pypi/<package_name>/json
http://pypi.python.org/pypi/<package_name>/<version>/json

However, is it possible to get a list of all PyPI packages (or, for example, recent ones) with a GET call?

Answer

Simeon Visser picture Simeon Visser · May 25, 2014

The easiest way to do this is to use the simple index at PyPI which lists all packages without overhead. You can then request the JSON of each package individually by performing a GET request to the URLs mentioned in your question.