我正在尝试使用LinkedIn API来搜索公司,而不是用户。我特别不想要用户 - 只有公司。
我查看了 LinkedIn API 文档(RTFM 等),但据我所知,它不受支持。论坛上有 2 个帖子几乎直截了当地说 -这里和这里
我基本上只是在寻找一个简单的搜索界面,类似于 LinkedIn 主页上的内容。我还想显示以某种方式返回的信息。
我最好对网站本身进行手动 GET 操作吗?我需要缓存结果吗?我需要手动解析返回的 HTML 吗?
我计划在 Ruby 中实现这一点,但这并不是我真正关心的。
更新:现在有一个官方 API:https ://developer-programs.linkedin.com/documents/company-search
官方API好像没有这个功能。但是,他们确实有一个 URL,您可以在其中传递公司搜索,它将返回一个 JSON 响应,其中包含公司名称、徽标 URL、员工人数和公司简介链接。
例如,搜索“citr”将是
http://www.linkedin.com/ta/federator?query=citr&types=company,group,sitefeature
哪个返回
{
"sitefeature":{
"resultList":[
]
},
"company":{
"resultList":[
{
"id":"1195260",
"headLine":"<strong>CiTR<\/strong> SHINDIG",
"displayName":"CiTR SHINDIG",
"subLine":"Entertainment; 1-10 employees",
"url":"http://www.linkedin.com/companies/1195260"
},
{
"id":"2641",
"headLine":"<strong>Citr<\/strong>ix Systems",
"imageUrl":"http://media03.linkedin.com/mpr/mpr/shrink_40_40/p/3/000/043/32b/0076ade.png",
"displayName":"Citrix Systems",
"subLine":"Computer Software; 1001-5000 employees",
"url":"http://www.linkedin.com/companies/2641"
},
{
"id":"7659",
"headLine":"<strong>Citr<\/strong>oen",
"imageUrl":"http://media01.linkedin.com/mpr/mpr/shrink_40_40/p/3/000/01d/3d0/277c145.png",
"displayName":"Citroen",
"subLine":"Automotive; 10,001+ employees",
"url":"http://www.linkedin.com/companies/7659"
},
{
"id":"260214",
"headLine":"PSA Peugeot <strong>Citr<\/strong>oën",
"imageUrl":"http://media02.linkedin.com/mpr/mpr/shrink_40_40/p/2/000/021/0b7/07c4193.png",
"displayName":"PSA Peugeot Citroën",
"subLine":"Automotive; 10,001+ employees",
"url":"http://www.linkedin.com/companies/260214"
},
...
实际上,LinkedIn API 现在确实有一个公司搜索功能,从去年 5 月就可以使用: https ://developer.linkedin.com/documents/company-search
LinkedIn 有几个公司 API,这只是其中之一。请随时阅读文档并查看可用的内容。
这似乎是 Linkedin API 中的一个请求功能(https://developer.linkedin.com/thread/2970)