| Title: | Interact with the 'US Senate Lobbying Disclosure API' |
|---|---|
| Description: | Download and read data on lobbying in the United States Congress. Data is queried from the Senate's Application Programming Interface (<https://lda.senate.gov/api/>). This supports filings since 2008. Functions exist for all primary data endpoints, including queries by filings, contributions, registrations, clients, and lobbyists. |
| Authors: | Christopher T. Kenny [aut, cre] (ORCID: <https://orcid.org/0000-0002-9386-6860>) |
| Maintainer: | Christopher T. Kenny <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.2 |
| Built: | 2026-05-31 06:19:39 UTC |
| Source: | https://github.com/christopherkenny/lobby |
Check or Get US Senate Lobbying Disclosure API Key
has_lobby_key() get_lobby_key() lob_get_key() lob_has_key()has_lobby_key() get_lobby_key() lob_get_key() lob_has_key()
logical if has, key if get
has_lobby_key()has_lobby_key()
Get constants
lob_constants_filing_types() lob_constants_lobbying_activity_issues() lob_constants_government_entities() lob_constants_countries() lob_constants_states() lob_constants_prefixes() lob_constants_suffixes() lob_constants_contribution_item_types()lob_constants_filing_types() lob_constants_lobbying_activity_issues() lob_constants_government_entities() lob_constants_countries() lob_constants_states() lob_constants_prefixes() lob_constants_suffixes() lob_constants_contribution_item_types()
a tibble of lobbyists
lob_constants_filing_types() lob_constants_lobbying_activity_issues() lob_constants_government_entities() lob_constants_countries() lob_constants_states() lob_constants_prefixes() lob_constants_suffixes() lob_constants_contribution_item_types()lob_constants_filing_types() lob_constants_lobbying_activity_issues() lob_constants_government_entities() lob_constants_countries() lob_constants_states() lob_constants_prefixes() lob_constants_suffixes() lob_constants_contribution_item_types()
List Lobbying Filings
lob_list_clients( client_country = NULL, client_name = NULL, client_ppb_country = NULL, client_ppb_state = NULL, client_state = NULL, id = NULL, ordering = NULL, page = NULL, page_size = NULL, registrant_id = NULL, registrant_name = NULL, clean = TRUE )lob_list_clients( client_country = NULL, client_name = NULL, client_ppb_country = NULL, client_ppb_state = NULL, client_state = NULL, id = NULL, ordering = NULL, page = NULL, page_size = NULL, registrant_id = NULL, registrant_name = NULL, clean = TRUE )
client_country |
Client Country. Such as "US" or "CA". |
client_name |
Client Name. String value. |
client_ppb_country |
Client PPB Country. Such as "US" or "CA". |
client_ppb_state |
Client PPB State. Such as "AL" or "AK". |
client_state |
Client State. Such as "AL" or "AK". |
id |
ID. Integer value. |
ordering |
Which field to use when ordering the results. String value. |
page |
A page number within the paginated result set. Integer value. |
page_size |
Number of results to return per page. Integer value. |
registrant_id |
Registrant ID. Integer value. |
registrant_name |
Registrant Name. String value. |
clean |
Default is TRUE. Should output be returned as a |
a tibble of clients
lob_list_clients(client_country = 'US')lob_list_clients(client_country = 'US')
List Contribution Reports
lob_list_contributions( contribution_amount_max = NULL, contribution_amount_min = NULL, contribution_contributor = NULL, contribution_date_after = NULL, contribution_date_before = NULL, contribution_honoree = NULL, contribution_payee = NULL, contribution_type = NULL, filing_dt_posted_after = NULL, filing_dt_posted_before = NULL, filing_period = NULL, filing_type = NULL, filing_uuid = NULL, filing_year = NULL, lobbyist_exclude = NULL, lobbyist_id = NULL, lobbyist_name = NULL, ordering = NULL, page = NULL, page_size = NULL, registrant_id = NULL, registrant_name = NULL, clean = TRUE )lob_list_contributions( contribution_amount_max = NULL, contribution_amount_min = NULL, contribution_contributor = NULL, contribution_date_after = NULL, contribution_date_before = NULL, contribution_honoree = NULL, contribution_payee = NULL, contribution_type = NULL, filing_dt_posted_after = NULL, filing_dt_posted_before = NULL, filing_period = NULL, filing_type = NULL, filing_uuid = NULL, filing_year = NULL, lobbyist_exclude = NULL, lobbyist_id = NULL, lobbyist_name = NULL, ordering = NULL, page = NULL, page_size = NULL, registrant_id = NULL, registrant_name = NULL, clean = TRUE )
contribution_amount_max |
Contribution Amount Range. Float value. |
contribution_amount_min |
Contribution Amount Range. Float value. |
contribution_contributor |
Contribution Contributor Name. String value. |
contribution_date_after |
Contribution Date Range (Before / After): yyyy-mm-dd. Date value. |
contribution_date_before |
Contribution Date Range (Before / After): yyyy-mm-dd. Date value. |
contribution_honoree |
Contribution Honoree Name. String value. |
contribution_payee |
Contribution Payee Name. String value. |
contribution_type |
Contribution Type. Such as "feca", "he", "me", "ple", or "pic". |
filing_dt_posted_after |
Filing Date Posted Range (Before / After): yyyy-mm-dd. Date-time value. |
filing_dt_posted_before |
Filing Date Posted Range (Before / After): yyyy-mm-dd. Date-time value. |
filing_period |
Filing Period. Such as "first_quarter", "second_quarter", "third_quarter", "fourth_quarter", "mid_year", or "year_end". |
filing_type |
Filing Type. Such as "RR", "RA", "Q1", "Q1Y", "1T", or "1TY". |
filing_uuid |
filing_uuid. UUID value. |
filing_year |
Filing Year. Such as 2025, 2024, or 2023. |
lobbyist_exclude |
Exclude reports filed by the lobbyists. Boolean value. |
lobbyist_id |
Lobbyist ID. Integer value. |
lobbyist_name |
Lobbyist Name. String value. |
ordering |
Which field to use when ordering the results. String value. |
page |
A page number within the paginated result set. Integer value. |
page_size |
Number of results to return per page. Integer value. |
registrant_id |
Registrant ID. Integer value. |
registrant_name |
Registrant Name. String value. |
clean |
Default is TRUE. Should output be returned as a |
a tibble of lobbying contributions
lob_list_contributions()lob_list_contributions()
List Lobbying Filings
lob_list_filings( affiliated_organization_country = NULL, affiliated_organization_listed_indicator = NULL, affiliated_organization_name = NULL, client_country = NULL, client_id = NULL, client_name = NULL, client_ppb_country = NULL, client_ppb_state = NULL, client_state = NULL, filing_amount_reported_max = NULL, filing_amount_reported_min = NULL, filing_dt_posted_after = NULL, filing_dt_posted_before = NULL, filing_period = NULL, filing_specific_lobbying_issues = NULL, filing_type = NULL, filing_uuid = NULL, filing_year = NULL, foreign_entity_country = NULL, foreign_entity_listed_indicator = NULL, foreign_entity_name = NULL, foreign_entity_ownership_percentage_max = NULL, foreign_entity_ownership_percentage_min = NULL, foreign_entity_ppb_country = NULL, lobbyist_conviction_date_range_after = NULL, lobbyist_conviction_date_range_before = NULL, lobbyist_conviction_disclosure = NULL, lobbyist_conviction_disclosure_indicator = NULL, lobbyist_covered_position = NULL, lobbyist_covered_position_indicator = NULL, lobbyist_id = NULL, lobbyist_name = NULL, ordering = NULL, page = NULL, page_size = NULL, registrant_country = NULL, registrant_id = NULL, registrant_name = NULL, registrant_ppb_country = NULL, clean = TRUE )lob_list_filings( affiliated_organization_country = NULL, affiliated_organization_listed_indicator = NULL, affiliated_organization_name = NULL, client_country = NULL, client_id = NULL, client_name = NULL, client_ppb_country = NULL, client_ppb_state = NULL, client_state = NULL, filing_amount_reported_max = NULL, filing_amount_reported_min = NULL, filing_dt_posted_after = NULL, filing_dt_posted_before = NULL, filing_period = NULL, filing_specific_lobbying_issues = NULL, filing_type = NULL, filing_uuid = NULL, filing_year = NULL, foreign_entity_country = NULL, foreign_entity_listed_indicator = NULL, foreign_entity_name = NULL, foreign_entity_ownership_percentage_max = NULL, foreign_entity_ownership_percentage_min = NULL, foreign_entity_ppb_country = NULL, lobbyist_conviction_date_range_after = NULL, lobbyist_conviction_date_range_before = NULL, lobbyist_conviction_disclosure = NULL, lobbyist_conviction_disclosure_indicator = NULL, lobbyist_covered_position = NULL, lobbyist_covered_position_indicator = NULL, lobbyist_id = NULL, lobbyist_name = NULL, ordering = NULL, page = NULL, page_size = NULL, registrant_country = NULL, registrant_id = NULL, registrant_name = NULL, registrant_ppb_country = NULL, clean = TRUE )
affiliated_organization_country |
Affiliated Organization Country. Such as "US" or "CA". |
affiliated_organization_listed_indicator |
Any Affiliated Organizations Listed. Boolean value. |
affiliated_organization_name |
Affiliated Organization Name. String value. |
client_country |
Client Country. Such as "US" or "CA". |
client_id |
Client ID. Integer value. |
client_name |
Client Name. String value. |
client_ppb_country |
Client PPB Country. Such as "US" or "CA". |
client_ppb_state |
Client PPB State. Such as "AL" or "AK". |
client_state |
Client State. Such as "AL" or "AK". |
filing_amount_reported_max |
Filing Amount Reported Range (Min / Max). Float value. |
filing_amount_reported_min |
Filing Amount Reported Range (Min / Max). Float value. |
filing_dt_posted_after |
Filing Date Posted Range (Before / After): yyyy-mm-dd. Date-time value. |
filing_dt_posted_before |
Filing Date Posted Range (Before / After): yyyy-mm-dd. Date-time value. |
filing_period |
Filing Period. Such as "first_quarter", "second_quarter", "third_quarter", "fourth_quarter", "mid_year", or "year_end". |
filing_specific_lobbying_issues |
Filing Specific Lobbying Issues (Supports Advanced Text Searching). String value. |
filing_type |
Filing Type. Such as "RR", "RA", "Q1", "Q1Y", "1T", or "1TY". |
filing_uuid |
filing_uuid. UUID value. |
filing_year |
Filing Year. Such as 2025, 2024, or 2023. |
foreign_entity_country |
Foreign Entity Country. Such as "US" or "CA". |
foreign_entity_listed_indicator |
Any Foreign Entities Listed. Boolean value. |
foreign_entity_name |
Foreign Entity Name. String value. |
foreign_entity_ownership_percentage_max |
Foreign Entity Ownership Percentage. String value. |
foreign_entity_ownership_percentage_min |
Foreign Entity Ownership Percentage. String value. |
foreign_entity_ppb_country |
Foreign Entity PPB Country. Such as "US" or "CA". |
lobbyist_conviction_date_range_after |
Lobbyist Conviction Date Range (Before / After): yyyy-mm-dd. Date value. |
lobbyist_conviction_date_range_before |
Lobbyist Conviction Date Range (Before / After): yyyy-mm-dd. Date value. |
lobbyist_conviction_disclosure |
Lobbyist Conviction Description (Supports Advanced Text Searching). String value. |
lobbyist_conviction_disclosure_indicator |
Lobbyist Any Disclosed Conviction(s). Boolean value. |
lobbyist_covered_position |
Lobbyist Covered Position (Supports Advanced Text Searching). String value. |
lobbyist_covered_position_indicator |
Any Covered Government Position(s). Boolean value. |
lobbyist_id |
Lobbyist ID. Integer value. |
lobbyist_name |
Lobbyist Name. String value. |
ordering |
Which field to use when ordering the results. String value. |
page |
A page number within the paginated result set. Integer value. |
page_size |
Number of results to return per page. Integer value. |
registrant_country |
Registrant Country. Such as "US" or "CA". |
registrant_id |
Registrant ID. Integer value. |
registrant_name |
Registrant Name. String value. |
registrant_ppb_country |
Registrant PPB Country. Such as "US" or "CA". |
clean |
Default is TRUE. Should output be returned as a |
a tibble of lobbying filings
lob_list_filings(filing_year = 2024)lob_list_filings(filing_year = 2024)
List Lobbyists
lob_list_lobbyists( id = NULL, lobbyist_name = NULL, ordering = NULL, page = NULL, page_size = NULL, registrant_id = NULL, registrant_name = NULL, clean = TRUE )lob_list_lobbyists( id = NULL, lobbyist_name = NULL, ordering = NULL, page = NULL, page_size = NULL, registrant_id = NULL, registrant_name = NULL, clean = TRUE )
id |
ID. Integer value. |
lobbyist_name |
Lobbyist Name. String value. |
ordering |
Which field to use when ordering the results. String value. |
page |
A page number within the paginated result set. Integer value. |
page_size |
Number of results to return per page. Integer value. |
registrant_id |
Registrant ID. Integer value. |
registrant_name |
Registrant Name. String value. |
clean |
Default is TRUE. Should output be returned as a |
a tibble of lobbyists
lob_list_lobbyists()lob_list_lobbyists()
List Registrants
lob_list_registrants( country = NULL, dt_updated_after = NULL, dt_updated_before = NULL, id = NULL, ordering = NULL, page = NULL, page_size = NULL, ppb_country = NULL, registrant_name = NULL, state = NULL, clean = TRUE )lob_list_registrants( country = NULL, dt_updated_after = NULL, dt_updated_before = NULL, id = NULL, ordering = NULL, page = NULL, page_size = NULL, ppb_country = NULL, registrant_name = NULL, state = NULL, clean = TRUE )
country |
Country. Such as "US" or "CA". |
dt_updated_after |
Date Update Range (Before / After): yyyy-mm-dd. Date-time value. |
dt_updated_before |
Date Update Range (Before / After): yyyy-mm-dd. Date-time value. |
id |
ID. Integer value. |
ordering |
Which field to use when ordering the results. String value. |
page |
A page number within the paginated result set. Integer value. |
page_size |
Number of results to return per page. Integer value. |
ppb_country |
PPB Country. Such as "US" or "CA". |
registrant_name |
Registrant Name. String value. |
state |
State. Such as "AL" or "AK". |
clean |
Default is TRUE. Should output be returned as a |
a tibble of lobbying registrants
lob_list_registrants(country = 'US')lob_list_registrants(country = 'US')
Request next set of responses
lob_request_next(response, max_req = 1)lob_request_next(response, max_req = 1)
response |
A tibble::tibble from a |
max_req |
A max number of additional requests to make. Default is 1. |
a tibble with responses bound by row to new results
lob_list_filings(filing_year = 2024) |> lob_request_next()lob_list_filings(filing_year = 2024) |> lob_request_next()
Retrieve a specific client by its ID
lob_retrieve_client(id, clean = TRUE)lob_retrieve_client(id, clean = TRUE)
id |
ID. Integer value. |
clean |
Default is TRUE. Should output be returned as a |
a tibble of lobbying client details
lob_retrieve_client(id = '44400')lob_retrieve_client(id = '44400')
Retrieve a specific contribution by its UUID
lob_retrieve_contribution(filing_uuid, clean = TRUE)lob_retrieve_contribution(filing_uuid, clean = TRUE)
filing_uuid |
filing_uuid. UUID value. |
clean |
Default is TRUE. Should output be returned as a |
a tibble of lobbying contribution details
lob_retrieve_contribution(filing_uuid = '86260004-84e7-46e3-9cfa-76edae508768')lob_retrieve_contribution(filing_uuid = '86260004-84e7-46e3-9cfa-76edae508768')
Retrieve a specific filing by its UUID
lob_retrieve_filing(filing_uuid, clean = TRUE)lob_retrieve_filing(filing_uuid, clean = TRUE)
filing_uuid |
filing_uuid. UUID value. |
clean |
Default is TRUE. Should output be returned as a |
a tibble of lobbying filing details
lob_retrieve_filing(filing_uuid = '3b181214-b253-462c-ad64-783c827e159e')lob_retrieve_filing(filing_uuid = '3b181214-b253-462c-ad64-783c827e159e')
Retrieve a specific lobbyist by their ID
lob_retrieve_lobbyist(id, clean = TRUE)lob_retrieve_lobbyist(id, clean = TRUE)
id |
ID. Integer value. |
clean |
Default is TRUE. Should output be returned as a |
a tibble of lobbyist
lob_retrieve_lobbyist(id = 1)lob_retrieve_lobbyist(id = 1)
Retrieve a specific registrant by their ID
lob_retrieve_registrant(id, clean = TRUE)lob_retrieve_registrant(id, clean = TRUE)
id |
ID. Integer value. |
clean |
Default is TRUE. Should output be returned as a |
a tibble of lobbying registrant details
lob_retrieve_registrant(id = '11')lob_retrieve_registrant(id = '11')
Adds US Senate Lobbying Disclosure API key to .Renviron.
set_lobby_key(key, overwrite = FALSE, install = FALSE, r_env = NULL) lob_set_key(key, overwrite = FALSE, install = FALSE, r_env = NULL)set_lobby_key(key, overwrite = FALSE, install = FALSE, r_env = NULL) lob_set_key(key, overwrite = FALSE, install = FALSE, r_env = NULL)
key |
Character. API key to add to add. |
overwrite |
Defaults to FALSE. Boolean. Should existing |
install |
Defaults to FALSE. Boolean. Should this be added '~/.Renviron' file? |
r_env |
Path to install to if |
key, invisibly
example_env <- tempfile(fileext = '.Renviron') set_lobby_key('1234', r_env = example_env) # r_env should likely be: file.path(Sys.getenv('HOME'), '.Renviron')example_env <- tempfile(fileext = '.Renviron') set_lobby_key('1234', r_env = example_env) # r_env should likely be: file.path(Sys.getenv('HOME'), '.Renviron')