LinkedIn Data API
Retrieve LinkedIn employee counts and follower metrics. Track workforce growth and company popularity as alternative data signals.
Endpoint
Section titled “Endpoint”GET /v1/linkedindata/{market}/{ticker}Authentication
Section titled “Authentication”Requires API key via token query parameter.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
market | string | Yes | Market identifier (e.g., S&P 500, NASDAQ) |
ticker | string | Yes | Stock ticker symbol (e.g., AAPL, META) |
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Yes | Your API key |
dateFrom | string | No | Start date (YYYY-MM-DD) |
dateTo | string | No | End date (YYYY-MM-DD) |
Request
Section titled “Request”curl "https://api.finbrain.tech/v1/linkedindata/S%26P%20500/META?token=YOUR_API_KEY"from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
# Get as DataFrame (recommended)df = fb.linkedin_data.ticker("S&P 500", "META", as_dataframe=True)print(df.head())# employeeCount followersCount# date# 2024-03-20 67000 12500000# 2024-03-13 66850 12480000
# Get raw JSON responselinkedin = fb.linkedin_data.ticker("S&P 500", "META")print(linkedin)#include <iostream>#include <string>#include <curl/curl.h>#include <nlohmann/json.hpp>
using json = nlohmann::json;
size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* userp) { userp->append((char*)contents, size * nmemb); return size * nmemb;}
json get_linkedin_data(const std::string& market, const std::string& ticker, const std::string& api_key) { CURL* curl = curl_easy_init(); std::string response;
if (curl) { char* encoded_market = curl_easy_escape(curl, market.c_str(), 0); std::string url = "https://api.finbrain.tech/v1/linkedindata/" + std::string(encoded_market) + "/" + ticker + "?token=" + api_key; curl_free(encoded_market);
curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); curl_easy_perform(curl); curl_easy_cleanup(curl); }
return json::parse(response);}
int main() { auto data = get_linkedin_data("S&P 500", "AMZN", "YOUR_API_KEY");
for (auto& entry : data["linkedinData"]) { std::cout << entry["date"].get<std::string>() << ": " << entry["employeeCount"].get<int64_t>() << " employees, " << entry["followersCount"].get<int64_t>() << " followers" << std::endl; }
return 0;}use reqwest::blocking::Client;use serde::Deserialize;use std::error::Error;
#[derive(Debug, Deserialize)]struct LinkedInEntry { date: String, #[serde(rename = "employeeCount")] employee_count: i64, #[serde(rename = "followersCount")] followers_count: i64,}
#[derive(Debug, Deserialize)]struct LinkedInResponse { ticker: String, name: String, #[serde(rename = "linkedinData")] linkedin_data: Vec<LinkedInEntry>,}
fn get_linkedin_data(market: &str, ticker: &str, api_key: &str) -> Result<LinkedInResponse, Box<dyn Error>> { let url = format!( "https://api.finbrain.tech/v1/linkedindata/{}/{}?token={}", urlencoding::encode(market), ticker, api_key );
let client = Client::new(); let response: LinkedInResponse = client.get(&url).send()?.json()?;
Ok(response)}
fn main() -> Result<(), Box<dyn Error>> { let data = get_linkedin_data("S&P 500", "AMZN", "YOUR_API_KEY")?;
for entry in &data.linkedin_data { println!("{}: {} employees, {} followers", entry.date, entry.employee_count, entry.followers_count); }
Ok(())}const market = encodeURIComponent("S&P 500");const response = await fetch( `https://api.finbrain.tech/v1/linkedindata/${market}/META?token=YOUR_API_KEY`);const data = await response.json();Response
Section titled “Response”Success Response (200 OK)
Section titled “Success Response (200 OK)”{ "ticker": "AMZN", "name": "Amazon.com Inc.", "linkedinData": [ { "date": "2024-03-20", "employeeCount": 755461, "followersCount": 30628460 } ]}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
ticker | string | Stock ticker symbol |
name | string | Company name |
linkedinData | array | Array of LinkedIn data points |
LinkedIn Object Fields
Section titled “LinkedIn Object Fields”| Field | Type | Description |
|---|---|---|
date | string | Date (YYYY-MM-DD) |
employeeCount | integer | Number of employees on LinkedIn |
followersCount | integer | LinkedIn page followers count |
Interpretation
Section titled “Interpretation”| YoY Growth | Signal |
|---|---|
| > 20% | Rapid expansion |
| 10-20% | Healthy growth |
| 0-10% | Moderate growth |
| -10-0% | Slight contraction |
| < -10% | Significant layoffs |
Errors
Section titled “Errors”| Code | Error | Description |
|---|---|---|
| 400 | Bad Request | Invalid market or ticker |
| 401 | Unauthorized | Invalid or missing API key |
| 404 | Not Found | Ticker not found |
| 500 | Internal Server Error | Server-side error |
Related
Section titled “Related”- LinkedIn Metrics Dataset - Use cases and analysis examples
- App Ratings - Mobile app metrics
- Sentiments - News sentiment