# Is there any api to get contacts linked to a company?

**URL:** https://integration.keap.com/t/is-there-any-api-to-get-contacts-linked-to-a-company/84915
**Category:** API Q&A
**Created:** [September 13, 2021, 5:01pm UTC](https://integration.keap.com/t/is-there-any-api-to-get-contacts-linked-to-a-company/84915 "2021-09-13T17:01:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Suresh\_Beetukuri](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@Suresh\_Beetukuri](https://integration.keap.com/u/Suresh_Beetukuri)
#### Post date: [September 13, 2021, 5:01pm UTC](https://integration.keap.com/t/is-there-any-api-to-get-contacts-linked-to-a-company/84915/1 "2021-09-13T17:01:22Z")

</div>

I can’t figure out how I can find a list of all contacts that are connected/linked to a company via the API.

Is that possible?

---

<div class="post-metadata">

### Author: ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)
#### Post date: [September 13, 2021, 9:41pm UTC](https://integration.keap.com/t/is-there-any-api-to-get-contacts-linked-to-a-company/84915/2 "2021-09-13T21:41:18Z")

</div>

Using the xmlrpc you can read the ‘Company’ table (view) which has an assigned ‘owner contact’ to it. If you’re looking for a list of all those who have the same company then that would have to be done by the company. You would query all contact on the contact table with a specific company assigned…so in that case you’d query to company table once for a list of all company records and then iterate through that list with a query for all contacts with that company set on their contact record…

---

<div class="post-metadata">

### Author: ![Suresh\_Beetukuri](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@Suresh\_Beetukuri](https://integration.keap.com/u/Suresh_Beetukuri)
#### Post date: [September 14, 2021, 4:23am UTC](https://integration.keap.com/t/is-there-any-api-to-get-contacts-linked-to-a-company/84915/3 "2021-09-14T04:23:51Z")

</div>

Thanks John for your reply is there any REST API using which I can retrieve contacts linked to company instead of xmlrpc…

---

<div class="post-metadata">

### Author: ![Suresh\_Beetukuri](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@Suresh\_Beetukuri](https://integration.keap.com/u/Suresh_Beetukuri)
#### Post date: [September 14, 2021, 8:43am UTC](https://integration.keap.com/t/is-there-any-api-to-get-contacts-linked-to-a-company/84915/4 "2021-09-14T08:43:05Z")

</div>

The approach looks like a workaround. If there are many companies and contacts, it would be a time-consuming approach to iterate through the records.

---

<div class="post-metadata">

### Author: ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)
#### Post date: [September 16, 2021, 11:23pm UTC](https://integration.keap.com/t/is-there-any-api-to-get-contacts-linked-to-a-company/84915/5 "2021-09-16T23:23:32Z")

</div>

You’re correct, it is indeed a work around. If there were a more direct way that I was aware of (xmlrpc or rest) I’d definitely had recommended it, but I’m afraid I’ve not seen any for what you specifically want.

They’ve improved a number of things with some rest calls (like getting a list of contacts with a specific tag) but not contacts by company.
