# Get associations in Search API

**URL:** <https://community.hubspot.com/t/get-associations-in-search-api/65422>\
**Category:** APIs & Integrations\
**Tags:** email\
**Created:** [September 20, 2022, 6:26am UTC](https://community.hubspot.com/t/get-associations-in-search-api/65422 "2022-09-20T06:26:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmaddiona](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mmaddiona/32/195400_2.png) [@mmaddiona](https://community.hubspot.com/u/mmaddiona)\
**Post date:** [September 20, 2022, 6:26am UTC](https://community.hubspot.com/t/get-associations-in-search-api/65422/1 "2022-09-20T06:26:58Z")

</div>

Why does Hubspot API not allow retrieving associations while doing any search API?

Use case: I need to get new emails since my last sync.

Using a Search API I can filter by my last sync date.  
If I get 100 new emails but don’t know which contacts/companies these emails are associated with, I need 100 more GET queries (one for each email ID) to obtain association info related to these emails.  
While in a GET request I can obtain emails and their associations, but I can’t filter by date, so I have to retrieve ALL old emails (that could be thousands).  
For this use case, which I think is a common situation among Hubspot developers, I believe that API could be improved a lot!  
Are you going to evaluate this feature that could allow external apps to reduce a lot of API calls?  
Is there any other way that I am not considering?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 20, 2022, 6:22pm UTC](https://community.hubspot.com/t/get-associations-in-search-api/65422/2 "2022-09-20T18:22:22Z")

</div>

Hi, @mmaddiona 👋 Thanks for your feedback. I think we can split your post into two parts and help clarify things a bit.

Q1 — For the majority of your post, this is best suited for the [Ideas Community](https://community.hubspot.com/t5/Ideas/ct-p/ideas), as it is product feedback and suggestions for additional features.

Q2 — For other approaches, hey @Teun @LMeert @ChrisoKlepke, I know you’ve tackled similar questions in the past. Do you have any feedback for @mmaddiona and their Search + Associations-based goal?

Thank you very much! — Jaycee

---

<div class="post-metadata">

**Author:** ![ChrisoKlepke](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chrisoklepke/32/11213_2.png) [@ChrisoKlepke](https://community.hubspot.com/u/ChrisoKlepke)\
**Post date:** [September 23, 2022, 7:25am UTC](https://community.hubspot.com/t/get-associations-in-search-api/65422/3 "2022-09-23T07:25:29Z")

</div>

Hey @mmaddiona ,

thank you for reaching out to the community. What you’re mentioning is definitely something we’ve encountered also. One thing that I haven’t tried personally for this use case but in other instances is the GraphQL Beta. You can find more about it here:

> **[Expanding the GraphQL beta for CMS developers](https://developers.hubspot.com/changelog/expanding-the-graphql-beta-for-cms-developers)**
>
> The GraphQL functionality allows developers to easily fetch all of their HubDB and CRM object data, and all relevant associated data at once, rather than making round trip API/HubL function calls to get associated CRM object data, or foreign ID/child...

That feature is more geared towards getting data out of the CRM and onto webpages, but there is also an API endpoint to leverage this functionality from external systems:

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fcms%2Fdata%2Fquery-hubspot-data-using-graphql)**

Let me know if you have further questions regarding this. But I hope this will help you get going.

Cheers,

Chriso

---

<div class="post-metadata">

**Author:** ![mmaddiona](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mmaddiona/32/195400_2.png) [@mmaddiona](https://community.hubspot.com/u/mmaddiona)\
**Post date:** [September 23, 2022, 7:42am UTC](https://community.hubspot.com/t/get-associations-in-search-api/65422/4 "2022-09-23T07:42:04Z")

</div>

Thank you Chriso,

it would be helpful to try how this beta works.  
Unfortunately I can’t find in Product Updates the GraphQL Beta among other Betas.

I don’t know if this isn’t a public beta, and I need an invite to join.  
Thank you in advance,

Marco

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 23, 2022, 3:55pm UTC](https://community.hubspot.com/t/get-associations-in-search-api/65422/5 "2022-09-23T15:55:34Z")

</div>

Thank you, @ChrisoKlepke 🙌

Hey, @mmaddiona. What account-type are you using to look for the beta? Meaning, is it a HubSpot CMS free or Starter account? Or an App Test Account created from a Developer portal, for example? The feature is available to CMS Hub  
Professional or Enterprise accounts:

 ![GQL-Beta2.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/a/8a1aabfcd9aedcc6966e2392d6334e67573c7bea.png)

I ask because in both my personal portal (Enterprise tier) and my app test account, I can access the Beta — Product Updates \> Betas \> [Public Beta] GraphQL layer for CMS developers.

 ![GQL-Beta.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/c/c33a7eba5a2fc6ed2453894e1e524ce5a049dec4.png)

Have fun building! — Jaycee

---

<div class="post-metadata">

**Author:** ![mmaddiona](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mmaddiona/32/195400_2.png) [@mmaddiona](https://community.hubspot.com/u/mmaddiona)\
**Post date:** [September 26, 2022, 6:17am UTC](https://community.hubspot.com/t/get-associations-in-search-api/65422/6 "2022-09-26T06:17:01Z")

</div>

Thank you for your answer [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074)

Ok with my developer account I didn’t find it, but I could find it with my App Test Account created from the developer portal. Does this mean that I could try this feature only with my Test environment?
