Setup Your Environment
Contact [email protected] to obtain your API key. Keep your key secure - never commit it to version control.
Make Your First Request
Let’s look up a GitHub user’s enriched profile:
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://api.peoplecontext.com"
headers = {
"Authorization" : f "Bearer { API_KEY } " ,
"Content-Type" : "application/json"
}
# Look up a GitHub user
params = {
"github" : "torvalds"
}
response = requests.get(
f " { BASE_URL } /api/v1/webset/person" ,
headers = headers,
params = params
)
profile = response.json()
if profile.get( "match" ):
print ( f "Name: { profile[ 'full_name' ] } " )
print ( f "Email: { profile.get( 'personal_email' ) } " )
print ( f "GitHub: { profile[ 'github' ][ 'url' ] } " )
if profile.get( 'linkedin' ):
print ( f "LinkedIn: { profile[ 'linkedin' ][ 'url' ] } " )
else :
print ( "No match found" )
Understanding the Response
A successful match returns the full profile schema:
{
"match" : true ,
"first_name" : "Linus" ,
"last_name" : "Torvalds" ,
"full_name" : "Linus Torvalds" ,
"personal_email" : "[email protected] " ,
"github" : {
"url" : "https://github.com/torvalds" ,
"username" : "torvalds" ,
"id" : 1024025 ,
"followers" : 200000 ,
"public_repos" : 6 ,
"bio" : "Creator of Linux" ,
"last_updated" : "2025-09-01"
},
"linkedin" : {
"url" : "https://www.linkedin.com/in/linustorvalds" ,
"username" : "linustorvalds"
},
"github_repos" : [ ... ],
"github_commits" : [ ... ],
"experience" : [ ... ],
"education" : [ ... ]
}
If no match is found:
Filter by Required Fields
Only get profiles that have specific fields:
params = {
"github" : "torvalds" ,
"required_fields" : "personal_email,linkedin"
}
response = requests.get(
f " { BASE_URL } /api/v1/webset/person" ,
headers = headers,
params = params
)
# Only returns profile if it has personal_email OR linkedin
Multiple required_fields are treated as OR - the profile needs at least one of the specified fields.
Next Steps