R

R Badges API

Download count badge endpoints

Operations 1

GET /badges/{period}/{package} Get Download Count Badge #

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-badges-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-badges-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: METACRAN CranLogs Badges API
  description: REST API providing download statistics for R packages from the RStudio CRAN mirror. Supports per-package and top-package download counts across daily, weekly, monthly, and all-time periods. Returns JSON responses.
  version: 1.0.0
  contact:
    name: METACRAN
    url: https://r-pkg.org
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: https://cranlogs.r-pkg.org
  description: METACRAN CranLogs production server
tags:
- name: Badges
  description: Download count badge endpoints
paths:
  /badges/{period}/{package}:
    get:
      operationId: getDownloadBadge
      summary: Get Download Count Badge
      description: Returns an SVG badge showing the download count for an R package over the specified period. Suitable for embedding in README files.
      tags:
      - Badges
      parameters:
      - name: period
        in: path
        required: true
        description: Badge period (last-day, last-week, grand-total)
        schema:
          type: string
          enum:
          - last-day
          - last-week
          - grand-total
          example: grand-total
      - name: package
        in: path
        required: true
        description: R package name
        schema:
          type: string
          example: Rcpp
      responses:
        '200':
          description: SVG badge image
          content:
            image/svg+xml:
              schema:
                type: string