Segementation dosen't seem to work with Actionsget.PageUrlsFollowingSiteSearch insted of 1 page I get multiple pages

I want to use the API with segmentation for a page that I know is present in the returned statistics. However, instead of getting only that page, I receive multiple ones. The request URL looks something like this:
matomo_ip/index.php?module=API&method=Actions.getPageUrlsFollowingSiteSearch&idSite=ID&period=day&date=last30&format=json&token_auth=token&segment=pageUrl==URL_ENCODED&flat=1. I think this happens because in the response the segmentation uses =^ insted of ==