5  Programmatic access (APIs)

R-universe provides several APIs for programmatic access, requiring no authentication. Thanks to the APIs you can list universes, packages in an universe, get information on packages, perform searches.

You can interact with the API in two ways:
- Create API calls “manually” in the command-line or R.
- Use the universe R package available from rOpenSci’s R-universe.

This page demonstrates usage with {httr2} or {universe} directly.

5.1 Universe-specific APIs

API endpoints start with the universe URL.
This documentation uses https://jeroen.r-universe.dev as an example, but you can replace it with any universe URL.

5.1.1 List of all universes

URL: https://r-universe.dev/api/everyone

Example using {httr2}:

universes <- httr2::request("https://r-universe.dev/api/everyone") |>
  httr2::req_user_agent("R-universe docs") |>
  httr2::req_perform() |>
  httr2::resp_body_json()
str(universes, max.level = 1)
List of 2
 $ universes  :List of 11184
 $ maintainers:List of 10835
head(universes[["universes"]])
[[1]]
[1] "0011235813"

[[2]]
[1] "09dohkim"

[[3]]
[1] "0diraf"

[[4]]
[1] "1-0-go"

[[5]]
[1] "1001oreos"

[[6]]
[1] "16eagle"
head(universes[["maintainers"]])
[[1]]
[1] "000100100110001"

[[2]]
[1] "0011235813"

[[3]]
[1] "09dohkim"

[[4]]
[1] "1-0-go"

[[5]]
[1] "1001oreos"

[[6]]
[1] "123caj"

Example using {universe}:

universe::everyone() |> head()
[1] "000100100110001" "0011235813"      "09dohkim"        "1-0-go"         
[5] "1001oreos"       "123caj"         
universe::everyone(type = "universes") |> head()
[1] "0011235813" "09dohkim"   "0diraf"     "1-0-go"     "1001oreos" 
[6] "16eagle"   
universe::everyone(type = "maintainers") |> head()
[1] "000100100110001" "0011235813"      "09dohkim"        "1-0-go"         
[5] "1001oreos"       "123caj"         

5.1.2 List of packages in an universe

URL: https://<username>.r-universe.dev/api/ls

Example using {httr2}:

packages <- httr2::request("https://jeroen.r-universe.dev/api/ls") |>
  httr2::req_user_agent("R-universe docs") |>
  httr2::req_perform() |>
  httr2::resp_body_json()
str(packages)
List of 18
 $ : chr "RAppArmor"
 $ : chr "V8"
 $ : chr "badgen"
 $ : chr "base64"
 $ : chr "bcrypt"
 $ : chr "brotli"
 $ : chr "curl"
 $ : chr "js"
 $ : chr "jsonlite"
 $ : chr "maketools"
 $ : chr "mongolite"
 $ : chr "openssl"
 $ : chr "protolite"
 $ : chr "rjade"
 $ : chr "sys"
 $ : chr "unix"
 $ : chr "webp"
 $ : chr "webutils"

Example using {universe}:

packages <- universe::universe_ls("jeroen")
str(packages)
 chr [1:18] "RAppArmor" "V8" "badgen" "base64" "bcrypt" "brotli" "curl" ...

5.1.3 Information of all packages in an universe

URL: https://<username>.r-universe.dev/api/packages

Parameters:

  • limit: Maximum number of results (default: 100). Use the ls endpoint to determine the total number of packages and adjust the limit accordingly.

Example using {httr2}:

packages <- httr2::request("https://jeroen.r-universe.dev/api/packages") |>
  httr2::req_user_agent("R-universe docs") |>
  httr2::req_perform() |>
  httr2::resp_body_json()
