BYTETOOLS

CRAN DB API

Read any CRAN package's DESCRIPTION file as JSON: version, licence, dependencies, maintainer and full history. No key required. Verified example and field notes.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the CRAN DB API?

CRAN DB serves CRAN package metadata as JSON. `GET https://crandb.r-pkg.org/{package}` returns the package's DESCRIPTION fields, including version, title, licence, dependencies and maintainer, and `/{package}/all` returns every released version. No API key is required.

CRAN itself publishes package metadata as DCF files, a plain-text format from the early 1990s that nothing outside the R ecosystem can parse. CRAN DB does the tedious work of parsing DESCRIPTION into JSON and keeping a full version history, which is why it underpins several R dependency and CI tools.

The translation is faithful rather than tidy, and that shows. Dependency sections such as `Depends` and `Suggests` become objects mapping package name to a version constraint, with `"*"` meaning any version. `URL` is a single string that may contain several URLs separated by newlines. And the key `Authors@R` contains an `@`, plus a value that is unevaluated R source code rather than structured data, so treat it as opaque text unless you are prepared to parse R.

Quick facts

Base URL
https://crandb.r-pkg.org
Authentication
No key or account. The service is maintained by the R-hub project.
Rate limit
Not published. Package metadata changes only on release, so cache aggressively.
Pricing
Free and open source.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the CRAN DB API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Fetch the current metadata for a CRAN package

GET https://crandb.r-pkg.org/jsonlite

curl
curl 'https://crandb.r-pkg.org/jsonlite'
JavaScript (fetch)
const res = await fetch("https://crandb.r-pkg.org/jsonlite");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://crandb.r-pkg.org/jsonlite", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "Package": "jsonlite",
  "Version": "2.0.0",
  "Title": "A Simple and Robust JSON Parser and Generator for R",
  "License": "MIT + file LICENSE",
  "Depends": {
    "methods": "*"
  },
  "Authors@R": "c(\nperson(\"Jeroen\", \"Ooms\", role = c(\"aut\", \"cre\"), email = \"jeroenooms@gmail.com\",\ncomment = c(ORCID = \"0000-0002-4035-0289\")),\nperson(\"Duncan\", \"Temple Lang\", role = \"ctb\"),\nperson(\"Lloyd\", \"Hilaiel\", role = \"cph\", comment=\"author of bundled libyajl\"))",
  "URL": "https://jeroen.r-universe.dev/jsonlite\nhttps://arxiv.org/abs/1403.2805",
  "BugReports": "https://github.com/jeroen/jsonlite/issues",
  "Maintainer": "Jeroen Ooms <jeroenooms@gmail.com>",
  "VignetteBuilder": "knitr, R.rsp",
  "Description": "A reasonably fast JSON parser and generator, optimized for statistical\ndata and the web. Offers simple, flexible tools for working with JSON in R, and\nis particularly powerful for building pipelines and interacting with a web API.\nThe implementation is based on the mapping described in the vignette (Ooms, 2014).\nIn addition to converting JSON data from/to R objects, 'jsonlite' contains\nfunctions to stream, validate, and prettify JSON data. The unit tests included\nwith the package verify that all edge cases are encoded and decoded consistently\nfor use with dynamic data in systems and applications.",
  "Suggests": {
    "httr": "*",
    "vctrs": "*",
    "testthat": "*",
    "knitr": "*",
    "rmarkdown": "*",
    "R.rsp": "*",
    "sf": "*"
  },
  "RoxygenNote": "7.3.2",
  "Encoding": "UTF-8",
  "NeedsCompilation": "yes",
  "Packaged":

Parameters

ParameterTypeRequiredDescription
{package}pathRequiredExact CRAN package name, which is case-sensitive. jsonlite
{package}/allpathOptionalReturn every released version of the package rather than just the current one. jsonlite/all
{package}/{version}pathOptionalFetch the DESCRIPTION of one specific historical version. jsonlite/1.8.8

Response fields

Package / Version / Titlestring
Package name, current version and one-line title, taken verbatim from DESCRIPTION.
Licensestring
Licence expression in CRAN's own notation, such as `MIT + file LICENSE`. It is not an SPDX identifier, so map it before feeding a licence scanner.
Depends / Imports / Suggestsobject
Dependency sets as name-to-constraint maps. A value of `"*"` means any version is acceptable.
Maintainerstring
Name and email in `Name <email>` form, as a single string.
URLstring
Project URLs concatenated into one string separated by newlines. Split on whitespace before turning them into links.
Authors@Rstring
Raw, unevaluated R code describing authorship. The key contains an `@`, so access it with bracket syntax in most languages.
NeedsCompilationstring
`"yes"` or `"no"` as a string, not a boolean. It tells you whether installing the package requires a toolchain.

What you can build with the CRAN DB API

  • Check whether an R dependency has a newer CRAN release
  • Build a dependency graph for an R project without installing anything
  • Audit the licences of every package in a lockfile
  • Find which packages need compilation before provisioning a build image
  • Track a package's release cadence using the full version history

Common errors and how to fix them

404

The package name is wrong, or the package has been archived and removed from CRAN.

Fix: Package names are case-sensitive. Archived packages disappear from the current endpoint but may still resolve under `/all`.

Key lookup fails on Authors@R

The field name contains an `@`, which is not a valid identifier in most languages.

Fix: Access it by string key, for example `data["Authors@R"]`, rather than with dot notation.

URL treated as one link

Multiple URLs are joined by newlines inside a single string.

Fix: Split on whitespace or newlines and validate each fragment before rendering it as a link.

CRAN DB API — frequently asked questions

Is the CRAN DB API official?

It is maintained by R-hub rather than by CRAN itself, but it mirrors CRAN's own metadata faithfully and is widely used in the R tooling ecosystem.

How do I get every version of a package?

Append `/all` to the package path. That returns the full release history, each entry carrying the DESCRIPTION as it stood at that version.

Why are dependencies objects and not arrays?

Because DESCRIPTION expresses each dependency as a name plus an optional version constraint. Mapping name to constraint preserves both without inventing a schema.

Does it cover Bioconductor packages?

No. This is CRAN metadata only. Bioconductor maintains its own repository and metadata endpoints.

Tools that pair with this API

CRAN DB is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.