opendatasus_catalogo: Search the OpenDataSUS catalog

View source: R/opendatasus.R

opendatasus_catalogoR Documentation

Description

Searches the current OpenDataSUS portal and returns lightweight metadata for matching datasets. Use [opendatasus_recursos()] to inspect the files and API links published for one dataset.

Usage

opendatasus_catalogo(
  busca = NULL,
  grupo = NULL,
  formato = NULL,
  pagina = 1L,
  limite = 20L,
  cache = TRUE,
  atualizar = FALSE
)

Arguments

busca

Optional free-text search.

grupo

Optional OpenDataSUS group slug.

formato

Optional resource format, such as '"CSV"', '"JSON"' or '"PDF"'.

pagina

Positive page number.

limite

Number of results requested per page.

cache

Whether to cache portal metadata for the duration controlled by option 'datasus.cache_ttl'.

atualizar

Whether to ignore cached metadata and query the portal again.

Value

A data frame with dataset names, titles, descriptions, formats and groups. Attribute '"datasus_proveniencia"' records the source and consultation time.

Examples


old_options <- options(
  datasus.timeout = 5,
  datasus.download_timeout = 15,
  datasus.max_tries = 1
)
try({
opendatasus_catalogo("dengue")
opendatasus_catalogo(grupo = "arboviroses", formato = "CSV")
})
options(old_options)


datasus documentation built on Oct. 7, 2026, 1:07 a.m.