2010-09-23 230 views
11

LinkedIn的API我试图使用LinkedIn API搜索公司,不用户。我特别不希望用户 - 只有公司。的公司目录

我看了LinkedIn API文档(RTFM和所有这些),但据我所知它不被支持。有2个帖子在论坛上几乎说这个 - herehere

我基本上只是寻找一个简单的搜索界面,类似于LinkedIn的主页上正在发生的事情。我也想显示以某种方式返回的信息。

我最好只是做一个手动的GET到网站本身?我需要缓存结果吗?我需要手动解析HTML回来吗?

我打算在Ruby中实现它,但那不是我真正关心的。

+0

我有一些类似的问题,与公司有关http://developer.linkedin.com/thread/2394 – sergtk 2010-10-29 06:44:33

回答

15

更新:现在有一个官方的API:https://developer-programs.linkedin.com/documents/company-search

官方API似乎并不具备这一功能。但是,他们确实有一个可以通过搜索公司的URL,并且会返回带有公司名称,徽标URL,员工数量和公司配置文件链接的JSON响应。

例如搜索的 “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" 
     }, 
... 
+0

不理想,但我想这是我们目前可以做的最好的 – 2011-02-17 11:24:35

+0

上帝,我希望我知道那之前....谢谢! – philgo20 2011-04-12 23:35:12

+0

感谢您的出色解决方案.. – 2015-02-04 10:55:34

4

实际上, LinkedIn API现在有一个公司搜索功能,从去年5月开始提供: https://developer.linkedin.com/documents/company-search

LinkedIn有几个公司的API,这只是其中之一。请随时阅读文档并查看可用内容。

+2

链接是已死,不幸。 – 2016-04-20 11:17:44

+0

此功能已停用,对不对? – John 2017-04-26 07:24:48