# Get multiple contacts with Rest API call

**URL:** <https://integration.keap.com/t/get-multiple-contacts-with-rest-api-call/93197>\
**Category:** Max Classic\
**Created:** [September 23, 2024, 2:39am UTC](https://integration.keap.com/t/get-multiple-contacts-with-rest-api-call/93197 "2024-09-23T02:39:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Salman\_Javeed](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/salman_javeed/32/14882_2.png) [@Salman\_Javeed](https://integration.keap.com/u/Salman_Javeed)\
**Post date:** [September 23, 2024, 2:39am UTC](https://integration.keap.com/t/get-multiple-contacts-with-rest-api-call/93197/1 "2024-09-23T02:39:50Z")

</div>

I am looking to retrieve a list of contacts filtered by contact Ids. I couldn’t figure out if there was an API to do this. I can also use the PHP-SDK. Any help or suggestion towards this is highly appreciated.

---

<div class="post-metadata">

**Author:** ![Pav](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/pav/32/124_2.png) [@Pav](https://integration.keap.com/u/Pav)\
**Post date:** [September 23, 2024, 12:08pm UTC](https://integration.keap.com/t/get-multiple-contacts-with-rest-api-call/93197/2 "2024-09-23T12:08:09Z")

</div>

Hi @Salman_Javeed,

The PHP SDK Route is not the option here unfortunately.

In the REST API v1, which the SDK uses, it does not have any capability to query multiple Contact IDs.  
[https://developer.keap.com/docs/rest/#tag/Contact/operation/listContactsUsingGET](https://developer.keap.com/docs/rest/#tag/Contact/operation/listContactsUsingGET)

But in the REST API v2, you can set the “filter” property with an Set String of Contact IDs.  
[https://developer.keap.com/docs/restv2/#tag/Contact/operation/listContactsUsingGET\_1](https://developer.keap.com/docs/restv2/#tag/Contact/operation/listContactsUsingGET_1)

Or, you can use the XML-RPC and do a Query on the Contact record instead with an array of the Contact IDs.  
[https://developer.keap.com/docs/xml-rpc/#data-query-a-data-table](https://developer.keap.com/docs/xml-rpc/#data-query-a-data-table)

You will have to decide what to do here.

---

<div class="post-metadata">

**Author:** ![Salman\_Javeed](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/salman_javeed/32/14882_2.png) [@Salman\_Javeed](https://integration.keap.com/u/Salman_Javeed)\
**Post date:** [September 23, 2024, 1:31pm UTC](https://integration.keap.com/t/get-multiple-contacts-with-rest-api-call/93197/3 "2024-09-23T13:31:06Z")

</div>

Hi @Pav Thank you so much for taking time to reply to my question. I resolved it using PHP-SDK in Laravel. I passed the Id values as an array which perfectly returned all the related contact info.

For someone seeking this in future:

```auto
$infusionsoft = new Infusionsoft(['apikey' => $keap_api_key,]);;
        $data = $infusionsoft->data()->query("Contact", 1000, 0, ['Id' => [123, 124]], ['Id', 'FirstName', 'LastName', 'Email'], 'Id', false);

```
