How to implement GPT4 API with internet access?

Thanks, folks. Now my next worry is how to save tokens. If I start parsing web pages then it would consume lots of tokens. Is there a way to fetch information by saving as many tokens as possible?

PS: I use Node.js so prefer a solution that works with that.