search
Full-text search across congressional GovInfo collections.
Examples
from openbb import obb
obb.uscongress.search(query='artificial intelligence', provider='congress_gov')
# Search hearings in the 119th Congress for 'immigration'.
obb.uscongress.search(query='immigration', collection='CHRG', congress=119, provider='congress_gov')
Parameters
- standard
- congress_gov
query: str
The full-text search query.
collection: str | None
Restrict to a single GovInfo collection. When None, searches all congressional collections.
congress: int | None
Restrict results to a specific Congress number.
start_date: date | None | str
Start date of the data, in YYYY-MM-DD format. Filters by publish date.
end_date: date | None | str
End date of the data, in YYYY-MM-DD format. Filters by publish date.
limit: int | None
The number of data entries to return. When None, defaults to 20.
offset: int | None
The starting record returned. 0 is the first record.
Returns
results: CongressSearch
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
package_id: str
The GovInfo package identifier.
date: date | None | str
The document publish date.
collection: str
The GovInfo collection code.
congress: int | None
The congress session number.
citation: str | None
The document citation.
title: str
The document title.
doc_url: str
Direct URL to the document PDF.