Title: Interact with the 'US Senate Lobbying Disclosure API'
Version: 0.0.2
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.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.3
Imports: cli, dplyr, httr2, jsonlite, purrr, tibble
Suggests: spelling, testthat (≥ 3.0.0), vcr (≥ 2.0.0)
Depends: R (≥ 4.1.0)
Config/testthat/edition: 3
URL: https://github.com/christopherkenny/lobby, https://christophertkenny.com/lobby/
Language: en-US
NeedsCompilation: no
Packaged: 2026-02-25 15:05:40 UTC; chris
Author: Christopher T. Kenny ORCID iD [aut, cre]
Maintainer: Christopher T. Kenny <ctkenny@proton.me>
Repository: CRAN
Date/Publication: 2026-03-03 11:00:02 UTC

lobby: Interact with the 'US Senate Lobbying Disclosure API'

Description

logo

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.

Author(s)

Maintainer: Christopher T. Kenny ctkenny@proton.me (ORCID)

See Also

Useful links:


Check or Get US Senate Lobbying Disclosure API Key

Description

Check or Get US Senate Lobbying Disclosure API Key

Usage

has_lobby_key()

get_lobby_key()

lob_get_key()

lob_has_key()

Value

logical if has, key if get

Examples

has_lobby_key()

Get constants

Description

Get constants

Usage

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()

Value

a tibble of lobbyists

Examples


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

Description

List Lobbying Filings

Usage

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
)

Arguments

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 tibble (TRUE) or list.

Value

a tibble of clients

Examples


lob_list_clients(client_country = 'US')


List Contribution Reports

Description

List Contribution Reports

Usage

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
)

Arguments

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 tibble (TRUE) or list.

Value

a tibble of lobbying contributions

Examples


lob_list_contributions()


List Lobbying Filings

Description

List Lobbying Filings

Usage

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
)

Arguments

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 tibble (TRUE) or list.

Value

a tibble of lobbying filings

Examples


lob_list_filings(filing_year = 2024)


List Lobbyists

Description

List Lobbyists

Usage

lob_list_lobbyists(
  id = NULL,
  lobbyist_name = NULL,
  ordering = NULL,
  page = NULL,
  page_size = NULL,
  registrant_id = NULL,
  registrant_name = NULL,
  clean = TRUE
)

Arguments

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 tibble (TRUE) or list.

Value

a tibble of lobbyists

Examples


lob_list_lobbyists()


List Registrants

Description

List Registrants

Usage

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
)

Arguments

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 tibble (TRUE) or list.

Value

a tibble of lobbying registrants

Examples


lob_list_registrants(country = 'US')


Request next set of responses

Description

Request next set of responses

Usage

lob_request_next(response, max_req = 1)

Arguments

response

A tibble::tibble from a ⁠lob_*⁠ function

max_req

A max number of additional requests to make. Default is 1.

Value

a tibble with responses bound by row to new results

Examples


lob_list_filings(filing_year = 2024) |>
  lob_request_next()


Retrieve a specific client by its ID

Description

Retrieve a specific client by its ID

Usage

lob_retrieve_client(id, clean = TRUE)

Arguments

id

ID. Integer value.

clean

Default is TRUE. Should output be returned as a tibble (TRUE) or list.

Value

a tibble of lobbying client details

Examples


lob_retrieve_client(id = '44400')


Retrieve a specific contribution by its UUID

Description

Retrieve a specific contribution by its UUID

Usage

lob_retrieve_contribution(filing_uuid, clean = TRUE)

Arguments

filing_uuid

filing_uuid. UUID value.

clean

Default is TRUE. Should output be returned as a tibble (TRUE) or list.

Value

a tibble of lobbying contribution details

Examples


lob_retrieve_contribution(filing_uuid = '86260004-84e7-46e3-9cfa-76edae508768')


Retrieve a specific filing by its UUID

Description

Retrieve a specific filing by its UUID

Usage

lob_retrieve_filing(filing_uuid, clean = TRUE)

Arguments

filing_uuid

filing_uuid. UUID value.

clean

Default is TRUE. Should output be returned as a tibble (TRUE) or list.

Value

a tibble of lobbying filing details

Examples


lob_retrieve_filing(filing_uuid = '3b181214-b253-462c-ad64-783c827e159e')


Retrieve a specific lobbyist by their ID

Description

Retrieve a specific lobbyist by their ID

Usage

lob_retrieve_lobbyist(id, clean = TRUE)

Arguments

id

ID. Integer value.

clean

Default is TRUE. Should output be returned as a tibble (TRUE) or list.

Value

a tibble of lobbyist

Examples


lob_retrieve_lobbyist(id = 1)


Retrieve a specific registrant by their ID

Description

Retrieve a specific registrant by their ID

Usage

lob_retrieve_registrant(id, clean = TRUE)

Arguments

id

ID. Integer value.

clean

Default is TRUE. Should output be returned as a tibble (TRUE) or list.

Value

a tibble of lobbying registrant details

Examples


lob_retrieve_registrant(id = '11')


Add Entry to Renviron

Description

Adds US Senate Lobbying Disclosure API key to .Renviron.

Usage

set_lobby_key(key, overwrite = FALSE, install = FALSE, r_env = NULL)

lob_set_key(key, overwrite = FALSE, install = FALSE, r_env = NULL)

Arguments

key

Character. API key to add to add.

overwrite

Defaults to FALSE. Boolean. Should existing USSLDA_KEY in Renviron be overwritten?

install

Defaults to FALSE. Boolean. Should this be added '~/.Renviron' file?

r_env

Path to install to if install is TRUE.

Value

key, invisibly

Examples

example_env <- tempfile(fileext = '.Renviron')
set_lobby_key('1234', r_env = example_env)
# r_env should likely be: file.path(Sys.getenv('HOME'), '.Renviron')