# The result is a list of packages
str(packages[[1]], max.level = 1)
List of 73
 $ Package                : chr "openssl"
 $ Type                   : chr "Package"
 $ Title                  : chr "Toolkit for Encryption, Signatures and Certificates Based on\nOpenSSL"
 $ Version                : chr "2.4.2"
 $ Authors@R              : chr "c(person(\"Jeroen\", \"Ooms\", role = c(\"aut\", \"cre\"), email = \"[email protected]\",\ncomment = c(ORCID"| __truncated__
 $ Description            : chr "Bindings to OpenSSL libssl and libcrypto, plus custom SSH\nkey parsers. Supports RSA, DSA and EC curves P-256, "| __truncated__
 $ License                : chr "MIT + file LICENSE"
 $ URL                    : chr "https://jeroen.r-universe.dev/openssl"
 $ BugReports             : chr "https://github.com/jeroen/openssl/issues"
 $ SystemRequirements     : chr "OpenSSL >= 1.0.2"
 $ VignetteBuilder        : chr "knitr"
 $ Encoding               : chr "UTF-8"
 $ Roxygen                : chr "list(markdown = TRUE)"
 $ Config/roxygen2/version: chr "8.0.0"
 $ Config/pak/sysreqs     : chr "libssl-dev"
 $ Repository             : chr "https://jeroen.r-universe.dev"
 $ Date/Publication       : chr "2026-06-14 16:11:54 UTC"
 $ RemoteUrl              : chr "https://github.com/jeroen/openssl"
 $ RemoteRef              : chr "HEAD"
 $ RemoteSha              : chr "d29241388f4caad8408389ad9c2a9bb521f339a3"
 $ NeedsCompilation       : chr "yes"
 $ Packaged               :List of 2
 $ Author                 : chr "Jeroen Ooms [aut, cre] (ORCID: <https://orcid.org/0000-0002-4035-0289>),\nOliver Keyes [ctb]"
 $ Maintainer             : chr "Jeroen Ooms <[email protected]>"
 $ MD5sum                 : chr "57f11a3209c6ab7667eb2d59126f161a"
 $ _user                  : chr "jeroen"
 $ _type                  : chr "src"
 $ _file                  : chr "openssl_2.4.2.tar.gz"
 $ _fileid                : chr "92c308475085332efe054363365e76a8b482f20a19f03f6c7d9dd90bded3b9fe"
 $ _filesize              : int 501109
 $ _sha256                : chr "92c308475085332efe054363365e76a8b482f20a19f03f6c7d9dd90bded3b9fe"
 $ _created               : chr "2026-06-14T16:19:15.000Z"
 $ _published             : chr "2026-06-14T16:24:28.420Z"
 $ _distro                : chr "noble"
 $ _jobs                  :List of 13
 $ _buildurl              : chr "https://github.com/r-universe/jeroen/actions/runs/27504718609"
 $ _status                : chr "success"
 $ _host                  : chr "GitHub-Actions"
 $ _upstream              : chr "https://github.com/jeroen/openssl"
 $ _commit                :List of 5
 $ _maintainer            :List of 8
 $ _registered            : logi TRUE
 $ _dependencies          :List of 9
 $ _owner                 : chr "jeroen"
 $ _selfowned             : logi TRUE
 $ _usedby                : int 5125
 $ _updates               :List of 6
 $ _tags                  : list()
 $ _stars                 : int 67
 $ _contributors          :List of 15
 $ _userbio               :List of 5
 $ _downloads             :List of 2
 $ _mentions              : int 7
 $ _devurl                : chr "https://github.com/jeroen/openssl"
 $ _searchresults         : int 2116
 $ _topics                :List of 1
 $ _rbuild                : chr "4.6.0"
 $ _assets                :List of 12
 $ _homeurl               : chr "https://github.com/jeroen/openssl"
 $ _realowner             : chr "jeroen"
 $ _cranurl               : logi TRUE
 $ _releases              :List of 54
 $ _exports               :List of 79
 $ _help                  :List of 22
 $ _readme                : chr "https://github.com/jeroen/openssl/raw/HEAD/README.md"
 $ _rundeps               :List of 2
 $ _sysdeps               :List of 2
 $ _vignettes             :List of 4
 $ _score                 : num 18.4
 $ _indexed               : logi TRUE
 $ _nocasepkg             : chr "openssl"
 $ _universes             :List of 1
 $ _binaries              :List of 12

Example using {universe}:

