Sand AISand AI MAGI-2MAGI-2 अब SandBase पर है: 1080p वीडियो, नेटीव ऑडियो के साथअभी आज़माएँ

Hacker News Profile

API दस्तावेज़
https://api.sandbase.ai/v1/api/hacker-news/profile

Get a Hacker News user's public profile by username - karma, bio, and account details as clean JSON.

मूल्य
से $0.0015USD / कॉल
मेथड
POST
प्रतिक्रिया
JSON
पैरामीटर
1 आवश्यक · 0 वैकल्पिक

प्लेग्राउंड

इनपुट
Hacker News username, e.g. "pg".
आउटपुटतैयार

आपका आउटपुट यहाँ दिखाई देगा

इनपुट पूरा करें, फिर Run पर क्लिक करें।

API README

Hacker News Profile API

Returns the public profile of a Hacker News user: the username, karma score, and bio. It needs one input, the Hacker News username as handle.

Use cases

  • Check the karma of a Hacker News account before you trust or rank its comments.
  • Show an author's bio and karma next to their posts in a dashboard.
  • Confirm that a Hacker News username exists before you run further lookups.
  • Track the karma of a set of well-known users over time.

Request

curl -X POST "https://api.sandbase.ai/v1/api/hacker-news/profile" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"handle": "pg"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
handlestringYesHacker News username, e.g. "pg".

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "bio": "Bug fixer.",
    "karma": 157316,
    "username": "pg"
  },
  "found": true
}

Response fields

FieldMeaning
foundtrue when the username exists. A lookup with no match still succeeds and returns found: false.
data.usernameThe Hacker News username of the profile.
data.karmaThe karma score of the user.
data.bioThe text the user wrote in the profile's about field.

Notes

  • Pass the username exactly as it appears on Hacker News, for example pg.
  • Check found before you read data, because a missing user returns found: false.
  • To find stories and comments on Hacker News, use Hacker News Search.
  • To read a specific story and its discussion, call Hacker News Story or Hacker News Story Comments.

Pricing

Billed at the actual cost of each call, about $0.0015 for the request above. Failed calls are not charged.

और जानें

संबंधित APIs

सभी APIs
APIकीमतप्रतिक्रिया
Hacker News$0.0015 प्रति कॉल सेJSON
Hacker News$0.0015 प्रति कॉल सेJSON
Hacker News$0.0015 प्रति कॉल सेJSON
Hacker News$0.0015 प्रति कॉल सेJSON

प्रश्न

FAQ

Hacker News Profile API का उपयोग कैसे करें?

https://api.sandbase.ai/v1/api/hacker-news/profile पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।

Hacker News Profile API की लागत कितनी है?

$0.0015 से प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।

Hacker News Profile API कौन-से parameters स्वीकार करती है?

आवश्यक: handle (string)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।

Hacker News Profile API क्या लौटाती है?

एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।

क्या मुझे एक Hacker News developer account या API key चाहिए?

नहीं। Hacker News Profile SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से Hacker News API access के लिए आवेदन करने की आवश्यकता नहीं है।