def search_companies(self, max_results=None, results=[]):
    '\n        Do a company search\n        Note: try swap from blended search to cluster\n        '
    sleep(random.randint(2, 5))
    '\n        default_params = {\n            "count": count,\n            "guides": "List()",\n            "origin": "GLOBAL_SEARCH_HEADER",\n            "q": "guided",\n            "start": len(results),\n        }\n        '
    default_params = {'origin': 'GLOBAL_SEARCH_HEADER', 'guides': 'List(resultType->companies)', 'count': '10', 'q': 'guided', 'filters': 'List(resultType->companies)', 'start': len(results)}
    res = self.client.session.get(f'{self.client.API_BASE_URL}/search/blended?keywords=s&origin=GLOBAL_SEARCH_HEADER&count=10&guides=List(resultType-%3Ecompanies)&q=all&filters=List(resultType-%3Ecompanies)&start={len(results)}')
    data = res.json()
    total_found = data.get('paging', {}).get('total')
    if ((len(data['elements']) == 0) or (len(data['elements'][0]['elements']) == 0) or (total_found is None) or ((max_results is not None) and (len(results) >= max_results)) or ((max_results is not None) and ((len(results) / max_results) >= Linkedin._MAX_REPEATED_REQUESTS))):
        return results
    results.extend(data['elements'][0]['elements'])
    self.logger.debug(f'results grew: {len(results)}')
    return self.search_companies(max_results=max_results, results=results)
Do a company search
Note: try swap from blended search to cluster
def search_companies(self, max_results=None, results=[]):
    '\n        Do a company search\n        Note: try swap from blended search to cluster\n        '
    sleep(random.randint(2, 5))
    '\n        default_params = {\n            "count": count,\n            "guides": "List()",\n            "origin": "GLOBAL_SEARCH_HEADER",\n            "q": "guided",\n            "start": len(results),\n        }\n        '
    default_params = {'origin': 'GLOBAL_SEARCH_HEADER', 'guides': 'List(resultType->companies)', 'count': '10', 'q': 'guided', 'filters': 'List(resultType->companies)', 'start': len(results)}
    res = self.client.session.get(f'{self.client.API_BASE_URL}/search/blended?keywords=s&origin=GLOBAL_SEARCH_HEADER&count=10&guides=List(resultType-%3Ecompanies)&q=all&filters=List(resultType-%3Ecompanies)&start={len(results)}')
    data = res.json()
    total_found = data.get('paging', {}).get('total')
    if ((len(data['elements']) == 0) or (len(data['elements'][0]['elements']) == 0) or (total_found is None) or ((max_results is not None) and (len(results) >= max_results)) or ((max_results is not None) and ((len(results) / max_results) >= Linkedin._MAX_REPEATED_REQUESTS))):
        return results
    results.extend(data['elements'][0]['elements'])
    self.logger.debug(f'results grew: {len(results)}')
    return self.search_companies(max_results=max_results, results=results)