
Product
Introducing Manifest Alerts
Socket now detects supply chain risks in project manifests, starting with missing lockfiles that can make dependency installs non-reproducible.
TypeScript client for the CIV.IQ civic data API — representatives, bills, votes, committees, intelligence analysis
TypeScript client for the CIV.IQ civic data API.
CIV.IQ resolves and cross-references 23 government data sources. This SDK gives you programmatic access to the results:
All data comes from real government APIs. No mock data. When a source is unavailable, the response says so.
npm install @civiq/sdk
import { CivIQ } from '@civiq/sdk';
const civiq = new CivIQ();
// Who represents this address?
const reps = await civiq.districts.geocode({
mode: 'address',
address: '1600 Pennsylvania Ave NW, Washington DC 20500',
});
// What's their voting record?
const detail = await civiq.representatives.get('P000197');
// How independent are they from donor interests?
const prediction = await civiq.intelligence.votePrediction('P000197');
// What industries fund legislators on this committee?
const leaderboard = await civiq.intelligence.sectorLeaderboard('Energy', {
chamber: 'senate',
});
civiq.representatives.list({ chamber, state, party });
civiq.representatives.get(bioguideId);
civiq.representatives.profile(bioguideId);
civiq.representatives.compare(['A000001', 'B000002']);
civiq.representatives.all({ chamber, state });
civiq.bills.list({ query, congress, chamber, status });
civiq.bills.get(billId);
civiq.bills.summary(billId);
civiq.votes.get(voteId);
civiq.districts.get(districtId);
civiq.districts.geocode({ mode, address });
civiq.committees.list();
civiq.committees.get(committeeId);
civiq.intelligence.votePrediction(bioguideId)
civiq.intelligence.influenceChain(bioguideId)
civiq.intelligence.sectorLeaderboard(sector, { chamber })
civiq.intelligence.moneyReportByAddress({ street, city, state })
civiq.intelligence.influenceClusters(bioguideId?)
civiq.search.unified({ q, limit });
civiq.search.policyArea({ policyArea });
civiq.states.legislature(state);
civiq.states.bills(state, { query });
civiq.states.legislatorsByAddress({ street, city, state });
civiq.graph.neighbors(nodeId, { limit });
civiq.graph.entity(nodeId);
// Custom base URL (local development or self-hosted)
const civiq = new CivIQ({ baseUrl: 'http://localhost:3000/api' });
// Append your app identifier to the default User-Agent so operators can
// see who's calling. The SDK signature is preserved either way:
// "@civiq/sdk/0.1.1 my-dashboard/2.3.1"
const civiq = new CivIQ({ userAgent: 'my-dashboard/2.3.1' });
The SDK sends User-Agent: @civiq/sdk/<version> by default in Node, Deno, and Bun — this is how CIV.IQ tracks SDK adoption. Browsers silently drop custom User-Agent values per the fetch spec, so this header is skipped when running in browser environments.
import { CivIQ, NotFoundError, RateLimitError, BadRequestError, UpstreamError } from '@civiq/sdk';
try {
await civiq.representatives.get(bioguideId);
} catch (err) {
if (err instanceof NotFoundError) {
// No representative with that ID
} else if (err instanceof RateLimitError) {
// 60 requests/minute limit hit. err.retryAfter has seconds to wait.
} else if (err instanceof UpstreamError) {
// Government API is down
}
}
All response types are exported for TypeScript consumers:
import type {
RepresentativeDetail,
BillSummary,
VoteDetail,
DistrictDetail,
IntelligenceInsight,
} from '@civiq/sdk';
Congress.gov, FEC, Census Bureau, USASpending.gov, Federal Register, Senate LDA, SEC EDGAR, OpenStates, and more. Full list at civdotiq.org/data-sources.
MIT
FAQs
TypeScript client for the CIV.IQ civic data API — representatives, bills, votes, committees, intelligence analysis
We found that @civiq/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now detects supply chain risks in project manifests, starting with missing lockfiles that can make dependency installs non-reproducible.

Research
/Security News
The trojanized extensions use TinyGo-compiled WebAssembly and Solana transaction memos to resolve command-and-control infrastructure.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.