# Scroll over all companies The functionality does not work well for huge datasets, and can result in errors and performance problems when paging deeply. The Scroll API provides an efficient mechanism for iterating over all companies in a dataset. - Each app can only have 1 scroll open at a time. You'll get an error message if you try to have more than one open per app. - If the scroll isn't used for 1 minute, it expires and calls with that scroll param will fail - If the end of the scroll is reached, "companies" will be empty and the scroll parameter will expire {% admonition type="info" name="Scroll Parameter" %} You can get the first page of companies by simply sending a GET request to the scroll endpoint. For subsequent requests you will need to use the scroll parameter from the response. {% /admonition %} {% admonition type="danger" name="Scroll network timeouts" %} Since scroll is often used on large datasets network errors such as timeouts can be encountered. When this occurs you will see a HTTP 500 error with the following message: "Request failed due to an internal network error. Please restart the scroll operation." If this happens, you will need to restart your scroll query: It is not possible to continue from a specific point when using scroll. {% /admonition %} Endpoint: GET /companies/scroll Version: 2.9 Security: bearerAuth ## Header parameters: - `Intercom-Version` (string) Intercom API version.By default, it's equal to the version set in the app package. Enum: "1.0", "1.1", "1.2", "1.3", "1.4", "2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "Unstable" ## Query parameters: - `scroll_param` (string) ## Response 200 fields (application/json): - `type` (string) The type of object - Enum: "list" - `data` (array) - `data.type` (string) Value is Enum: "company" - `data.id` (string) The Intercom defined id representing the company. Example: "531ee472cce572a6ec000006" - `data.name` (string) The name of the company. Example: "Example Company Inc." - `data.app_id` (string) The Intercom defined code of the workspace the company is associated to. Example: "ecahpwf5" - `data.plan` (object) - `data.plan.type` (string) Value is always "plan" Example: "plan" - `data.plan.id` (string) The id of the plan Example: "269315" - `data.plan.name` (string) The name of the plan Example: "Pro" - `data.company_id` (string) The company id you have defined for the company. Example: "6" - `data.remote_created_at` (integer) The time the company was created by you. Example: 1663597223 - `data.created_at` (integer) The time the company was added in Intercom. Example: 1663597223 - `data.updated_at` (integer) The last time the company was updated. Example: 1663597223 - `data.last_request_at` (integer) The time the company last recorded making a request. Example: 1663597223 - `data.size` (integer) The number of employees in the company. Example: 100 - `data.website` (string) The URL for the company website. Example: "https://www.intercom.com" - `data.industry` (string) The industry that the company operates in. Example: "Software" - `data.monthly_spend` (integer) How much revenue the company generates for your business. Example: 100 - `data.session_count` (integer) How many sessions the company has recorded. Example: 100 - `data.user_count` (integer) The number of users in the company. Example: 100 - `data.custom_attributes` (object) The custom attributes you have set on the company. Example: {"paid_subscriber":true,"monthly_spend":155.5,"team_mates":9} - `data.tags` (object) The list of tags associated with the company - `data.tags.type` (string) The type of the object Enum: "tag.list" - `data.tags.tags` (array) - `data.segments` (object) The list of segments associated with the company - `data.segments.segments` (array) - `data.segments.segments.type` (string) The type of object. Enum: "segment" - `data.segments.segments.id` (string) The unique identifier representing the segment. Example: "56203d253cba154d39010062" - `data.segments.segments.name` (string) The name of the segment. Example: "Active" - `data.segments.segments.created_at` (integer) The time the segment was created. Example: 1394621988 - `data.segments.segments.updated_at` (integer) The time the segment was updated. Example: 1394622004 - `data.segments.segments.person_type` (string) Type of the contact: contact (lead) or user. Enum: "contact", "user" - `data.segments.segments.count` (integer,null) The number of items in the user segment. It's returned when is included in the request. Example: 3 - `pages` (object,null) Cursor-based pagination is a technique used in the Intercom API to navigate through large amounts of data. A "cursor" or pointer is used to keep track of the current position in the result set, allowing the API to return the data in small chunks or "pages" as needed. - `pages.type` (string) the type of object . Enum: "pages" - `pages.page` (integer) The current page Example: 1 - `pages.next` (object,null) - `pages.next.per_page` (integer) The number of results to fetch per page. Example: 2 - `pages.next.starting_after` (string,null) The cursor to use in the next request to get the next page of results. Example: "your-cursor-from-response" - `pages.per_page` (integer) Number of results per page Example: 2 - `pages.total_pages` (integer) Total number of pages Example: 13 - `total_count` (integer,null) The total number of companies Example: 100 - `scroll_param` (string) The scroll parameter to use in the next request to fetch the next page of results. Example: "25b649f7-4d33-4ef6-88f5-60e5b8244309" ## Response 401 fields (application/json): - `type` (string, required) The type is error.list Example: "error.list" - `request_id` (string,null) Example: "f93ecfa8-d08a-4325-8694-89aeb89c8f85" - `errors` (array, required) An array of one or more error objects - `errors.code` (string, required) A string indicating the kind of error, used to further qualify the HTTP response code Example: "unauthorized" - `errors.message` (string,null) Optional. Human readable description of the error. Example: "Access Token Invalid" - `errors.field` (string,null) Optional. Used to identify a particular field or query parameter that was in error. Example: "email"