LinkedIn公司搜索API:获取所有计数
我想获取LinkedIn上尽可能多的公司的员工规模范围。我使用了Python,并获取了LinkedIn的API。
但是,查询结果只返回前10个公司的数据。怎么才能让查询返回所有公司的数据呢?
application = linkedin.LinkedInApplication(authentication)
application.search_company(selectors=[{'companies': ['name', 'employee-count-range']}])
结果:输出中只列出了10家公司。怎么才能获取所有公司呢?
1 个回答
1
count:返回的工作数量。这个值可以在0到110之间。默认值是10。任何用户能看到的总结果数量取决于他们的账户等级。
还有根据Python LinkedIn文档中的例子(虽然这个例子是关于search_job
方法的,但这个解决方案也适用于search_company
):
application.search_job(selectors=[{'jobs': ['id',
'customer-job-code',
'posting-date']}],
params={'title': 'python', 'count': 2})
# Output
{u'jobs': {u'_count': 2,
u'_start': 0,
u'_total': 206747,
u'values': [{u'customerJobCode': u'0006YT23WQ',
u'id': 5174636,
u'postingDate': {u'day': 21, u'month': 3, u'year': 2013}},
{u'customerJobCode': u'00023CCVC2',
u'id': 5174634,
u'postingDate': {u'day': 21, u'month': 3, u'year': 2013}}]}}
你需要传递一个包含count
键的params
字典。