GovTrack API Replica
Replica of GovTrack's open Government data JSON API built with Node, Hapi, and Mongo. The included archive file is a partial dataset with up to 1k records of each type.
-
Install Node and MongoDB if you do not already have them &
git clone
the repository. -
Install dependencies using
npm install
. -
Import the database using
mongorestore --archive=govtrack.archive --db govtrack
. -
Run the API using
npm start
and navigate tohttp://localhost:8000/
with your desired endpoint.
The replica supports all 8 endpoints specified in the original API:
-
Query by object id:
/person/400782
-
Query by object properties:
/person?gender=female
-
Modify the results limit:
/person?limit=500
-
Order by object properties:
/person?order_by=birthday
-
Return only specified properties:
/person?fields=name,birthday
- Improve query failure errors to be more specific
- Add testing
- Add CSV and XML support
- Implement full text search feature