How to get visits for multiple rows with different subtable IDs?

I’m trying to get visits per month for a set of URLs of a site using Actions.getPageUrls, but I need add idSubtable as a parameter to see the visits, which will only get me one month’s worth of visit data per subtable ID.

I’m aware that subtable ID changes based on date, so I’m wondering if there’s a simple way to fetch visit data for all the months (I’m using date=last18 parameter, so last 18 months) without having to look up all subtable IDs individually and update the call every time there’s a new month?

My call looks like this:

I’m still relatively new to using Matomo’s API, so apologies if this is not enough data to give an answer.