# REST API: How to filter to only get needed fields?

**URL:** <https://forum.mautic.org/t/rest-api-how-to-filter-to-only-get-needed-fields/28426>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [June 24, 2023, 3:06pm UTC](https://forum.mautic.org/t/rest-api-how-to-filter-to-only-get-needed-fields/28426 "2023-06-24T15:06:04Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)\
**Post date:** [May 29, 2026, 2:43pm UTC](https://forum.mautic.org/t/rest-api-how-to-filter-to-only-get-needed-fields/28426/10 "2026-05-29T14:43:40Z")

</div>

For the records: I just had the same issue, neither /api/contacts?`minimal=true` nor /api/contacts?`select=id,email` preventing the huge arrays being fed back.  
I do think there’s some buggyness.

**BUT here are two nice workarounds:**

A) `minimal=true&select=id` DOES prevent the flood, returns a rather slim amount of data  
Example:

```auto
/api/contacts?minimal=true&select=id 

{"total":"662060","contacts":{"2911715":{"isPublished":true,"dateAdded":"2026-05-29T14:05:23+00:00","id":2911715,"points":0,"fields":{"core":[],"social":[],"personal":[],"professional":[],"all":{"id":"2911715"}}}}}

```

–

B) syntax like `minimal=true&select%5B%5D=id&select%5B%5D=firstname&select%5B%5D=email` even allows you to select additional fields and still stay lean 🙂  
Example:

```auto
/api/contacts?minimal=true&select%5B%5D=id&select%5B%5D=firstname&select%5B%5D=email

{"total":"662060","contacts":{"2911715":{"isPublished":true,"dateAdded":"2026-05-29T14:05:23+00:00","dateModified":"2026-05-29T14:41:14+00:00","modifiedBy":2,"modifiedByUser":"Ekkehard G\u00fcmbel","id":2911715,"points":0,"fields":{"core":{"firstname":{"id":"2","label":"First Name","alias":"firstname","type":"text","group":"core","object":"lead","is_fixed":"1","properties":"a:0:{}","value":"Martina","normalizedValue":"Martina"},"email":{"id":"6","label":"Email","alias":"email","type":"email","group":"core","object":"lead","is_fixed":"1","properties":"a:0:{}","value":"test@test.de","normalizedValue":"test@test.de"}},"social":[],"personal":[],"professional":[],"all":{"id":"2911715","firstname":"Martina","email":"test@test.de"}}}}}

```

---

_[View the full topic](https://forum.mautic.org/t/rest-api-how-to-filter-to-only-get-needed-fields/28426)._
