A Hacker News user's public profile: karma, about text and account creation date.
curl -X POST "https://api.primaryapi.com/v1/run/hackernews.profile" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"handle":"pg"}'{
"output": {
"found": true,
"data": {
"username": "pg",
"karma": 157316,
"bio": "Bug fixer.",
"createdUtc": 1160418092
}
},
"credits": 1
}Input and output
1 field
pg.4 fields
Good to know
Usernames are case-sensitive.
Unknown handle? It comes back as not found, not as an error.
More from Hacker News. Same key, same credits.
The same key and credits work for every API.