<?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: Increase the limit parameter in Get all companies in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/376177#M36969</link>
    <description>&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;how did you achive it please help me&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have same problem, i have 3357 companies records , incase if we have to change offsetvalue manually every time at endpoint then what is the use of API if we chnage offset manually ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help me with your reply.&lt;/P&gt;</description>
    <pubDate>Sat, 03 Oct 2020 21:05:14 GMT</pubDate>
    <dc:creator>Kishore</dc:creator>
    <dc:date>2020-10-03T21:05:14Z</dc:date>
    <item>
      <title>Increase the limit parameter in Get all companies</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/290236#M26955</link>
      <description>&lt;P&gt;I have more than 6000 companies in HubSpot and i want to get all companies while hitting the Get all companies API. Currently i can get Max 250 companies at a time. Please suggest me how can i manage such kind of situation.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 09:48:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/290236#M26955</guid>
      <dc:creator>Kumarp1</dc:creator>
      <dc:date>2019-09-09T09:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Increase the limit parameter in Get all companies</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/290407#M26969</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/104637"&gt;@Kumarp1&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope all is well with you &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When looking to get all companies using this endpoint here:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/companies/get-all-companies" target="_blank"&gt;Get all companies&lt;/A&gt; there is a maximum value of 250 return limit. The reason behind having a limit is because there may be portals with significant&amp;nbsp;number of contacts and returning all of them in a single&amp;nbsp;request would result in timeouts and/or huge response sizes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said, your team can look into using a if statement to gather all the companies records. If the &lt;STRONG&gt;&lt;EM&gt;has-more&lt;/EM&gt;&lt;/STRONG&gt; value is true, it means that there's another page of company records and for that you can use the offset value to get to the next page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;E.g.:&lt;/P&gt;
&lt;PRE&gt;https://api.hubspot.com/companies/v2/companies/paged?portalId={{portal_id}}&amp;amp;offset=2100755540&lt;/PRE&gt;
&lt;P&gt;Hope this helps to clarify!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 02:44:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/290407#M26969</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2019-09-10T02:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Increase the limit parameter in Get all companies</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/290603#M26987</link>
      <description>&lt;P&gt;Hi WendyGoh&lt;/P&gt;&lt;P&gt;Thankyou so much for your support.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 17:48:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/290603#M26987</guid>
      <dc:creator>Kumarp1</dc:creator>
      <dc:date>2019-09-10T17:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Increase the limit parameter in Get all companies</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/376176#M36968</link>
      <description>&lt;P&gt;Hi WendyGoh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do we have to change Offset values very time at endpoint ? Or it takes automatically?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have same problem, i have 3357 companies records , incase if we have to change offsetvalue manually every time at endpoint then what is the use of API if we do manually ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help me with your reply.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 20:41:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/376176#M36968</guid>
      <dc:creator>Kishore</dc:creator>
      <dc:date>2020-10-03T20:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Increase the limit parameter in Get all companies</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/376177#M36969</link>
      <description>&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;how did you achive it please help me&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have same problem, i have 3357 companies records , incase if we have to change offsetvalue manually every time at endpoint then what is the use of API if we chnage offset manually ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help me with your reply.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Oct 2020 21:05:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/376177#M36969</guid>
      <dc:creator>Kishore</dc:creator>
      <dc:date>2020-10-03T21:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Increase the limit parameter in Get all companies</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/376255#M36986</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/147488"&gt;@Kishore&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mention on this documentation&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="external-link" href="https://legacydocs.hubspot.com/docs/methods/companies/get-all-companies" target="_blank" rel="nofollow noopener"&gt;here&lt;/A&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;each request will also return two values, offset and has-more. If has-more is true, you'll need to make another request, using the offset to get the next page of company records. These are often used with a recursive function in order to get all companies stored in a CRM.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For instance, if you've 300 companies in your portal and your team&amp;nbsp;is looking to get all 300 companies records using the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="external-link" href="https://legacydocs.hubspot.com/docs/methods/companies/get-all-companies" target="_blank" rel="nofollow noopener"&gt;Get all companies endpoint&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;1. The first API call will return a maximum number of result -&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;250&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(&lt;EM&gt;if the limit is set to 250&lt;/EM&gt;)&lt;BR /&gt;i.e.&lt;BR /&gt;GET companies/v2/companies/paged?limit=250&lt;/P&gt;
&lt;P&gt;Assuming, the has-more is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;true&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and the offset value is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;4552438489&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. On the second API call, you would need to include the offset value on the request url to page to the second page&lt;BR /&gt;i.e.&lt;BR /&gt;GET companies/v2/companies/paged?limit=250&amp;amp;offset=4552438489&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;*If on the second call, has-more is still true, you would need to grab the &lt;STRONG&gt;newly generated offset value&lt;/STRONG&gt; and use it on the third call.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The offset value change upon each call.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 08:22:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/376255#M36986</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-10-05T08:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Increase the limit parameter in Get all companies</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/459050#M45048</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;do you know how to return body data from callback function of request function :&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;request&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;finalUrl&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;async&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;error&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;body&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;{ ... return JSON.parse(body)}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I know it must be something with asynchronous code, but I do not know how to return data from callback inside request function?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Jul 2021 14:32:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/459050#M45048</guid>
      <dc:creator>JMiljak</dc:creator>
      <dc:date>2021-07-14T14:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Increase the limit parameter in Get all companies</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/1001687#M74798</link>
      <description>&lt;P&gt;We used a recursive function to fetch all our companies as there's a limit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, let's say you have your function "callHubspotApi" with the argument "url". Inside this function you'd call the hubspot API and check if there's a "next page", if there is call the same function within itself while updating the "url" parameter with the next page. Keep doing this until there are no more pages left.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2024 12:42:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Increase-the-limit-parameter-in-Get-all-companies/m-p/1001687#M74798</guid>
      <dc:creator>Cerwind</dc:creator>
      <dc:date>2024-07-06T12:42:17Z</dc:date>
    </item>
  </channel>
</rss>

