Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

The API of the CRAN downloads database

General remarks

The download count data was provided by the RStudio CRAN mirror. The data source is updated daily, and cranlogs tries to update hourly.

The output is JSON. The API was inspired by the download-counts npm package, and adapted to R.

The service also provides badges for READMEs.

There is an official R client for the API, the cranlogs package.

This README documents

Web API docs

Top downloaded packages /top/{period}[/count]

period must be one of last-day, last-week or last-month, and count is the number of packages to show. count can be at most 100 currently. Example output for

  start: "2015-05-01T00:00:00.000Z",
  end: "2015-05-01T00:00:00.000Z",
  downloads: [
      package: "Rcpp",
      downloads: "5010"
      package: "ggplot2",
      downloads: "4329"
      package: "plyr",
      downloads: "4121"

Trending packages last week /trending

Treding packages are the ones that were downloaded at least 1000 times during last week, and that substantially increased their download counts, compared to the average weekly downloads in the previous 24 weeks. The percentage of increase is also shown in the output:

    package: "fpp",
    increase: "914.4002185991438200"
    package: "TSA",
    increase: "764.1159377095596500"
    package: "readr",
    increase: "662.9005975013579600"

Total downloads over a period /downloads/total/{period}[/{package1,package2,...}]

The output looks like this:

  downloads: 201761,
  start: "2014-06-01",
  end: "2014-06-30",
  package: "ggplot2"

If there was no package given, then that key is missing.


All packages, last day:

All packages, specific date:

Package ggplot2, last week:

Package ggplot2, given 7-day period:

Package ggplot2, last 30 days:

Package "ggplot2", specific month:

Multiple packages at once:,ggplot2,Rcpp

Accepted values

In general, dates in the yyyy-mm-dd ISO 8601 format are accepted. The following keywords can also be used:

last-day Yesterday, unless the database has not been updated yet for yesterday, in which case it is the day before.

last-week Last 7 available days.

last-month Last 30 available days.

Daily downloads /downloads/daily/{period}[/{package}]

Output looks like this:

    downloads: [
            day: "2014-09-27",
            downloads: 1581
            day: "2014-10-04",
            downloads: 2395
    start: "2014-09-27",
    end: "2014-10-04",
    package: "ggplot2"

Again, if no package was specified, then that key is missing.


Downloads per day, last 7 days:

Downloads per day, specific 7 days:

Downloads per day, last 30 days:

Downloads per day, specific 30 day period:

Downloads of R

If instead of a list of package, R is given, downloads of R are returned. For total, the total number of downloads for a given period. For daily, daily downloads, separately for various operating systems and R versions. Here are some examples:

Last day, separately for R versions and operating systems:

Total number of downloads last week:



Returns an SVG badge with download counts. Monthly, weekly and daily summaries and the total number of downloads are available. If the summary type is not given, the number of downloads per month is shown:

Weekly downloads are shown with last-week:

Daily downloads are shown with last-day:

Total number of downloads since October of 2012, the month the RStudio CRAN mirror started publishing logs, with grand-total:

Colors can be customized. Supported color names are: brightgreen, green, yellowgreen, yellow, orange, red, lightgrey, blue. Hex colors are also supported. The badge is blue by default, as above. Other colors in the same order, and the hex color ff69b4:

Our badges were designed and created by


RStudio CRAN mirror downloads, web app






No releases published


No packages published