Skip to content
Interact with US government APIs in .NET
C# Shell
Branch: master
Clone or download
phil-harmoniq 0.2.0
- Implemented BillsAPI
- Created HttpClient abstraction to allow for testing of local file-based test data
- Move test data helpers into separate repository
- Return IEnumerable instead of concrete collection types
Latest commit d9ae2e5 May 19, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
GovLib.Core Fix roll-call votes Apr 29, 2018
GovLib.ProPublica Finish VotesAPI implementation in 0.3.0 May 19, 2018
GovLib.Tests EnumConvert null tests Apr 30, 2018
GovLib Modify project meta-data Dec 25, 2017
.gitignore Update coverlet Apr 20, 2018
.travis.yml Use Bash script in CI Apr 17, 2018
Directory.Build.props Version bump Apr 17, 2018
GovLib.sln Rename project Dec 24, 2017 Update license 2018 Feb 16, 2018 Case insensitive May 19, 2018 Ignore "No such file or directory" when removing old test data Apr 17, 2018

GovLib Build Status NuGet

GovLib is a .NET Standard library that provides intuitive access to various government-related APIs. Currently only the ProPublica Congress API is available, but more modules are planned. Project under heavy development and may be subject to change.

Don't forget to request a ProPublica API key. It's free!


Install using the .NET CLI (explicit version is required in pre-releases):

dotnet add package govlib

Usage guide

Add a using reference:

using GovLib.ProPublica;

Instantiate the congress module using an API key string:

var congress = new Congress(apiKey);

// A few of the API calls available in the Members module
var reps = congress.Members.GetAllRepresentatives();
var sens = congress.Members.GetSenatorsByState(State.Colorado);
var newMembers = congress.Members.GetNewMembers();


PRs are always welcome! The ProPublica tests require your ProPublica key to be stored in an environment variable named PROPUBLICA_API_KEY. This is not required when consuming/modifying the library, only for testing purposes.

It is recommended you use VS Code to work with the GovLib source code. The workspace includes build tasks, editor settings, extension recommendations, and launch configurations to aid development in VS Code, but any editor that supports C# will do.

Type Ctrl + Shift + B (or Cmd + Shift + B on Macs) to bring up the build tasks menu:

Tasks Menu

Supporting Links

You can’t perform that action at this time.