Skip to main content
POST
https://api.peoplecontext.com
/
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>"
  ]
}
'
{
  "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
This endpoint enriches a person’s profile by searching GitHub and LinkedIn data using either a GitHub username, LinkedIn username, or email address.

Authentication

Authorization
string
required
Bearer token with your API key: Bearer YOUR_API_KEY
See the Authentication Guide for detailed setup instructions.

Request Parameters

Request Body (JSON)

At least one identifier is required:
github
string
GitHub username to search for.Example: "torvalds"
linkedin_username
string
LinkedIn username to search for.Example: "williamhgates"
This is the LinkedIn profile slug (e.g., from linkedin.com/in/williamhgates).
email
string
Email address to search for in GitHub and LinkedIn profiles.Example: "[email protected]"
The API searches the emails array in our data for matches across all requested websets.
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)
Example: ["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.
websets_matched
string[]
Array of websets that successfully matched and returned data. For example: ["github"]
person
object
Container object for all enriched profile data
github
object
GitHub profile data (when "github" webset is requested and a match is found)
user_id
integer
GitHub user ID
github_username
string
GitHub username
full_name
string
User’s full name
bio
string
GitHub bio/description
github
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
names
array
Array of names found across different sources
emails
array
Array of email addresses associated with the profile
email
string
Primary email address
social_accounts
array
Array of social media account URLs
linkedin_username
string
LinkedIn username
location
string
Location string from GitHub profile
location_canonical
object
Structured location data with city, state, country, country_code, latitude, longitude, postal_code, continent, label, and timezone
repos
array
Array of repository objects with metadata (repo_id, full_name, name, description, language, stargazers_count, forks_count, created_at, updated_at, etc.)
commits
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 a detail field:
{
  "detail": "Error message describing what went wrong"
}
Error Status Codes:
  • 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": "[email protected]", "websets": ["github", "linkedin"]}'

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": ["[email protected]"],
      "email": "[email protected]",
      "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": "[email protected]",
          "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.