2010-09-23 232 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