2

At the moment the usage overview page on drupal.org gives an idea of the number of sites using a certain module. However as noted this includes information from only sites that include the update status module which means it is biased toward newer sites, is there a way to see an overview of the download statistics of a module as well in a similar view?

  • Seems we have an API from drupal.org we can hook into pull this information across. – Nishan May 22 '15 at 5:30
2

As you mentioned, d.o. has an API from which you can retrieve project information. For your purposes, you can retrieve module downloads with the following URL:

https://www.drupal.org/api-d7/node.json?type=project_module

The JSON output has a property called list which is an array of node objects for each module project. Each node object contains a property called field_download_count that contains the project's download count.

Note: results are paged (100 per result) from the web service so you'll have to iterate through 307 pages of results to get all module projects (the JSON output contains a first, last, prev, next property with URLs that let you navigate through the pages)

3

You can get information about a particular module in both XML and JSON format by accessing URL:

Eg: (For Views Module) :

XML format:

https://www.drupal.org/api-d7/node.xml?field_project_machine_name=views

JSON format:

https://www.drupal.org/api-d7/node.json?field_project_machine_name=views


Reference: https://www.drupal.org/api

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.