laws
Get and filter lists of enacted Congressional Laws (public or private).
Examples
from openbb import obb
obb.uscongress.laws(provider='congress_gov')
# Get the 5 most recent public laws of the 118th Congress.
obb.uscongress.laws(congress=118, law_type='public', limit=5, provider='congress_gov')
Parameters
- standard
- congress_gov
congress: int | None
Congress number (e.g., 119 for the 119th Congress). When None, defaults to the current Congress.
law_type: str | None
Default: public
Description
Law type filter. Must be one of: public, private.
A public law affects the general public or classes of citizens and is identified
by a number in the format '{congress}-{number}' (e.g., '119-44'). A private law
affects specific individuals, organizations, or localities rather than the
general public, and is far less common than public laws.
limit: int | None
The number of data entries to return. When None, default sets to 100. Set to 0 for no limit.
offset: int | None
The starting record returned. 0 is the first record.
sort_by: str | None
Default: desc
Sort by law number. Default is highest first.
Returns
results: CongressLaws
Serializable results.
provider: str | None
Provider name.
warnings: Optional[list[Warning_]]
List of warnings.
chart: Optional[Chart]
Chart object.
extra: dict[str, Any]
Extra info.
Data
- standard
- congress_gov
law_id: str
The law identifier, e.g. '119-1'.
law_number: int
The law number within the Congress.
law_type: str
The type of law (public or private).
congress: int
The congress session number.
enacted_date: date | None
The date the law was approved/enacted.
title: str
The title of the law.
citation: str
The public/private law citation.
statute_citation: str | None
The Statutes at Large citation.
package_id: str
The GovInfo package identifier for the law.
pdf: str
URL to the law text in PDF format.
htm: str
URL to the law text in HTML format.
xml: str
URL to the law text in XML format.