Skip to contents

Request Law Information

Usage

cong_law(
  congress = 118,
  type = NULL,
  number = NULL,
  from_date = NULL,
  to_date = NULL,
  limit = 20,
  offset = 0,
  format = "json",
  clean = TRUE
)

Arguments

congress

Congress number to search for. 81 or later are supported.

type

Type of law. Must be 'pub' or 'priv'.

number

Law number. Numeric.

from_date

Start date for search, e.g. '2022-04-01'. Optional.

to_date

End date for search, e.g. '2022-04-30'. Optional.

limit

Number of records to return. Default is 20. Will be truncated to between 1 and 250.

offset

Number of records to skip. Default is 0. Must be non-negative.

format

Output format for clean = FALSE. One of 'json' or 'xml'.

clean

Should output be returned as a tibble (TRUE) or requested format (FALSE). Default is TRUE.

Value

A tibble or raw HTTP response if clean = FALSE.

Examples

if (FALSE) { # congress::has_congress_key()
# Requires API Key

cong_law(congress = 118)

cong_law(congress = 118, type = 'pub')

cong_law(congress = 118, type = 'pub', number = 108)
}