You can also take a loot at that article: Build your own API from any website with Puppeteer
There is described the process of getting data from an external source by using puppeteer, also that depends on your needs, if your external source has API you can replace puppeteer logic with Axios requests, otherwise if you want to get data from HTML code then you should get it with puppeteer.