packages <- universe::universe_all_packages("jeroen")
# The result is a list of packages
str(packages[[1]], max.level = 1)
List of 73
 $ Package                : chr "openssl"
 $ Type                   : chr "Package"
 $ Title                  : chr "Toolkit for Encryption, Signatures and Certificates Based on\nOpenSSL"
 $ Version                : chr "2.4.2"
 $ Authors@R              : chr "c(person(\"Jeroen\", \"Ooms\", role = c(\"aut\", \"cre\"), email = \"[email protected]\",\ncomment = c(ORCID"| __truncated__
 $ Description            : chr "Bindings to OpenSSL libssl and libcrypto, plus custom SSH\nkey parsers. Supports RSA, DSA and EC curves P-256, "| __truncated__
 $ License                : chr "MIT + file LICENSE"
 $ URL                    : chr "https://jeroen.r-universe.dev/openssl"
 $ BugReports             : chr "https://github.com/jeroen/openssl/issues"
 $ SystemRequirements     : chr "OpenSSL >= 1.0.2"
 $ VignetteBuilder        : chr "knitr"
 $ Encoding               : chr "UTF-8"
 $ Roxygen                : chr "list(markdown = TRUE)"
 $ Config/roxygen2/version: chr "8.0.0"
 $ Config/pak/sysreqs     : chr "libssl-dev"
 $ Repository             : chr "https://jeroen.r-universe.dev"
 $ Date/Publication       : chr "2026-06-14 16:11:54 UTC"
 $ RemoteUrl              : chr "https://github.com/jeroen/openssl"
 $ RemoteRef              : chr "HEAD"
 $ RemoteSha              : chr "d29241388f4caad8408389ad9c2a9bb521f339a3"
 $ NeedsCompilation       : chr "yes"
 $ Packaged               :List of 2
 $ Author                 : chr "Jeroen Ooms [aut, cre] (ORCID: <https://orcid.org/0000-0002-4035-0289>),\nOliver Keyes [ctb]"
 $ Maintainer             : chr "Jeroen Ooms <[email protected]>"
 $ MD5sum                 : chr "57f11a3209c6ab7667eb2d59126f161a"
 $ _user                  : chr "jeroen"
 $ _type                  : chr "src"
 $ _file                  : chr "openssl_2.4.2.tar.gz"
 $ _fileid                : chr "92c308475085332efe054363365e76a8b482f20a19f03f6c7d9dd90bded3b9fe"
 $ _filesize              : int 501109
 $ _sha256                : chr "92c308475085332efe054363365e76a8b482f20a19f03f6c7d9dd90bded3b9fe"
 $ _created               : chr "2026-06-14T16:19:15.000Z"
 $ _published             : chr "2026-06-14T16:24:28.420Z"
 $ _distro                : chr "noble"
 $ _jobs                  :List of 13
 $ _buildurl              : chr "https://github.com/r-universe/jeroen/actions/runs/27504718609"
 $ _status                : chr "success"
 $ _host                  : chr "GitHub-Actions"
 $ _upstream              : chr "https://github.com/jeroen/openssl"
 $ _commit                :List of 5
 $ _maintainer            :List of 8
 $ _registered            : logi TRUE
 $ _dependencies          :List of 9
 $ _owner                 : chr "jeroen"
 $ _selfowned             : logi TRUE
 $ _usedby                : int 5125
 $ _updates               :List of 6
 $ _tags                  : list()
 $ _stars                 : int 67
 $ _contributors          :List of 15
 $ _userbio               :List of 5
 $ _downloads             :List of 2
 $ _mentions              : int 7
 $ _devurl                : chr "https://github.com/jeroen/openssl"
 $ _searchresults         : int 2116
 $ _topics                :List of 1
 $ _rbuild                : chr "4.6.0"
 $ _assets                :List of 12
 $ _homeurl               : chr "https://github.com/jeroen/openssl"
 $ _realowner             : chr "jeroen"
 $ _cranurl               : logi TRUE
 $ _releases              :List of 54
 $ _exports               :List of 79
 $ _help                  :List of 22
 $ _readme                : chr "https://github.com/jeroen/openssl/raw/HEAD/README.md"
 $ _rundeps               :List of 2
 $ _sysdeps               :List of 2
 $ _vignettes             :List of 4
 $ _score                 : num 18.4
 $ _indexed               : logi TRUE
 $ _nocasepkg             : chr "openssl"
 $ _universes             :List of 1
 $ _binaries              :List of 12

