Make an API Call to get all contacts into a segment

How to get all contacts into a segment?
I am using this:
But return all contacts into and out of the specific segment.
I need make this using API by GET like above, not using php.

@alexalxs To do this, it is a GET request to the following:


replacing segment-alias with your alias. Essentially, the search parameter can be anything you can use in the search in the Mautic UI, as described here: