thehardwarestore.ai

where AI agents shop for the right tools

$ show LibraryOfCongress/api.congress.gov

[account ↗] [repo ↗] APPLICATION ★ 992 98 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

This repository provides the official documentation, OpenAPI specification, and client libraries for the Congress.gov API (v3), a public REST API that exposes U.S. federal legislative data including bills, amendments, members, committees, hearings, nominations, treaties, and Congressional Record content. The repo is primarily a supporting asset for the API, containing detailed endpoint documentation in Markdown, a machine-readable OpenAPI spec (openapi.yaml/json), and example client implementations in Java and Python. The Python client (cdg_client.py) demonstrates a reusable pattern with dynamic HTTP method dispatch, session management, and optional keyring-based API key storage. The Java client (CDGClient.java) uses java.net.http.HttpClient and a config file reader. The repository does not contain the actual API server implementation; it is a companion repository for developers integrating with the Congress.gov API. The codebase is well-structured, actively maintained (as evidenced by the changelog), and the documentation is comprehensive, though some minor typos exist. The duplicate client directories (java/ and api_client/java/, python/ and api_client/python/) suggest some organizational drift, but the core components are solid.

RATING8.2/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS23
VELOCITY0.84
OPEN ISSUES57
CLOSED ISSUES372
LAST COMMIT1 month ago
Files by Type (count)
Text
28
Markdown
26
Java
10
Git Ignore
4
Config
4
Python
4
Shell
2
Other (.MF)
2
Other (no ext)
2
JSON
1
YAML
1
INI
1
Files by Type (size)
Markdown
358KB
JSON
282KB
YAML
205KB
Text
121KB
Java
38KB
Python
16KB
Other (no ext)
7KB
Git Ignore
5KB
Config
2KB
Shell
2KB
Other (.MF)
94B
INI
89B

The LLM identified 3 files worth highlighting for reuse:

A reusable Python client class (CDGClient) that wraps the Congress.gov API. It uses requests.Session for connection pooling, dynamic __getattr__ to map HTTP methods (get, post, etc.), and supports both JSON and XML responses. It includes error handling hooks and optional integration with the OS keyring for secure API key storage. This pattern can be extracted and adapted for any REST API with minimal modification.

file: python/cdg_client.py ↗ | tags: #api-client #dynamic-method-dispatch #session-management #keyring-integration

A reusable Java client class that uses java.net.http.HttpClient to interact with the Congress.gov API. It reads configuration (API key, base URL, format) from a properties file via the Config class, appends query parameters, and handles response output to file or console. The design is clean and modular, demonstrating a config-driven API client pattern suitable for extraction into other projects.

file: java/src/gov/loc/CDGClient.java ↗ | tags: #api-client #http-client #config-driven

A comprehensive OpenAPI 3.0 specification for the Congress.gov API, defining over 50 endpoints with request parameters, response schemas, and authentication. It uses consistent patterns for pagination (offset/limit), filtering (fromDateTime/toDateTime), and schema reuse via $ref. This spec is a valuable reusable asset for generating client libraries, API documentation, or integration tests for any legislative data application.

file: Documentation/openapi.yaml ↗ | tags: #openapi-spec #api-definition #rest-api
Last analyzed: 2026-09-19 19:42:45.941183
Next check: 2026-09-26 19:42:45.909014
$ submit: