in reply to Re^2: Running JavaScript from within Perl (or just use the API)
in thread Running JavaScript from within Perl

It seems that the URL to use is

https://developer.wordpress.com/docs/api/1.1/get/sites/$site/stats/fol +lowers/

... but you need to be authenticated:

curl "https://public-api.wordpress.com/rest/v1.1/sites/the-art-of-auti +sm.com/stats/followers" {"error":"unauthorized","message":"user cannot view stats"}

So, you will either have to get permission by the respective sites or you will have to continue scraping the websites.