| Title: | Access the 'ObrasGov' Open Data API |
|---|---|
| Description: | Provides a modern interface to the Brazilian federal government's 'ObrasGov' open data application programming interface (<https://api-publica.obrasgov.gestao.gov.br>). Retrieves data about public infrastructure projects, physical execution, contracts, commitments, geometries, feasibility studies, and project status histories. Results are returned as tidy tibbles with typed date columns, preserved nested relationships, pagination metadata, and optional multi-page collection. |
| Authors: | Andre Leite [aut, cre] (ORCID: <https://orcid.org/0000-0002-4718-9766>), Marcos Wasiliew [aut], Hugo Vasconcelos [aut] (ORCID: <https://orcid.org/0000-0001-6249-0920>), Carlos Amorim [aut] (ORCID: <https://orcid.org/0000-0001-6315-8305>), Diogo Bezerra [aut] (ORCID: <https://orcid.org/0000-0002-1216-8674>) |
| Maintainer: | Andre Leite <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-07-24 12:15:44 UTC |
| Source: | https://github.com/cran/obrasgovr |
Retrieve budget commitments
get_commitments( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_empenhos( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )get_commitments( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_empenhos( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )
... |
Named filters. See |
page |
First page to retrieve, starting at 1. |
page_size |
Number of records per page, between 1 and 200. |
all_pages |
If |
page_limit |
Maximum number of pages to retrieve when |
base_url |
HTTPS base URL. By default, uses the |
pagina, tamanho_da_pagina, todas_paginas, limite_paginas
|
Portuguese
aliases for |
A tibble containing budget commitments and financial execution amounts.
Other API resources:
get_contracts(),
get_feasibility_studies(),
get_geometries(),
get_last_update(),
get_physical_execution(),
get_projects(),
get_status_history()
if (interactive()) { get_commitments(id_projeto_investimento = "134851.26-07") }if (interactive()) { get_commitments(id_projeto_investimento = "134851.26-07") }
Retrieve contracts
get_contracts( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_contratos( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )get_contracts( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_contratos( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )
... |
Named filters. See |
page |
First page to retrieve, starting at 1. |
page_size |
Number of records per page, between 1 and 200. |
all_pages |
If |
page_limit |
Maximum number of pages to retrieve when |
base_url |
HTTPS base URL. By default, uses the |
pagina, tamanho_da_pagina, todas_paginas, limite_paginas
|
Portuguese
aliases for |
A tibble containing contracts linked to infrastructure projects.
Other API resources:
get_commitments(),
get_feasibility_studies(),
get_geometries(),
get_last_update(),
get_physical_execution(),
get_projects(),
get_status_history()
if (interactive()) { get_contracts(id_projeto_investimento = "134851.26-07") }if (interactive()) { get_contracts(id_projeto_investimento = "134851.26-07") }
Retrieve feasibility studies
get_feasibility_studies( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_estudos_viabilidade( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )get_feasibility_studies( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_estudos_viabilidade( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )
... |
Named filters. See |
page |
First page to retrieve, starting at 1. |
page_size |
Number of records per page, between 1 and 200. |
all_pages |
If |
page_limit |
Maximum number of pages to retrieve when |
base_url |
HTTPS base URL. By default, uses the |
pagina, tamanho_da_pagina, todas_paginas, limite_paginas
|
Portuguese
aliases for |
A tibble containing feasibility studies linked to projects.
Other API resources:
get_commitments(),
get_contracts(),
get_geometries(),
get_last_update(),
get_physical_execution(),
get_projects(),
get_status_history()
if (interactive()) { get_feasibility_studies(id_projeto_investimento = "134851.26-07") }if (interactive()) { get_feasibility_studies(id_projeto_investimento = "134851.26-07") }
Retrieve geometries
get_geometries( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_geometrias( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )get_geometries( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_geometrias( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )
... |
Named filters. See |
page |
First page to retrieve, starting at 1. |
page_size |
Number of records per page, between 1 and 200. |
all_pages |
If |
page_limit |
Maximum number of pages to retrieve when |
base_url |
HTTPS base URL. By default, uses the |
pagina, tamanho_da_pagina, todas_paginas, limite_paginas
|
Portuguese
aliases for |
A tibble containing geometries and territorial identifiers.
Other API resources:
get_commitments(),
get_contracts(),
get_feasibility_studies(),
get_last_update(),
get_physical_execution(),
get_projects(),
get_status_history()
if (interactive()) { get_geometries(sg_uf = "PE", page_size = 10) }if (interactive()) { get_geometries(sg_uf = "PE", page_size = 10) }
Retrieve the data update timestamp
get_last_update(base_url = .obrasgovr_base_url()) obter_data_atualizacao(base_url = .obrasgovr_base_url())get_last_update(base_url = .obrasgovr_base_url()) obter_data_atualizacao(base_url = .obrasgovr_base_url())
base_url |
HTTPS base URL. By default, uses the |
A POSIXct value in the UTC time zone.
Other API resources:
get_commitments(),
get_contracts(),
get_feasibility_studies(),
get_geometries(),
get_physical_execution(),
get_projects(),
get_status_history()
if (interactive()) { get_last_update() }if (interactive()) { get_last_update() }
Retrieve physical execution data
get_physical_execution( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_execucao_fisica( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )get_physical_execution( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_execucao_fisica( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )
... |
Named filters. See |
page |
First page to retrieve, starting at 1. |
page_size |
Number of records per page, between 1 and 200. |
all_pages |
If |
page_limit |
Maximum number of pages to retrieve when |
base_url |
HTTPS base URL. By default, uses the |
pagina, tamanho_da_pagina, todas_paginas, limite_paginas
|
Portuguese
aliases for |
A tibble containing execution percentages, instruments, and dates.
Other API resources:
get_commitments(),
get_contracts(),
get_feasibility_studies(),
get_geometries(),
get_last_update(),
get_projects(),
get_status_history()
if (interactive()) { get_physical_execution(id_projeto_investimento = "134851.26-07") }if (interactive()) { get_physical_execution(id_projeto_investimento = "134851.26-07") }
Retrieves infrastructure projects and their nested relationships, including executors, recipients, funding sources, policy areas, and point geometries.
get_projects( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_projetos( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )get_projects( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_projetos( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )
... |
Named filters accepted by the resource. See the complete list
with |
page |
First page to retrieve, starting at 1. |
page_size |
Number of records per page, between 1 and 200. |
all_pages |
If |
page_limit |
Maximum number of pages to retrieve when |
base_url |
HTTPS base URL. By default, uses the |
pagina, tamanho_da_pagina, todas_paginas, limite_paginas
|
Portuguese
aliases for |
A tibble. One-to-many relationships are preserved in list-columns.
Use result_metadata() to inspect pagination information.
Other API resources:
get_commitments(),
get_contracts(),
get_feasibility_studies(),
get_geometries(),
get_last_update(),
get_physical_execution(),
get_status_history()
if (interactive()) { get_projects(uf_principal = "PE", page_size = 10) }if (interactive()) { get_projects(uf_principal = "PE", page_size = 10) }
Retrieves the histories of cancelled or suspended projects, including reasons and remedial actions.
get_status_history( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_historico_situacao( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )get_status_history( ..., page = 1L, page_size = 50L, all_pages = FALSE, page_limit = Inf, base_url = .obrasgovr_base_url() ) obter_historico_situacao( ..., pagina = 1L, tamanho_da_pagina = 50L, todas_paginas = FALSE, limite_paginas = Inf, base_url = .obrasgovr_base_url() )
... |
Named filters. See |
page |
First page to retrieve, starting at 1. |
page_size |
Number of records per page, between 1 and 200. |
all_pages |
If |
page_limit |
Maximum number of pages to retrieve when |
base_url |
HTTPS base URL. By default, uses the |
pagina, tamanho_da_pagina, todas_paginas, limite_paginas
|
Portuguese
aliases for |
A tibble containing project status histories.
Other API resources:
get_commitments(),
get_contracts(),
get_feasibility_studies(),
get_geometries(),
get_last_update(),
get_physical_execution(),
get_projects()
if (interactive()) { get_status_history(id_projeto_investimento = "134851.26-07") }if (interactive()) { get_status_history(id_projeto_investimento = "134851.26-07") }
Lists the filters published in the OpenAPI contract supported by this package. Unknown filters are rejected before a request is sent to prevent silently incorrect queries. Filter names and categorical values remain in Portuguese because they are part of the upstream API contract.
list_filters(resource) obrasgov_filtros(recurso)list_filters(resource) obrasgov_filtros(recurso)
resource |
A resource name returned by |
recurso |
Portuguese alias for |
A tibble containing filter names, expected types, and allowed values when applicable.
list_filters("projects")list_filters("projects")
List available ObrasGov API resources
list_resources() obrasgov_recursos()list_resources() obrasgov_recursos()
A tibble containing each resource name, its corresponding function, API endpoint, and whether it is paginated.
list_resources()list_resources()
Retrieve pagination metadata
result_metadata(x) obrasgov_metadados(x)result_metadata(x) obrasgov_metadados(x)
x |
A tibble returned by a paginated package function. |
A list containing the resource, totals reported by the API, and
retrieved pages; NULL for other objects.
result_metadata(tibble::tibble())result_metadata(tibble::tibble())