R

R Packages API

CRAN package metadata

Operations 5

GET /{package} Get Package Metadata #
GET /{package}/{version} Get Package Version Metadata #
GET /-/pkgs List All CRAN Packages #
GET /-/desc List Package Descriptions #
GET /-/allvign List All Package Vignettes #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/r-packages-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

r-packages-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: METACRAN CranDB Packages API
  description: CouchDB-backed REST API providing programmatic access to metadata for all CRAN R packages. Enables lookup of package information, version history, dependencies, and maintainer data in JSON format.
  version: 1.0.0
  contact:
    name: METACRAN
    url: https://r-pkg.org
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: https://crandb.r-pkg.org
  description: METACRAN CranDB production server
tags:
- name: Packages
  description: CRAN package metadata
paths:
  /{package}:
    get:
      operationId: getPackage
      summary: Get Package Metadata
      description: Returns metadata for the latest version of an R package on CRAN, including description, version, dependencies, maintainer, license, and publication date.
      tags:
      - Packages
      parameters:
      - name: package
        in: path
        required: true
        description: CRAN package name (case-sensitive)
        schema:
          type: string
          example: ggplot2
      responses:
        '200':
          description: Package metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PackageMetadata'
        '404':
          description: Package not found
  /{package}/{version}:
    get:
      operationId: getPackageVersion
      summary: Get Package Version Metadata
      description: Returns metadata for a specific version of an R package. Use "all" as the version to retrieve all versions.
      tags:
      - Packages
      parameters:
      - name: package
        in: path
        required: true
        description: CRAN package name
        schema:
          type: string
          example: ggplot2
      - name: version
        in: path
        required: true
        description: Package version string, or "all" for all versions
        schema:
          type: string
          example: 3.4.4
      responses:
        '200':
          description: Package version metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PackageMetadata'
        '404':
          description: Package or version not found
  /-/pkgs:
    get:
      operationId: listAllPackages
      summary: List All CRAN Packages
      description: Returns a list of all package names currently available on CRAN along with their latest versions.
      tags:
      - Packages
      responses:
        '200':
          description: All CRAN packages and versions
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
                  description: Latest version string
  /-/desc:
    get:
      operationId: listPackageDescriptions
      summary: List Package Descriptions
      description: Returns name, title, and version for all CRAN packages.
      tags:
      - Packages
      parameters:
      - name: limit
        in: query
        required: false
        description: Maximum number of records to return
        schema:
          type: integer
          example: 100
      - name: skip
        in: query
        required: false
        description: Number of records to skip for pagination
        schema:
          type: integer
          example: 0
      responses:
        '200':
          description: Package name-title-version list
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PackageSummary'
  /-/allvign:
    get:
      operationId: listPackageVignettes
      summary: List All Package Vignettes
      description: Returns all vignettes available for CRAN packages.
      tags:
      - Packages
      responses:
        '200':
          description: Vignette list
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VignetteSummary'
components:
  schemas:
    PackageSummary:
      type: object
      properties:
        name:
          type: string
          description: Package name
          example: dplyr
        title:
          type: string
          description: Short title
          example: A Grammar of Data Manipulation
        version:
          type: string
          description: Latest version
          example: 1.1.4
    VignetteSummary:
      type: object
      properties:
        package:
          type: string
          description: Package name
        vignette:
          type: string
          description: Vignette identifier
        title:
          type: string
          description: Vignette title
    PackageMetadata:
      type: object
      properties:
        Package:
          type: string
          description: Package name
          example: ggplot2
        Version:
          type: string
          description: Package version
          example: 3.4.4
        Title:
          type: string
          description: Short package title
          example: Create Elegant Data Visualisations Using the Grammar of Graphics
        Description:
          type: string
          description: Full package description
        Author:
          type: string
          description: Package authors
        Maintainer:
          type: string
          description: Package maintainer with email
          example: Hadley Wickham <hadley@posit.co>
        License:
          type: string
          description: Package license
          example: MIT + file LICENSE
        Depends:
          type: string
          description: Required R version and packages
        Imports:
          type: string
          description: Imported packages
        Suggests:
          type: string
          description: Suggested packages
        Date:
          type: string
          format: date
          description: Publication date
        URL:
          type: string
          description: Package website URL
        BugReports:
          type: string
          description: Bug report URL