Is date and segment comparison feature available in API?

… or do we have to make an API call for each date range and do the comparaison ourself ? Insight does the job but not all segments are available.