1

I would like to use Propublica's Congress API in a personal project and I am looking for some direction. They have a 5000 request/day limit, and I asked them if I would be able to store their data in a database, and then send out to clients on a website. They said that would be fine and wouldn't violate their terms of use.

For now, I just want to get data and practice making it look nice, and maybe later implement user login where people can add favorite represenatives to watch/track voting history and the such. I was thinking of two approaches.

  1. Practice fullstack and store the data from their API in a Mongo database, then clients would retrieve the data from that database. This way, calls to Propublica's API would be limited to my backend server, and not directly from the client. If I did it this way, is there a general approach to fetching and updating a database from an external API? Would I set it as some sort of cron job with node and just update periodically?

  2. Use a static site generator and just bypass having a database at all and just fetch data from propublica's api at build time and rebuild periodically. If I did this, any ideas on how to schedule a rebuild? Right now I've simply deployed to netlify and just used a zapier action to trigger a rebuild...

I'd like to try to practice more web development with the first approach and look at static site generators and JAM stuff a little later, but does this seem like a reasonable project to use some kind of fullstack approach with Mongo, Express, Node, and whatever frontend I end up using?

D T
  • 93
  • 1
  • 4

0 Answers0