Btw is there a public api to get those infos from?
There are many. Check out https://mempool.space/docs/api
Thanks bro!