LinkedIn User Profile API (V1)
GET
API health status
24h health
24h avg latency
Last checked
Healthy Available Limited Mostly unavailable No data
Healthy
Loading health status...
24h trend
30d trend
Retrieves a LinkedIn profile by username, including documented core profile fields such as name and headline. Use it to inspect a person's professional background or before requesting published posts.
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
token | query | string | Yes | - | Access token for this API service. |
username | query | string | Yes | - | LinkedIn username from the profile URL, for example jack from linkedin.com/in/jack. |
Code Samples
bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/linkedin/get-user-detail/v1?token=YOUR_API_KEY&username=VALUE'text
I want to use the "User Profile (V1)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/linkedin/get-user-detail/v1?token=YOUR_API_KEY&username=VALUE
API Endpoint: BASE_URL + /api/linkedin/get-user-detail/v1?token=YOUR_API_KEY&username=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/linkedin/user-profile-v1-en.json
Parameters:
- token (query): Access token for this API service. (Required)
- username (query): LinkedIn username from the profile URL, for example jack from linkedin.com/in/jack. (Required)
Return format: safely handle JSON or text according to the actual Content-Type.
Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set the request timeout to 120 seconds. If 120 seconds is too long for your use case, use at least 60 seconds, but a small number of requests may time out before receiving a result.
3. Business Code Reference:
- 0: Success
- 100: Invalid or Inactive Token
- 301: Collection Failed. Please Retry.
- 302: Rate Limit Exceeded
- 303: Daily Quota Exceeded
- 400: Invalid Parameters
- 500: Internal Server Error
- 600: Permission Denied
- 601: Insufficient Balance
- 602: Token Budget Exceeded
4. Code 601 means the shared account balance is insufficient. Code 602 means the current API token's own cumulative budget limit has been reached. Token budget limits do not transfer funds out of the shared account balance.
Please help me write a script in my preferred programming language to call this API and handle the response.python
import requests
BASE_URL = "https://api.justoneapi.com" # Provided by OpenAPI servers
url = BASE_URL + "/api/linkedin/get-user-detail/v1?token=YOUR_API_KEY&username=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
content_type = response.headers.get("content-type", "").lower()
if "json" in content_type:
try:
print(response.json())
except ValueError:
print(response.text)
elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
print(response.text)
else:
with open("response.bin", "wb") as output:
output.write(response.content)
print(f"Saved {len(response.content)} bytes to response.bin")js
const BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
const url = BASE_URL + "/api/linkedin/get-user-detail/v1?token=YOUR_API_KEY&username=VALUE";
const response = await fetch(url, {
method: "GET",
signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
const contentType = (response.headers.get("content-type") || "").toLowerCase();
const mediaType = contentType.split(";", 1)[0].trim();
const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
if (textual) {
const responseText = new TextDecoder().decode(responseBytes);
let data = responseText;
if (contentType.includes("json")) {
try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
}
console.log(data);
} else {
console.log(`Received ${responseBytes.byteLength} binary bytes`);
}
}java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
public class Main {
public static void main(String[] args) throws Exception {
final String BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
final String url = BASE_URL + "/api/linkedin/get-user-detail/v1?token=YOUR_API_KEY&username=VALUE";
HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
HttpRequest.Builder builder = HttpRequest.newBuilder()
.uri(URI.create(url))
.timeout(Duration.ofSeconds(120))
.method("GET", HttpRequest.BodyPublishers.noBody());
HttpRequest request = builder.build();
HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
System.out.println(response.statusCode());
String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
String mediaType = contentType.split(";", 2)[0].trim();
if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
System.out.println(new String(response.body(), StandardCharsets.UTF_8));
} else {
Files.write(Path.of("response.bin"), response.body());
System.out.println("Saved " + response.body().length + " bytes to response.bin");
}
}
}go
package main
import (
"fmt"
"io"
"os"
"strings"
"net/http"
"time"
)
const BASE_URL = "https://api.justoneapi.com" // Provided by OpenAPI servers
func main() {
client := &http.Client{Timeout: 120 * time.Second}
url := BASE_URL + "/api/linkedin/get-user-detail/v1?token=YOUR_API_KEY&username=VALUE"
req, _ := http.NewRequest("GET", url, nil)
resp, _ := client.Do(req)
defer resp.Body.Close()
fmt.Println(resp.StatusCode)
bodyBytes, _ := io.ReadAll(resp.Body)
contentType := strings.ToLower(resp.Header.Get("Content-Type"))
mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
fmt.Println(string(bodyBytes))
} else {
os.WriteFile("response.bin", bodyBytes, 0600)
fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
}
}php
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Provided by OpenAPI servers
$url = $BASE_URL . '/api/linkedin/get-user-detail/v1?token=YOUR_API_KEY&username=VALUE';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
echo $response;
} else {
file_put_contents('response.bin', $response);
echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}Response Fields
Key fields in a successful response (code = 0).
Lookup status3 fields
data
LinkedIn profile lookup result. The response can contain an error code and message without profile fields.
| Field | Type | Description |
|---|---|---|
error_code | string | Error code reported in the lookup data when the profile is unavailable. |
error | string | Error message reported in the lookup data. |
timestamp | string | Timestamp text reported for the lookup, when provided. |
Public profile17 fields
data
| Field | Type | Description |
|---|---|---|
id | string | Profile identifier reported for this record. |
linkedin_id | string | Public LinkedIn profile identifier, returned as text. |
linkedin_num_id | string | Numeric LinkedIn profile identifier returned as text. |
url | string | LinkedIn URL for the public profile. |
name | string | Full display name shown on the profile. |
first_name | string | Given name reported on the profile. |
last_name | string | Family name reported on the profile. |
position | string | null | Position or headline text shown on the profile, when available. |
about | string | Public profile summary text. |
city | string | City reported in the profile. |
country_code | string | Country code reported in the profile. |
location | string | Profile location as display text. |
avatar | string | Profile avatar image URL. |
banner_image | string | Profile banner image URL. |
default_avatar | boolean | Whether the profile is marked as using a default avatar. |
influencer | boolean | Influencer indicator reported for the profile. |
memorialized_account | boolean | Whether the profile is marked as a memorialized account. |
Connections and recommendations5 fields
data
| Field | Type | Description |
|---|---|---|
followers | integer | Reported follower count for the profile. |
connections | integer | Reported connection count for the profile. |
recommendations_count | integer | Reported number of recommendations for the profile. |
recommendations | array | Recommendation text entries returned with the public profile. |
recommendations[] | string | One reported recommendation as text. |
Company and employment16 fields
data
| Field | Type | Description |
|---|---|---|
current_company | object | Current company details when reported on the profile. |
current_company.name | string | Current company display name. |
current_company.company_id | string | Identifier of the current company. |
current_company.title | string | Reported role title at the current company. |
current_company.location | string | null | Location text reported for the current company, when available. |
current_company_company_id | string | Current company ID reported at the profile level. |
current_company_name | string | Current company name reported at the profile level. |
experience | array | null | Employment experience entries reported on the profile, when available. |
experience[] | object | One employment experience entry. |
experience[].title | string | Role title in this experience entry. |
experience[].location | string | Location text for this experience entry. |
experience[].start_date | string | Start date as display text for this experience entry. |
experience[].end_date | string | End date as display text for this experience entry. |
experience[].company | string | Company name in the experience entry. |
experience[].company_id | string | Identifier of the company in this experience entry. |
experience[].url | string | LinkedIn company URL associated with this experience entry. |
Education and certifications14 fields
data
| Field | Type | Description |
|---|---|---|
educations_details | string | Education summary text shown on the profile. |
education | array | Education entries reported on the profile. |
education[] | object | One education entry. |
education[].title | string | Title or institution name shown for the education entry. |
education[].url | string | LinkedIn institution URL associated with the education entry. |
education[].start_year | string | Start year as display text for the education entry. |
education[].end_year | string | End year as display text for the education entry. |
education[].degree | string | Degree text shown for the education entry. |
education[].field | string | Field of study shown for the education entry. |
certifications | array | Certification entries reported on the public profile. |
certifications[] | object | One certification entry. |
certifications[].title | string | Certification title shown on the profile. |
certifications[].subtitle | string | Subtitle shown for the certification entry. |
certifications[].meta | string | Additional display text for the certification entry. |
Posts and activity15 fields
data
| Field | Type | Description |
|---|---|---|
posts | array | Posts returned with the public profile. |
posts[] | object | One post returned with the public profile. |
posts[].id | string | Identifier reported for this post. |
posts[].title | string | Post title text. |
posts[].attribution | string | Attribution text shown for the post. |
posts[].link | string | LinkedIn link for the post. |
posts[].created_at | string | Creation time text reported for the post. |
posts[].interaction | string | Interaction summary text shown with the post. |
activity | array | Activity entries returned with the public profile. |
activity[] | object | One activity entry. |
activity[].id | string | Identifier reported for the activity entry. |
activity[].title | string | Title text shown for the activity entry. |
activity[].interaction | string | null | Interaction text shown for the activity entry, when available. |
activity[].link | string | LinkedIn link for the activity entry. |
activity[].img | string | null | Image URL associated with the activity entry, when available. |
Related profiles12 fields
data
| Field | Type | Description |
|---|---|---|
people_also_viewed | array | Public profile cards shown as other people also viewed. |
people_also_viewed[] | object | One public profile card in the also-viewed list. |
people_also_viewed[].profile_link | string | LinkedIn profile URL for the related person. |
people_also_viewed[].name | string | Display name shown on the related profile card. |
people_also_viewed[].about | string | null | Summary text shown for the related profile, when available. |
people_also_viewed[].location | string | Location text shown on the related profile card. |
similar_profiles | array | Public profile cards shown as similar profiles. |
similar_profiles[] | object | One similar public profile card. |
similar_profiles[].url | string | LinkedIn profile URL for this similar profile. |
similar_profiles[].name | string | Display name shown for the similar profile. |
similar_profiles[].title | string | null | Headline shown for the similar profile, when available. |
similar_profiles[].url_text | string | Display text for the similar profile link. |
Response Example
Loading the response example...