R
Railway17mo ago
jordan

API Development Advice

Hey, I don't know if this is the right place to ask but not sure where else to ask. I took over a website for a friend and they use an API that is severely limited (100 calls per 24 hours). All the results they get from the API are historic and never change. I wanted to develop an API to have a much higher request rate but keep the cost much lower. Could I do this using something like Node, Redis and PSQL? My background is mainly as a JS Frontend dev but I also have experience using clojure. I've worked on APIs but never developed one for production use. Any help and advice would be appreciated, and I'd prefer to host it using Railway as well as I love it so far
10 Replies
Percy
Percy17mo ago
Project ID: 36be635e-5b14-45df-8b89-03b99c89984d
jordan
jordan17mo ago
36be635e-5b14-45df-8b89-03b99c89984d
Brody
Brody17mo ago
where does the limitation stem from?
jordan
jordan17mo ago
The API cost, it gives you 100 calls per day for free, but then goes up quite a lot for more. My friend is happy to pay but think it's too much for the next level. From a development point, I think I could build it but just hoping to get a bit of advice for building it. Basically, I think it would be a db that stores the information, simple table of dates and prices. Then when I use the site, it gets the date and price I select. I'm unsure if this is the best way, and how cost efficient it would if it was a few hundred calls to a couple thousand calls per day and if caching would help with that as well.
Brody
Brody17mo ago
if the data from the expensive api doesn't change often, write a caching layer
jordan
jordan17mo ago
I’ll give that a try thanks, I assume that should be able to handle a few hundred to couple thousand requests? From various users
Brody
Brody17mo ago
assuming you wrote the cache layer in a perfomant enough framework, yeah
jordan
jordan17mo ago
Thank you, I’ll give that a try
Brody
Brody17mo ago
maybe cache in redis