Search the Bundestag lobbyregister
Source:R/adapt_bundestag_lobbyregister.R
bundestag_lobbyregister_search.RdSearch the Bundestag lobbyregister
Usage
bundestag_lobbyregister_search(
q = NULL,
sort = NULL,
safe = TRUE,
refresh = FALSE,
flatten = FALSE,
flatten_mode = "json"
)Arguments
- q
Optional search string.
- sort
Optional sorting order.
- safe
Logical; if
TRUE(default), apply rate-limiting and cache GET responses totools::R_user_dir("bunddev", "cache").- refresh
Logical; if
TRUE, ignore cached responses and re-fetch from the API (defaultFALSE).- flatten
Logical; if
TRUE, simplify nested list columns according toflatten_mode. DefaultFALSEkeeps list columns as-is.- flatten_mode
How to handle list columns when
flatten = TRUE:"drop"Remove list columns entirely. Use when nested data is not needed.
"json"Convert each list element to a JSON string. Preserves all data in a text-queryable format. This is the default.
"unnest"Expand list columns into multiple rows via
tidyr::unnest_longer(). Warning: this can significantly increase the number of rows.
Value
A one-row tibble with search metadata:
- source
Source label from the API payload (character).
- source_url
Source URL (character).
- search_url
URL of the executed search (character).
- search_date
Search timestamp/date string (character).
- search_parameters
Effective search parameter object (list-column).
- result_count
Total result count (integer).
- results
Search result entries (list-column).
Details
Returns search results from the Bundestag lobbyregister. API documentation: https://bundesapi.github.io/bundestag-lobbyregister-api/.