I use the following API
https://.sharepoint.com/_api/search/query?querytext='(contentclass=STS_Site)'&rowlimit=500
for getting the site collection, but it seems to miss site collections. for example : It misses
https://.sharepoint.com/sites/sep
. But for which I have all permissions. Even using the following api I was able to access the site
https://.sharepoint.com/_api/search/query?querytext='(path=https://.sharepoint.com/sites/sep)'
and checked
content class is STS_Site
P.S: It didn't cross the row limit what is wrong with my API. Or else is there is any REST API for getting only site collections.
Thanks & Regards, Sai Monesh C S