Any pointers or links with using curl to pull down unique visitors for one or all active domains?

New to Cloudflare and APIs. I have managed to use curl to add domains and DNS entries but can’t find any examples to grab site stats such as Unique Vistors for one or all active domains.

Analytics are a different API environment: