<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Want to get all the companies/contacts from create company/contact based list in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Want-to-get-all-the-companies-contacts-from-create-company/m-p/943349#M71892</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/707605"&gt;@HSuryvanshi&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I'm aware, the "Search Lists" endpoint will only return "Lists" as an object-type (not the Contacts/Companies/Deals etc. contained in the given List). If you want to get IDs of all records contained within a List, you might need to consider making some additional API calls, first to the "Fetch List Memberships Ordered by ID" endpoint (see "Endpoints" tab in &lt;A href="https://developers.hubspot.com/docs/api/crm/lists" target="_blank" rel="noopener"&gt;Lists API docs&lt;/A&gt;). For example, imagine I want to get all record IDs belonging to List ID&amp;nbsp;&lt;STRONG&gt;123&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;GET&lt;/STRONG&gt; /crm/v3/lists/&lt;STRONG&gt;123&lt;/STRONG&gt;/memberships?limit=2&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Response&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "results": [
        {
            "recordId": "301",
            "membershipTimestamp": "2023-09-05T04:41:19.090Z"
        },
        {
            "recordId": "551",
            "membershipTimestamp": "2023-09-05T04:41:19.103Z"
        }
    ],
    "paging": {
        "next": {
            "after": "AAAAAAAAA1M%3D",
            "link": "https://api.hubapi.com/crm/v3/lists/123/memberships?limit=2&amp;amp;after=AAAAAAAAA1M%3D"
        }
    },
    "total": 6
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I need information relating to those records (IDs 301, 551 and subsequent IDs discovered in paged results), I'd then have to make some more calls to a "Get Batch {Object-Type}" endpoint.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that proves helpful. Please let me know if you have any follow-up questions.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2024 19:18:50 GMT</pubDate>
    <dc:creator>zach_threadint</dc:creator>
    <dc:date>2024-03-13T19:18:50Z</dc:date>
    <item>
      <title>Want to get all the companies/contacts from create company/contact based list</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Want-to-get-all-the-companies-contacts-from-create-company/m-p/942009#M71864</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;I am getting below response only using below code:&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;but, I am looking for all the companies and contacts details not only count.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;client&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;hubspot&lt;/SPAN&gt;&lt;SPAN&gt;.Client.create(&lt;/SPAN&gt;&lt;SPAN&gt;access_token&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;access_token&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;list_search_request&lt;/SPAN&gt;&lt;SPAN&gt; = ListSearchRequest(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;offset&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;count&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;additional_properties&lt;/SPAN&gt;&lt;SPAN&gt;=[&lt;/SPAN&gt;&lt;SPAN&gt;"string"&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;client&lt;/SPAN&gt;&lt;SPAN&gt;.crm.lists.lists_api.do_search(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;list_search_request&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;list_search_request&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Response:&lt;/STRONG&gt;&lt;BR /&gt;{'additional_properties': {'hs_list_reference_count': '0', 'hs_list_size': '0'}, 'created_at': datetime.datetime(2024, 3, 11, 4, 44, 42, 369000, tzinfo=tzlocal()), 'created_by_id': 63849904, 'deleted_at': None, 'filters_updated_at': datetime.datetime(2024, 3, 11, 4, 44, 42, 369000, tzinfo=tzlocal()), 'list_id': 2, 'list_version': 1, 'name': 'MyCompanyList', 'object_type_id': '0-2', 'processing_status': 'COMPLETE', 'processing_type': 'DYNAMIC', 'updated_at': datetime.datetime(2024, 3, 11, 4, 44, 46, 996000, tzinfo=tzlocal()), 'updated_by_id': 63849904}{'additional_properties': {'hs_last_record_added_at': '1710235822948', 'hs_list_reference_count': '0', 'hs_list_size': '3'}, 'created_at': datetime.datetime(2024, 3, 11, 9, 41, 5, 304000, tzinfo=tzlocal()), 'created_by_id': 63849904, 'deleted_at': None, 'filters_updated_at': datetime.datetime(2024, 3, 12, 9, 30, 20, 889000, tzinfo=tzlocal()), 'list_id': 3, 'list_version': 2, 'name': 'MyContactList', 'object_type_id': '0-1', 'processing_status': 'COMPLETE', 'processing_type': 'DYNAMIC', 'updated_at': datetime.datetime(2024, 3, 12, 9, 30, 23, 113000, tzinfo=tzlocal()), 'updated_by_id': 63849904}{'additional_properties': {'hs_list_reference_count': '0', 'hs_list_size': '0'}, 'created_at': datetime.datetime(2024, 3, 12, 6, 14, 18, 967000, tzinfo=tzlocal()), 'created_by_id': 63849904, 'deleted_at': None, 'filters_updated_at': datetime.datetime(2024, 3, 12, 6, 14, 18, 967000, tzinfo=tzlocal()), 'list_id': 4, 'list_version': 1, 'name': 'Static-ContactList', 'object_type_id': '0-1', 'processing_status': 'COMPLETE', 'processing_type': 'MANUAL', 'updated_at': datetime.datetime(2024, 3, 12, 6, 14, 19, 129000, tzinfo=tzlocal()), 'updated_by_id': 63849904}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 09:40:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Want-to-get-all-the-companies-contacts-from-create-company/m-p/942009#M71864</guid>
      <dc:creator>HSuryvanshi</dc:creator>
      <dc:date>2024-03-12T09:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Want to get all the companies/contacts from create company/contact based list</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Want-to-get-all-the-companies-contacts-from-create-company/m-p/942821#M71865</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/707605"&gt;@HSuryvanshi&lt;/a&gt;&lt;/SPAN&gt;,&lt;BR /&gt;&lt;BR /&gt;Thank you for asking the Community!&lt;BR /&gt;&lt;BR /&gt;Could you please share which API documentation you are using?&lt;BR /&gt;&lt;BR /&gt;Is it&lt;A href="https://legacydocs.hubspot.com/docs/methods/lists/get_list_contacts" target="_blank"&gt; this documentation&lt;/A&gt;?&lt;BR /&gt;&lt;BR /&gt;I have moved your post to the Developers Forum for more visibility and so that experts in this field can help you!&lt;BR /&gt;&lt;BR /&gt;I'd like to invite a couple of subject matter experts to this conversation: Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811"&gt;@zach_threadint&lt;/a&gt;&lt;/SPAN&gt;, &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt; and &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/341938"&gt;@MBERARD&lt;/a&gt;&lt;/SPAN&gt; do you have tips to help &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/707605"&gt;@HSuryvanshi&lt;/a&gt;&lt;/SPAN&gt;, please?&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;Also, if anybody else has anything to add and/or share, please feel free to join in the conversation &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you so much and have a fantastic day!&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 08:19:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Want-to-get-all-the-companies-contacts-from-create-company/m-p/942821#M71865</guid>
      <dc:creator>BérangèreL</dc:creator>
      <dc:date>2024-03-13T08:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Want to get all the companies/contacts from create company/contact based list</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Want-to-get-all-the-companies-contacts-from-create-company/m-p/942825#M71866</link>
      <description>/crm/v3/lists/search&lt;BR /&gt;&lt;BR /&gt;I am using the above API endpoint&lt;BR /&gt;&lt;BR /&gt;using the below documentation:&lt;BR /&gt;developers.hubspot.com/docs/api/crm/lists&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Hariom&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Mar 2024 08:23:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Want-to-get-all-the-companies-contacts-from-create-company/m-p/942825#M71866</guid>
      <dc:creator>HSuryvanshi</dc:creator>
      <dc:date>2024-03-13T08:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Want to get all the companies/contacts from create company/contact based list</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Want-to-get-all-the-companies-contacts-from-create-company/m-p/943349#M71892</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/707605"&gt;@HSuryvanshi&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I'm aware, the "Search Lists" endpoint will only return "Lists" as an object-type (not the Contacts/Companies/Deals etc. contained in the given List). If you want to get IDs of all records contained within a List, you might need to consider making some additional API calls, first to the "Fetch List Memberships Ordered by ID" endpoint (see "Endpoints" tab in &lt;A href="https://developers.hubspot.com/docs/api/crm/lists" target="_blank" rel="noopener"&gt;Lists API docs&lt;/A&gt;). For example, imagine I want to get all record IDs belonging to List ID&amp;nbsp;&lt;STRONG&gt;123&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;GET&lt;/STRONG&gt; /crm/v3/lists/&lt;STRONG&gt;123&lt;/STRONG&gt;/memberships?limit=2&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Response&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "results": [
        {
            "recordId": "301",
            "membershipTimestamp": "2023-09-05T04:41:19.090Z"
        },
        {
            "recordId": "551",
            "membershipTimestamp": "2023-09-05T04:41:19.103Z"
        }
    ],
    "paging": {
        "next": {
            "after": "AAAAAAAAA1M%3D",
            "link": "https://api.hubapi.com/crm/v3/lists/123/memberships?limit=2&amp;amp;after=AAAAAAAAA1M%3D"
        }
    },
    "total": 6
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I need information relating to those records (IDs 301, 551 and subsequent IDs discovered in paged results), I'd then have to make some more calls to a "Get Batch {Object-Type}" endpoint.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that proves helpful. Please let me know if you have any follow-up questions.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 19:18:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Want-to-get-all-the-companies-contacts-from-create-company/m-p/943349#M71892</guid>
      <dc:creator>zach_threadint</dc:creator>
      <dc:date>2024-03-13T19:18:50Z</dc:date>
    </item>
  </channel>
</rss>

