# Help using API call /contacts

**URL:** <https://forum.mautic.org/t/help-using-api-call-contacts/21595>\
**Category:** Product Support\
**Tags:** mautic-3\
**Created:** [November 12, 2021, 6:15pm UTC](https://forum.mautic.org/t/help-using-api-call-contacts/21595 "2021-11-12T18:15:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![imog](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imog/32/3813_2.png) [@imog](https://forum.mautic.org/u/imog)\
**Post date:** [November 12, 2021, 6:15pm UTC](https://forum.mautic.org/t/help-using-api-call-contacts/21595/1 "2021-11-12T18:15:55Z")

</div>

Hi, i try to figure out how Mautic API call to contacts is working.  
When i go to the webgui contacts it tells me that i have 1788 contacts in there.  
When i do the call i get “total”: “10247” in the JSON result, why?  
Also there is much to much information comming back, nearly 330 lines for one single contact (even if i set “minimal” to “true” in the call params).  
Is there a way to let only fields of interest being returned by the call?

---

<div class="post-metadata">

**Author:** ![ledzee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ledzee/32/4252_2.png) [@ledzee](https://forum.mautic.org/u/ledzee)\
**Post date:** [November 13, 2021, 4:32am UTC](https://forum.mautic.org/t/help-using-api-call-contacts/21595/2 "2021-11-13T04:32:33Z")

</div>

Hi, could you try to post your API call script/code? That might help debug.

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [November 13, 2021, 2:38pm UTC](https://forum.mautic.org/t/help-using-api-call-contacts/21595/3 "2021-11-13T14:38:03Z")

</div>

I am not that familiar, however it could be brining back anonymous contacts as well.

to check the exact number you can query the leads table in the mauticDB

---

<div class="post-metadata">

**Author:** ![imog](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imog/32/3813_2.png) [@imog](https://forum.mautic.org/u/imog)\
**Post date:** [November 15, 2021, 7:15am UTC](https://forum.mautic.org/t/help-using-api-call-contacts/21595/5 "2021-11-15T07:15:05Z")

</div>

That sounds reasonable. So there must be a filter i can send as parameter to only get my “real” contacts. Any idea?

---

<div class="post-metadata">

**Author:** ![imog](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imog/32/3813_2.png) [@imog](https://forum.mautic.org/u/imog)\
**Post date:** [November 15, 2021, 7:15am UTC](https://forum.mautic.org/t/help-using-api-call-contacts/21595/6 "2021-11-15T07:15:47Z")

</div>

It is very easy to test, just use something like “Postman” or ANY API tool of your choice and access: `<MAUTIC-URL>/api/contacts`  
without any additional parameters. In my setup i use old Basic Auth (API URL is internal accessable only, this must be enabled in the config).  
Then look at the results and compare with what your WebGUI is telling you.

---

<div class="post-metadata">

**Author:** ![imog](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imog/32/3813_2.png) [@imog](https://forum.mautic.org/u/imog)\
**Post date:** [November 15, 2021, 8:35am UTC](https://forum.mautic.org/t/help-using-api-call-contacts/21595/7 "2021-11-15T08:35:30Z")

</div>

When i use `is:anonymous` as filter inside Mautic GUI i get 8470 results. When i use no filter i got 1787 contacts. Together 10257 (voilá, that’s the sum i don’t understand in first post).  
Now, the question is: What is the right filter to use to only get contacts that also showed up in GUI?  
I tested “email:\*” but that did not work.
