How do I know if a product/order have subscription option from API?

I am building my own dashboard using data from the API. I want to know how many products offer subscription options and the total number of orders made through these subscriptions. How can I achieve this using API?