Figma does not have a public API for getting library analytics. But you might be interested in this Figma blog post: