Skip to content
CRAN checks API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
svgs fix eg badges in readme May 17, 2018
.gitignore gitignore some things Jun 14, 2018
Rakefile sql setup done #33 Dec 28, 2018
api.rb fix #37 make limit=0 on pkgs and maintainers routes just give a count Dec 28, 2018
badges.rb fixes in badges routes, add support for /badges/worst route May 17, 2018 add files Sep 16, 2017
config.yaml sql setup done #33 Dec 28, 2018
cran_maintainers.rb rework scraping of html pages Jun 4, 2019
cronjob rework scraping of html pages Jun 4, 2019
docker-compose.yml rework scraping of html pages Jun 4, 2019
notes-sql.txt sql setup done #33 Dec 28, 2018
scrape.rb rework scraping of html pages Jun 4, 2019
scrape_maintainer.rb rework scraping of html pages Jun 4, 2019 rework scraping of html pages Jun 4, 2019 rework scraping of html pages Jun 4, 2019

CRAN Check Results API

The was originally just rOpenSci packages, but is now all packages on CRAN.

Base URL:

API Docs

No authentication needed

Check out cchecks for an R package interface to this API


  • language: Ruby
  • rest framework: Sinatra
  • scraping http requests: faraday
  • databases: mongodb, mariadb
  • server: caddy
  • container: all wrapped up in docker (docker-compose)
  • uses Gábor's API to get names of CRAN packages
  • A cron job:
    • scrapes pkg specific data every 3rd hour
    • scrapes maintainer level data every 4th hour
    • poplulates the history routes once a day
  • for the history routes, we keep the last 30 days of checks for each package; each day we purge any checks data older than 30 days

JSON API examples

To replicate the examples below as is, you'll need curl (which you likely have), and jq ( which you may not have. You can also just copy/paste the URLs into your browser 😏

All pkgs from a maintainer that have any checks not passing

curl | jq '.data.table[] | select(.any) | .package'

Similar but across all packages

curl | jq '.data[] | select(.summary.any) | .package'

Packages that have error status checks

curl | jq '.data[] | select(.summary.error > 0) | .package'

workflow for checking your own packages

Check if you have any packages have one or more of a current status across operating systems and R versions, e.g., errors

curl  | jq '.data.table[] | select(.error > 0)'
  "package": "rcmdcheck",
  "any": true,
  "ok": 9,
  "note": 0,
  "warn": 0,
  "error": 3
  "package": "secret",
  "any": true,
  "ok": 11,
  "note": 0,
  "warn": 0,
  "error": 1

Then grab the check details for a specific package

curl  | jq .data.check_details
  "version": "1.0.0",
  "check": "examples",
  "result": "ERROR",
  "output": "Running examples in 'secret-Ex.R' ... cutoff",
  "flavors": [
  "additional_issues": []

Optionally see the check details for previous CRAN checks in the /history route (up to 30 days prior to the current date) (though as of this writing we have only about 10 days)

curl | jq '.data.history[].check_details'
  "version": "1.0.0",
  "check": "examples",
  "result": "ERROR",
  "output": "Running examples in 'secret-Ex.R' ... cutoff",
  "flavors": [
  "additional_issues": []
  "version": "1.0.0",
  "check": "examples",
  "result": "ERROR",
  "output": "Running examples in 'secret-Ex.R' ... cutoff",
  "flavors": [
  "additional_issues": []
... cutoff


also check out badges from R-hub for CRAN versions, CRAN release dates, and CRAN downloads

markdown egs to use in your README

linking to cran checks page (likely want to use url since cran check will complain about a different mirror's base url)

cran checks -> [![cran checks](](

Or maybe link to JSON response for this API

cran checks -> [![cran checks](](

pkgs using the badges:

package status summaries

  • /badges/summary/:package all okay?, no notes, warnings, or errors
    • if any notes, warnings, or errors = Not OK (color:red)
    • if NO notes, warnings, or errors = OK (color:green)
  • /badges/worst/:package worst result:
    • if any errors = ERROR (color:red)
    • if any warnings, and no errors = WARN (color:yellow)
    • if any notes, and no errors or warnings = NOTE (color:blue)
    • if no errors, warnings, or notes = OK (color:green)


  • /badges/noerrors/:package no errors? but could have warnings or notes
  • /badges/nowarns/:package no warns? no errors, no warnings, but could have notes
  • /badges/nonotes/:package no notes? no errors, no warnings, and no notes

per flavor

  • /badges/flavor/:flavor/:package flavor + package, where flavors are any one of:

    operating systems

      - linux
      - windows
      - osx
      - solaris

    R versions

      - devel
      - oldrel
      - patched
      - release

With meanings:

  • if any notes, warnings, or errors = Not OK (color:red)
  • if NO notes, warnings, or errors = OK (color:green)

Query parameters

  • ignore: if true, ignore any NOTE's and get a green OK badge. supported by /badges/summary and /badges/flavor


both badges routes

package summary route

flavor route

You can’t perform that action at this time.