# Make an API Call to get all contacts into a segment

**URL:** <https://forum.mautic.org/t/make-an-api-call-to-get-all-contacts-into-a-segment/16608>\
**Category:** General Discussion\
**Created:** [October 17, 2020, 12:14am UTC](https://forum.mautic.org/t/make-an-api-call-to-get-all-contacts-into-a-segment/16608 "2020-10-17T00:14:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexalxs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexalxs/32/2274_2.png) [@alexalxs](https://forum.mautic.org/u/alexalxs)\
**Post date:** [October 17, 2020, 12:14am UTC](https://forum.mautic.org/t/make-an-api-call-to-get-all-contacts-into-a-segment/16608/1 "2020-10-17T00:14:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![da644](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/da644/32/4386_2.png) [@da644](https://forum.mautic.org/u/da644)\
**Post date:** [January 20, 2021, 11:14am UTC](https://forum.mautic.org/t/make-an-api-call-to-get-all-contacts-into-a-segment/16608/2 "2021-01-20T11:14:29Z")

</div>

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

```auto
https://[your_mauitc_domain]/api/contacts?search=segement:segment-alias

```

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:

> **[Search](https://docs.mautic.org/en/mautic-search)**
>
> . Search operators and filters. Mautic allows you to use a range of search operators and filters to drill down into relevant resources. The available search filters and operators can be found next to the search input by clicking on the button with...