5.1.4 Information on a single package in an universe

URL: https://<username>.r-universe.dev/api/packages/<package>

Fields that start with an underscore _, like _topics, are not present in the DESCRIPTION file. Note that some fields that do not start with an underscore (the fields Date/Publication, Repository, RemoteUrl, RemoteRef and RemoteSha) get automatically inserted in the DESCRIPTION file by our build system. These same fields would be added automatically if you install a package using for instance install_github(). The main purpose is that for instance the renv package will know where to find the source for the package, if it needs to pin an exact version.

Example using {httr2}:

v8 <- httr2::request("https://jeroen.r-universe.dev/api/packages/V8") |>
  httr2::req_user_agent("R-universe docs") |>
  httr2::req_perform() |>
  httr2::resp_body_json()

str(v8, max.level = 1)
List of 77
 $ _id               : chr "6a2a57b47b7a29ca600399ac"
 $ Package           : chr "V8"
 $ Type              : chr "Package"
 $ Title             : chr "Embedded JavaScript and WebAssembly Engine for R"
 $ Version           : chr "8.2.0"
 $ Authors@R         : chr "c(\nperson(\"Jeroen\", \"Ooms\", role = c(\"aut\", \"cre\"), email = \"[email protected]\",\ncomment = c(ORC"| __truncated__
 $ Description       : chr "An R interface to V8 <https://v8.dev>: Google's open\nsource JavaScript and WebAssembly engine. This package ca"| __truncated__
 $ License           : chr "MIT + file LICENSE"
 $ URL               : chr "https://jeroen.r-universe.dev/V8"
 $ BugReports        : chr "https://github.com/jeroen/v8/issues"
 $ SystemRequirements: chr "On Linux you can build against libv8-dev (Debian)\nor v8-devel (Fedora). We also provide static libv8 binaries "| __truncated__
 $ NeedsCompilation  : chr "yes"
 $ VignetteBuilder   : chr "knitr"
 $ RoxygenNote       : chr "7.3.1"
 $ Roxygen           : chr "list(load = \"installed\", markdown = TRUE)"
 $ Language          : chr "en-US"
 $ Encoding          : chr "UTF-8"
 $ Biarch            : chr "true"
 $ Config/pak/sysreqs: chr "libnode-dev"
 $ Repository        : chr "https://jeroen.r-universe.dev"
 $ Date/Publication  : chr "2026-05-12 18:07:22 UTC"
 $ RemoteUrl         : chr "https://github.com/jeroen/v8"
 $ RemoteRef         : chr "HEAD"
 $ RemoteSha         : chr "6d4c1cb9d24074df1a6522f368c768ed84440146"
 $ Packaged          :List of 2
 $ Author            : chr "Jeroen Ooms [aut, cre] (ORCID: <https://orcid.org/0000-0002-4035-0289>),\nGeorge Stagg [ctb] (ORCID: <https://o"| __truncated__
 $ Maintainer        : chr "Jeroen Ooms <[email protected]>"
 $ MD5sum            : chr "c32e7cba25883ac271b1486f92850ab3"
 $ _user             : chr "jeroen"
 $ _type             : chr "src"
 $ _file             : chr "V8_8.2.0.tar.gz"
 $ _fileid           : chr "12a6c2c9d298f16add6065c33e567171e0dae52e6002dcd0d8585c9c44e291dd"
 $ _filesize         : int 202712
 $ _sha256           : chr "12a6c2c9d298f16add6065c33e567171e0dae52e6002dcd0d8585c9c44e291dd"
 $ _created          : chr "2026-06-11T06:32:14.000Z"
 $ _published        : chr "2026-06-11T06:37:40.926Z"
 $ _distro           : chr "noble"
 $ _jobs             :List of 13
 $ _buildurl         : chr "https://github.com/r-universe/jeroen/actions/runs/27328357759"
 $ _status           : chr "success"
 $ _host             : chr "GitHub-Actions"
 $ _upstream         : chr "https://github.com/jeroen/v8"
 $ _commit           :List of 5
 $ _maintainer       :List of 8
 $ _registered       : logi TRUE
 $ _dependencies     :List of 8
 $ _owner            : chr "jeroen"
 $ _selfowned        : logi TRUE
 $ _usedby           : int 443
 $ _updates          :List of 18
 $ _tags             :List of 1
 $ _topics           :List of 4
 $ _stars            : int 207
 $ _contributors     :List of 11
 $ _userbio          :List of 4
 $ _downloads        :List of 2
 $ _mentions         : int 2
 $ _devurl           : chr "https://github.com/jeroen/v8"
 $ _searchresults    : int 616
 $ _rbuild           : chr "4.6.0"
 $ _assets           :List of 11
 $ _homeurl          : chr "https://github.com/jeroen/v8"
 $ _realowner        : chr "jeroen"
 $ _cranurl          : logi TRUE
 $ _releases         :List of 61
 $ _exports          :List of 6
 $ _help             :List of 3
 $ _pkglogo          : chr "https://github.com/jeroen/v8/raw/HEAD/man/figures/logo.svg"
 $ _readme           : chr "https://github.com/jeroen/v8/raw/HEAD/README.md"
 $ _rundeps          :List of 3
 $ _sysdeps          :List of 1
 $ _vignettes        :List of 2
 $ _score            : num 16.4
 $ _indexed          : logi TRUE
 $ _nocasepkg        : chr "v8"
 $ _universes        :List of 1
 $ _binaries         :List of 12

Example using {universe}:

V8 <- universe::universe_one_package("jeroen", "V8")
# The result is a list
str(V8, max.level = 1)
List of 77
 $ _id               : chr "6a2a57b47b7a29ca600399ac"
 $ Package           : chr "V8"
 $ Type              : chr "Package"
 $ Title             : chr "Embedded JavaScript and WebAssembly Engine for R"
 $ Version           : chr "8.2.0"
 $ Authors@R         : chr "c(\nperson(\"Jeroen\", \"Ooms\", role = c(\"aut\", \"cre\"), email = \"[email protected]\",\ncomment = c(ORC"| __truncated__
 $ Description       : chr "An R interface to V8 <https://v8.dev>: Google's open\nsource JavaScript and WebAssembly engine. This package ca"| __truncated__
 $ License           : chr "MIT + file LICENSE"
 $ URL               : chr "https://jeroen.r-universe.dev/V8"
 $ BugReports        : chr "https://github.com/jeroen/v8/issues"
 $ SystemRequirements: chr "On Linux you can build against libv8-dev (Debian)\nor v8-devel (Fedora). We also provide static libv8 binaries "| __truncated__
 $ NeedsCompilation  : chr "yes"
 $ VignetteBuilder   : chr "knitr"
 $ RoxygenNote       : chr "7.3.1"
 $ Roxygen           : chr "list(load = \"installed\", markdown = TRUE)"
 $ Language          : chr "en-US"
 $ Encoding          : chr "UTF-8"
 $ Biarch            : chr "true"
 $ Config/pak/sysreqs: chr "libnode-dev"
 $ Repository        : chr "https://jeroen.r-universe.dev"
 $ Date/Publication  : chr "2026-05-12 18:07:22 UTC"
 $ RemoteUrl         : chr "https://github.com/jeroen/v8"
 $ RemoteRef         : chr "HEAD"
 $ RemoteSha         : chr "6d4c1cb9d24074df1a6522f368c768ed84440146"
 $ Packaged          :List of 2
 $ Author            : chr "Jeroen Ooms [aut, cre] (ORCID: <https://orcid.org/0000-0002-4035-0289>),\nGeorge Stagg [ctb] (ORCID: <https://o"| __truncated__
 $ Maintainer        : chr "Jeroen Ooms <[email protected]>"
 $ MD5sum            : chr "c32e7cba25883ac271b1486f92850ab3"
 $ _user             : chr "jeroen"
 $ _type             : chr "src"
 $ _file             : chr "V8_8.2.0.tar.gz"
 $ _fileid           : chr "12a6c2c9d298f16add6065c33e567171e0dae52e6002dcd0d8585c9c44e291dd"
 $ _filesize         : int 202712
 $ _sha256           : chr "12a6c2c9d298f16add6065c33e567171e0dae52e6002dcd0d8585c9c44e291dd"
 $ _created          : chr "2026-06-11T06:32:14.000Z"
 $ _published        : chr "2026-06-11T06:37:40.926Z"
 $ _distro           : chr "noble"
 $ _jobs             :List of 13
 $ _buildurl         : chr "https://github.com/r-universe/jeroen/actions/runs/27328357759"
 $ _status           : chr "success"
 $ _host             : chr "GitHub-Actions"
 $ _upstream         : chr "https://github.com/jeroen/v8"
 $ _commit           :List of 5
 $ _maintainer       :List of 8
 $ _registered       : logi TRUE
 $ _dependencies     :List of 8
 $ _owner            : chr "jeroen"
 $ _selfowned        : logi TRUE
 $ _usedby           : int 443
 $ _updates          :List of 18
 $ _tags             :List of 1
 $ _topics           :List of 4
 $ _stars            : int 207
 $ _contributors     :List of 11
 $ _userbio          :List of 4
 $ _downloads        :List of 2
 $ _mentions         : int 2
 $ _devurl           : chr "https://github.com/jeroen/v8"
 $ _searchresults    : int 616
 $ _rbuild           : chr "4.6.0"
 $ _assets           :List of 11
 $ _homeurl          : chr "https://github.com/jeroen/v8"
 $ _realowner        : chr "jeroen"
 $ _cranurl          : logi TRUE
 $ _releases         :List of 61
 $ _exports          :List of 6
 $ _help             :List of 3
 $ _pkglogo          : chr "https://github.com/jeroen/v8/raw/HEAD/man/figures/logo.svg"
 $ _readme           : chr "https://github.com/jeroen/v8/raw/HEAD/README.md"
 $ _rundeps          :List of 3
 $ _sysdeps          :List of 1
 $ _vignettes        :List of 2
 $ _score            : num 16.4
 $ _indexed          : logi TRUE
 $ _nocasepkg        : chr "v8"
 $ _universes        :List of 1
 $ _binaries         :List of 12

