{"schemaVersion":1,"resourceType":"connector","slug":"us-congress","name":"US Congress","catalog":"us_congress","description":"Members since 1789, roll-call votes, bills and laws of the US Congress, keyed on bioguide ID","language":"Python","categories":["civic"],"repository":"https://github.com/Query-farm/vgi-us-congress","license":"0BSD","generatedAt":"2026-12-01T18:22:16+00:00","runtime":{"engineVersion":"2.0.1","protocolVersion":"3.4"},"release":{"tag":"v0.2.0","publishedAt":"2026-11-25T18:25:54Z","url":"https://github.com/Query-farm/vgi-us-congress/releases/tag/v0.2.0"},"links":{"html":"https://query.farm/products/orchard/connectors/us-congress/","llms":"https://query.farm/products/orchard/connectors/us-congress/llms.txt","markdown":"https://query.farm/products/orchard/connectors/us-congress/index.md","json":"https://query.farm/products/orchard/api/v1/connectors/us-congress.json","objects":"https://query.farm/products/orchard/api/v1/connectors/us-congress/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=us-congress&q={query}"},"authentication":{"mode":"required","guidance":"Supply your own service credentials or required connection options before querying protected data.","interpretation":"Secret parameter required flags describe the upstream declaration; they do not override the service-level mode above. Keep secrets in environment variables or the deployment secret store. SQL values in angle brackets are placeholders, not automatic environment lookups. Native DuckDB and Haybarn 2.0.1 do not provide a SQL getenv() function, even when worker-supplied snippets mention it. Read environment variables in your application and pass credential values through client parameter bindings (for example, Python con.execute(\"CREATE SECRET stripe (TYPE stripe, api_key ?)\", [os.environ[\"STRIPE_API_KEY\"]]) after attaching the connector. Omit unused optional parameters and keep real values out of saved SQL and logs.","secrets":[{"type":"us_congress","description":"Congress.gov API key (a free api.data.gov key) for the bill, law, committee and House vote functions.","documentation":"https://github.com/Query-farm/vgi-us-congress#api-key","parameters":[{"name":"api_key","type":"VARCHAR","required":false,"redact":true,"description":"api.data.gov key for the Congress.gov API v3; sign up free at https://api.congress.gov/sign-up/"}],"requiredBy":["bills","bill","bill_actions","bill_cosponsors","bill_subjects","bill_summaries","bill_text_versions","laws","amendments","congress_gov_members","sponsored_legislation","cosponsored_legislation","committees","nominations","treaties","house_votes","house_vote_positions"],"createSql":"CREATE SECRET us_congress (\n    TYPE us_congress,\n    api_key '<US_CONGRESS_API_KEY>'  -- secret\n);"}]},"deployment":{"local":{"methods":[{"id":"uvx","label":"uvx","icon":"simple-icons:python","steps":[{"title":"Attach with uvx","description":"Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.","lang":"sql","code":"ATTACH 'us_congress' AS us_congress (\n  TYPE vgi,\n  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-us-congress@v0.2.0 vgi-us-congress-worker'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'us_congress' AS us_congress (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-us-congress:0.2.0'\n);"}]}],"pinnedMethods":[{"id":"uvx","label":"uvx","icon":"simple-icons:python","steps":[{"title":"Attach with uvx","description":"Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.","lang":"sql","code":"ATTACH 'us_congress' AS us_congress (\n  TYPE vgi,\n  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-us-congress@v0.2.0 vgi-us-congress-worker'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'us_congress' AS us_congress (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-us-congress:0.2.0'\n);"}]}]},"selfHost":{"instructions":"https://github.com/Query-farm/vgi-us-congress","connectionGuide":"https://query.farm/vgi/connect-to-a-worker/","guidance":"Deploy using the connector repository instructions and use its supported HTTP or SSH transport. Replace example URLs with your actual deployment; configure its authentication."},"queryFarm":{"available":true,"console":"https://auth.queryfarm.cloud/console/new?worker=us-congress","organizationMonthlyMinimumUsd":10,"pricing":"https://query.farm/products/orchard/hosted/"},"publicDemo":null},"setup":{"extensions":{"duckdb":"SET allow_extension_repositories = 'allowed';\n\nCREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm\n    WITH PREFIX 'https://duckdb-extensions.query.farm';\n\nINSTALL vgi FROM query_farm;\nLOAD vgi FROM query_farm;","haybarn":"INSTALL vgi FROM community;\nLOAD vgi;"},"attachSql":"ATTACH 'us_congress' AS us_congress (\n  TYPE vgi,\n  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-us-congress@v0.2.0 vgi-us-congress-worker'\n);","attachOptions":[{"name":"cache_dir","type":"VARCHAR","description":"Directory for downloaded bulk files; defaults to the per-user cache directory.","required":false,"default":null},{"name":"cache_ttl_hours","type":"DOUBLE","description":"Hours a cached file is used before it is revalidated upstream (default 24).","required":false,"default":null},{"name":"congress_gov_url","type":"VARCHAR","description":"Congress.gov API root (default https://api.congress.gov/v3).","required":false,"default":null},{"name":"legislators_url","type":"VARCHAR","description":"congress-legislators file root (default https://unitedstates.github.io/congress-legislators).","required":false,"default":null},{"name":"voteview_url","type":"VARCHAR","description":"Voteview data root (default https://voteview.com/static/data/out).","required":false,"default":null},{"name":"senate_url","type":"VARCHAR","description":"Senate LIS roll-call XML root (default https://www.senate.gov/legislative/LIS).","required":false,"default":null}],"note":"Install and load VGI, attach the connector using the catalog alias shown here, then create required secrets. Replace placeholders and omit unused optional secret parameters. Satisfy file, network and credential prerequisites before executing a query."},"example":{"title":"The most common outcomes of Senate roll calls in the 118th Congress","sql":"SELECT vote_result, count(*) AS votes FROM us_congress.main.rollcalls(118, chamber := 'senate') GROUP BY vote_result ORDER BY votes DESC LIMIT 5","requiresCredentials":true,"note":null,"objects":[{"name":"us_congress.main.rollcalls","kind":"table_function","links":{"html":"https://query.farm/products/orchard/connectors/us-congress/#obj-main-rollcalls","markdown":"https://query.farm/products/orchard/connectors/us-congress/objects/table_function.bWFpbg.cm9sbGNhbGxz.md","json":"https://query.farm/products/orchard/api/v1/connectors/us-congress/objects/table_function.bWFpbg.cm9sbGNhbGxz.json"}}],"evidence":{"status":"not_captured","note":"No executed result is recorded for this exact example. Catalog verification does not establish that this query ran."},"artifact":null},"objects":{"total":26,"index":"https://query.farm/products/orchard/api/v1/connectors/us-congress/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=us-congress&q={query}"},"agentTasks":["Using the us_congress worker, which five people served the most total days as US senators, adding up all of their Senate terms? Return their bioguide IDs and total days, longest first.","Using the us_congress worker, how many different women held a seat in the US House of Representatives (delegates included) at any time during the 119th Congress, which began on 2025-01-03?","Using the us_congress worker, how many Senate roll-call votes were taken in the 118th Congress?","Using the us_congress worker, which member of the House in the 119th Congress has the most conservative DW-NOMINATE first-dimension score? Give the bioguide ID and the score.","Using the us_congress worker, on how many Senate roll calls of the 118th Congress was Bernie Sanders (bioguide S000033) recorded as not voting?","Using the us_congress worker, how many roll-call votes did the Senate hold in 2025 (119th Congress, session 1)?","Using the us_congress worker, how many senators voted Nay on the Senate's first roll-call vote of the 119th Congress (session 1, vote 1)?","Using the us_congress worker, how many terms did James Madison serve in the House, and which Virginia districts did he represent?"],"provenance":{"generatedAt":"2026-12-01T18:22:16+00:00","repository":"https://github.com/Query-farm/vgi-us-congress","harvest":{"status":"ok","method":"subprocess","error":null,"vgi_version":"9773130dde"},"catalogVerification":{"verified":true,"status":"passed","total":1,"passed":1,"failed":0,"needs_credentials":0,"location":"uvx --from git+https://github.com/Query-farm/vgi-us-congress@v0.2.0 vgi-us-congress-worker","transport":"subprocess","environment":{"vgi_extension_version":"9773130dde","haybarn_version":"2.0.1rc3","engine_version":"v2.0.1","python":"3.12.4","platform":"darwin_arm64","protocol_version":"3.4.0"},"checked_at":"2026-12-01T06:21:34+00:00"},"interpretation":"Catalog verification records the harvest environment. It is not proof that every query or current live API call succeeds. Only an example with captured_result has a saved result for that exact SQL."},"interpretation":["Missing, null, or undeclared metadata means unknown; do not invent defaults, credential scope, platform support or endpoint URLs.","Search is keyword retrieval, not proof of a capability. Read the exact object declaration before generating SQL.","A table and a table function can have the same name. Preserve parentheses and use the matching overload and schema.","Service credentials, external data availability and deployment authentication are separate requirements."]}