Public LinkedIn company page data with an API
Fetch structured public LinkedIn company data like employee counts, industry, headquarters, and followers with one API call using thelastapi.
On this page 7 sections
You can fetch structured data from any public LinkedIn company page using the linkedin.company action in the thelastapi web data API. Send either a company profile URL or the company name to POST /v1/actions/linkedin.company, and the API returns verified details such as employee count, size range, follower numbers, website, headquarters, and industry. The action runs synchronously without requiring account credentials, headless browsers, or session cookies.
This guide explains how the linkedin.company action works, what data fields are returned, how to execute runs from the CLI or your backend, and how to handle errors and run logs.
What data does the API return?
The linkedin.company action extracts publicly visible corporate information from LinkedIn company pages. It takes one required input field: company. You can provide either the full LinkedIn company page URL (such as https://www.linkedin.com/company/microsoft) or simply the company handle or name.
The output contains clean, structured JSON. It specifically targets organizations; individual member profiles are not supported.
| Field | Type | Description |
|---|---|---|
status | string | Either found or not_found. |
name | string | The official display name of the organization. |
tagline | string | The company tagline or short summary description. |
website | string | The external website URL listed on the company profile. |
industries | array | The industry classifications assigned to the company. |
employees | number | The exact or reported count of associated employees. |
employeesRange | string | The company size tier (for example, "10,001+ employees"). |
followers | number | Total number of LinkedIn followers. |
foundedYear | number | The year the business was established. |
headquarters | string | The primary city, region, or country listed. |
logo | string | URL pointing to the company's profile picture or logo. |
LinkedIn company pages only: people's profiles are not offered. If you submit a query for an organization that does not exist or has a non-public URL, the API answers with status: "not_found".
Fetching company data with curl or the CLI
You can test the action immediately from your terminal using the vibiz CLI or by making a standard HTTP POST request.
To run the action using the CLI:
vibiz run linkedin.company --input '{"company":"https://www.linkedin.com/company/microsoft"}'You can also pass the plain company name instead of the full URL:
vibiz run linkedin.company --input '{"company":"microsoft"}'To run it over HTTP from any language or framework, send a JSON payload to https://thelastapi.dev/v1/actions/linkedin.company with your bearer token:
curl https://thelastapi.dev/v1/actions/linkedin.company \
-H "Authorization: Bearer $VIBIZ_API_KEY" \
-H "content-type: application/json" \
-d '{"input":{"company":"https://www.linkedin.com/company/microsoft"}}'A successful response returns an action_result object containing the run metadata, exact execution cost, and the parsed output:
{
"object": "action_result",
"action": "linkedin.company",
"output": {
"status": "found",
"name": "Microsoft",
"tagline": "Empowering every person and every organization on the planet to achieve more.",
"website": "https://www.microsoft.com",
"industries": ["Software Development", "Technology, Information and Internet"],
"employees": 221000,
"employeesRange": "10,001+ employees",
"followers": 23400000,
"foundedYear": 1975,
"headquarters": "Redmond, Washington",
"logo": "https://media.licdn.com/dms/image/..."
},
"cost_micro_usd": 6000,
"run_id": "arun_01j8xyz987company",
"console_url": "https://thelastapi.dev/web-data?action=linkedin.company&run=arun_01j8xyz987company"
}The cost_micro_usd property tells you the cost of the run in micro-dollars ($0.000001 per unit), allowing you to track spend on every extraction.
Calling the API from Node.js or TypeScript
In a running backend application using the official @vibiz/app package, you can invoke the action directly with vibiz.actions.run:
import { vibiz } from '@vibiz/app';
async function getCompanyProfile(companyHandle: string) {
const result = await vibiz.actions.run('linkedin.company', {
company: companyHandle,
});
if (result.output.status === 'not_found') {
console.log(`Company not found: ${companyHandle}`);
return null;
}
console.log(`Name: ${result.output.name}`);
console.log(`Headquarters: ${result.output.headquarters}`);
console.log(`Team Size: ${result.output.employeesRange}`);
console.log(`Followers: ${result.output.followers}`);
return result.output;
}
await getCompanyProfile('https://www.linkedin.com/company/microsoft');When called from an initialized app with a VIBIZ_APP_KEY, the cost is billed to the associated project. If you are building workflows that discover leads across multiple platforms, you can pair company extraction with other actions described in the Web data: scrape, search, SEO, ads library documentation. For instance, you might use Find businesses on Google Maps with an API to locate local accounts and then enrich their firmographics using linkedin.company.
If you also need to read the business's own landing page content, you can convert the domain returned in result.output.website into clean text via Scrape a website to markdown with one API call.
Execution times and timeout handling
Web actions that query complex live networks take longer than simple static scrapes. The linkedin.company action operates synchronously and typically takes a minute or two to gather and verify public records.
Because live page fetches may experience delays, every action has an execution bound between 60 and 150 seconds. If an upstream lookup takes longer than this bound, the action stops and returns a 503 provider_unavailable error:
{
"error": {
"code": "provider_unavailable",
"message": "The action timed out.",
"details": {
"reason": "timeout"
}
}
}When handling timeouts in automated jobs, inspect details.reason. If a request times out, you can schedule a retry. Calls that fail after starting still bill what they used during the attempt.
Other possible API error codes include:
invalid_request(HTTP 400): Thecompanyinput was empty or malformed.payment_required(HTTP 402): The account has run out of balance credits. Top up viavibiz billing top-up.rate_limited(HTTP 429): You have hit the account's daily spend ceiling ($5 default).not_found(HTTP 404): The action name was mistyped.
Reviewing past runs and tracking costs
Every web data execution is saved automatically. You can inspect inputs, outputs, errors, and timing across your organization without setting up an external database.
To view recent action runs from the terminal:
# List recent action executions
vibiz runs --action linkedin.company
# View the full output of a single run
vibiz runs arun_01j8xyz987companyYou can query the same data programmatically:
GET /v1/actions/runs: Returns a list of past executions, newest first, without outputs. Supports filters like?action=linkedin.company,?project=<id>,?limit=25, and?since=<iso>.GET /v1/actions/runs/:id: Returns the complete stored record, including the full JSON output (up to 1 MB).
In the console, you can open Web data in the sidebar to review past runs, inspect inputs, and re-run queries with modified inputs. Each request's console_url links directly to that run's dashboard view.
Web data actions carry a 30% margin on top of base compute costs. Every call counts against your account's daily spend ceiling. You can audit billed totals by project or action at any time using vibiz usage.
Next steps
To query your first organization, pass a company name or URL to vibiz run linkedin.company. For larger discovery workflows, review the Web data: scrape, search, SEO, ads library guide to learn how company lookups integrate with full site crawls and search queries.
Frequently asked questions
Can I fetch personal LinkedIn user profiles with this API?
No. The `linkedin.company` action only works on public company and organization pages, and personal profiles are not offered.
What happens if an organization cannot be found?
The action succeeds with an HTTP 200 response containing `status: "not_found"` inside the output object.
What is the input format for the company field?
You can pass either the full company URL (such as `https://www.linkedin.com/company/microsoft`) or just the company name or handle.
How long does a `linkedin.company` request take?
It runs synchronously and typically takes a minute or two; if an upstream lookup exceeds the 60 to 150-second timeout window, the call fails with a `503 provider_unavailable` error and `reason: "timeout"`.