5.2 Database dump

URL: https://<username>.r-universe.dev/api/dbdump

This API endpoint is not supported by the universe package yet.

ropensci <- mongolite::read_bson('https://ropensci.r-universe.dev/api/dbdump')

5.2.1 Search in an universe

URL: https://<username>.r-universe.dev/api/search Parameters:

  • q: Query string (supports advanced fields).
  • limit: Maximum number of results (default: 100). To retrieve all results:
    • Perform an initial query to get the value of the total field.
    • Perform a second query with limit=total.

Using {httr2}:

How many packages in the rOpenSci universe depend on httr2?

deps <- httr2::request("https://ropensci.r-universe.dev/api/search") |>
  httr2::req_url_query(q = 'needs:httr2') |> # packages depending on {httr2}
  httr2::req_user_agent("R-universe docs") |>
  httr2::req_perform() |>
  httr2::resp_body_json()

str(deps, max.level = 1)
List of 5
 $ results:List of 47
 $ query  :List of 2
 $ skip   : int 0
 $ limit  : int 100
 $ total  : int 47
deps$total
[1] 47

Using {universe}:

deps <- universe::universe_search("ropensci", query = 'needs:httr2')
# The result is a list of packages
str(deps, max.level = 1)
List of 5
 $ results:List of 47
 $ query  :List of 2
 $ skip   : int 0
 $ limit  : int 100
 $ total  : int 47
deps$total
[1] 47

5.4 Database dump (all universes)

URL: https://r-universe.dev/api/dbdump

This API endpoint is not supported by the universe package yet.

dump <- mongolite::read_bson('https://r-universe.dev/api/dbdump')