Person Enrichment API
curl --request POST \
--url https://api.peoplecontext.com/v1/person/enrich \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"github": "<string>",
"linkedin_username": "<string>",
"email": "<string>",
"websets": [
"<string>"
]
}
'import requests
url = "https://api.peoplecontext.com/v1/person/enrich"
payload = {
"github": "<string>",
"linkedin_username": "<string>",
"email": "<string>",
"websets": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
github: '<string>',
linkedin_username: '<string>',
email: '<string>',
websets: ['<string>']
})
};
fetch('https://api.peoplecontext.com/v1/person/enrich', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.peoplecontext.com/v1/person/enrich",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'github' => '<string>',
'linkedin_username' => '<string>',
'email' => '<string>',
'websets' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.peoplecontext.com/v1/person/enrich"
payload := strings.NewReader("{\n \"github\": \"<string>\",\n \"linkedin_username\": \"<string>\",\n \"email\": \"<string>\",\n \"websets\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.peoplecontext.com/v1/person/enrich")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"github\": \"<string>\",\n \"linkedin_username\": \"<string>\",\n \"email\": \"<string>\",\n \"websets\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peoplecontext.com/v1/person/enrich")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"github\": \"<string>\",\n \"linkedin_username\": \"<string>\",\n \"email\": \"<string>\",\n \"websets\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"websets_matched": [
"<string>"
],
"person": {
"github": {
"user_id": 123,
"github_username": "<string>",
"full_name": "<string>",
"bio": "<string>",
"github": {},
"names": [
{}
],
"emails": [
{}
],
"email": "<string>",
"social_accounts": [
{}
],
"linkedin_username": "<string>",
"location": "<string>",
"location_canonical": {},
"repos": [
{}
],
"commits": [
{}
]
}
}
}Person Endpoints
Person Enrichment API
Enrich person profiles using GitHub username, LinkedIn username, or email address
POST
/
v1
/
person
/
enrich
Person Enrichment API
curl --request POST \
--url https://api.peoplecontext.com/v1/person/enrich \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"github": "<string>",
"linkedin_username": "<string>",
"email": "<string>",
"websets": [
"<string>"
]
}
'import requests
url = "https://api.peoplecontext.com/v1/person/enrich"
payload = {
"github": "<string>",
"linkedin_username": "<string>",
"email": "<string>",
"websets": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
github: '<string>',
linkedin_username: '<string>',
email: '<string>',
websets: ['<string>']
})
};
fetch('https://api.peoplecontext.com/v1/person/enrich', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.peoplecontext.com/v1/person/enrich",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'github' => '<string>',
'linkedin_username' => '<string>',
'email' => '<string>',
'websets' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.peoplecontext.com/v1/person/enrich"
payload := strings.NewReader("{\n \"github\": \"<string>\",\n \"linkedin_username\": \"<string>\",\n \"email\": \"<string>\",\n \"websets\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.peoplecontext.com/v1/person/enrich")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"github\": \"<string>\",\n \"linkedin_username\": \"<string>\",\n \"email\": \"<string>\",\n \"websets\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peoplecontext.com/v1/person/enrich")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"github\": \"<string>\",\n \"linkedin_username\": \"<string>\",\n \"email\": \"<string>\",\n \"websets\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"websets_matched": [
"<string>"
],
"person": {
"github": {
"user_id": 123,
"github_username": "<string>",
"full_name": "<string>",
"bio": "<string>",
"github": {},
"names": [
{}
],
"emails": [
{}
],
"email": "<string>",
"social_accounts": [
{}
],
"linkedin_username": "<string>",
"location": "<string>",
"location_canonical": {},
"repos": [
{}
],
"commits": [
{}
]
}
}
}Endpoint
POST /v1/person/enrich
Authentication
string
required
Bearer token with your API key:
Bearer YOUR_API_KEYRequest Parameters
Request Body (JSON)
At least one identifier is required:string
GitHub username to search for.Example:
"torvalds"string
LinkedIn username to search for.Example:
"williamhgates"This is the LinkedIn profile slug (e.g., from linkedin.com/in/williamhgates).
string
Email address to search for in GitHub and LinkedIn profiles.Example:
"user@example.com"The API searches the
emails array in our data for matches across all requested websets.string[]
default:"[\"github\"]"
List of data sources to include in the enrichment.Available websets:
github- GitHub profile data (repos, commits, activity)linkedin- LinkedIn profile data (experience, education, certifications)
["github", "linkedin"]Identifier Priority: The API will try to find profiles by specific identifiers first (github, linkedin_username), then fall back to email search if not found.
Response
Success Response (200 OK)
Returns a JSON object containing the enriched profile data.string[]
Array of websets that successfully matched and returned data. For example:
["github"]object
Container object for all enriched profile data
object
GitHub profile data (when
"github" webset is requested and a match is found)integer
GitHub user ID
string
GitHub username
string
User’s full name
string
GitHub bio/description
object
Nested object containing detailed GitHub account information including avatar_url, company, location, followers, following, public_repos, public_gists, type, created_at, and updated_at
array
Array of names found across different sources
array
Array of email addresses associated with the profile
string
Primary email address
array
Array of social media account URLs
string
LinkedIn username
string
Location string from GitHub profile
object
Structured location data with city, state, country, country_code, latitude, longitude, postal_code, continent, label, and timezone
array
Array of repository objects with metadata (repo_id, full_name, name, description, language, stargazers_count, forks_count, created_at, updated_at, etc.)
array
Array of commit objects with sha, author_name, author_email, message, and related repository information
Additional fields may be present depending on the data available in the GitHub profile.
No Match Response (200 OK)
When no matching profile is found:{
"person": {},
"websets_matched": []
}
Error Responses
All error responses follow the standard format with adetail field:
{
"detail": "Error message describing what went wrong"
}
- 401 Unauthorized - Missing or invalid API key
- 403 Forbidden - Organization is inactive
- 422 Unprocessable Entity - Validation error (missing required parameters or invalid values)
- 429 Too Many Requests - Monthly request limit exceeded
- 500 Internal Server Error - Unexpected server error (e.g., Elasticsearch connection failed)
Examples
# Enrich by GitHub username
curl -X POST "https://api.peoplecontext.com/v1/person/enrich" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"github": "torvalds", "websets": ["github"]}'
# Enrich by LinkedIn username
curl -X POST "https://api.peoplecontext.com/v1/person/enrich" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"linkedin_username": "williamhgates", "websets": ["linkedin"]}'
# Enrich with both GitHub and LinkedIn
curl -X POST "https://api.peoplecontext.com/v1/person/enrich" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"github": "torvalds", "linkedin_username": "linustorvalds", "websets": ["github", "linkedin"]}'
# Enrich by email
curl -X POST "https://api.peoplecontext.com/v1/person/enrich" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "websets": ["github", "linkedin"]}'
import requests
url = "https://api.peoplecontext.com/v1/person/enrich"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
# Enrich by GitHub username
payload = {
"github": "torvalds",
"websets": ["github"]
}
response = requests.post(url, headers=headers, json=payload)
data = response.json()
person = data.get("person", {})
github = person.get("github", {})
if github:
print(f"Name: {github.get('full_name')}")
print(f"Emails: {github.get('emails')}")
print(f"Repos: {github.get('public_repos')}")
else:
print("No match found")
# Enrich with both GitHub and LinkedIn
payload = {
"github": "torvalds",
"linkedin_username": "linustorvalds",
"websets": ["github", "linkedin"]
}
response = requests.post(url, headers=headers, json=payload)
data = response.json()
if "github" in data["person"]:
print(f"GitHub: {data['person']['github']['github_username']}")
if "linkedin" in data["person"]:
print(f"LinkedIn: {data['person']['linkedin']['linkedin_username']}")
// Enrich by GitHub username
const response = await fetch(
'https://api.peoplecontext.com/v1/person/enrich',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
github: 'torvalds',
websets: ['github']
})
}
);
const data = await response.json();
const github = data.person?.github;
if (github) {
console.log(`Name: ${github.full_name}`);
console.log(`Emails: ${github.emails}`);
console.log(`Repos: ${github.public_repos}`);
} else {
console.log('No match found');
}
<?php
$ch = curl_init();
$payload = json_encode([
'github' => 'torvalds',
'websets' => ['github']
]);
curl_setopt($ch, CURLOPT_URL, "https://api.peoplecontext.com/v1/person/enrich");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
$github = $data['person']['github'] ?? null;
if ($github) {
echo "Name: " . $github['full_name'] . "\n";
echo "Emails: " . implode(', ', $github['emails']) . "\n";
}
?>
Sample Response
{
"websets_matched": ["github"],
"person": {
"github": {
"user_id": 1024025,
"github_username": "torvalds",
"full_name": "Linus Torvalds",
"bio": "Creator of Linux and Git",
"github": {
"user_id": 1024025,
"github_username": "torvalds",
"avatar_url": "https://avatars.githubusercontent.com/u/1024025?",
"company": "@linuxfoundation",
"location": "Portland, OR",
"followers": 180000,
"following": 0,
"public_repos": 6,
"public_gists": 0,
"type": "user",
"created_at": "2011-09-03",
"updated_at": "2025-12-01"
},
"names": ["Linus Torvalds", "torvalds"],
"emails": ["torvalds@linux-foundation.org"],
"email": "torvalds@linux-foundation.org",
"social_accounts": ["twitter.com/linus__torvalds"],
"linkedin_username": "linustorvalds",
"location": "Portland, OR",
"location_canonical": {
"city": "Portland",
"state": "Oregon",
"country": "United States",
"country_code": "USA",
"latitude": 45.523064,
"longitude": -122.676483,
"postal_code": "97035",
"continent": "North America",
"label": "Portland, OR, USA",
"timezone": "America/Los_Angeles"
},
"repos": [
{
"repo_id": 2325298,
"full_name": "torvalds/linux",
"name": "linux",
"description": "Linux kernel source tree",
"language": "C",
"stargazers_count": 150000,
"forks_count": 48000,
"created_at": "2011-09-04",
"updated_at": "2025-12-01",
"owner": {}
}
],
"commits": [
{
"sha": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
"author_name": "Linus Torvalds",
"author_email": "torvalds@linux-foundation.org",
"message": "Linux-2.6.12-rc2"
}
]
}
}
}
Best Practices
Email Search for Lead Enrichment: If you have email addresses but not GitHub usernames, you can still find profiles by searching with the email parameter. The API searches the emails array in our GitHub data.
Rate Limits: API requests are subject to rate limits based on your organization’s plan. Monitor your monthly request count to avoid hitting limits.
Data Freshness: GitHub data is refreshed monthly. Check the profile data for recent activity and timestamps.
Related
- GitHub Webset Guide - Overview, use cases, and features
- Quickstart - Get started in 5 minutes
- Introduction - Learn about People Context API