handlestringobrigatório
Hacker News username, e.g. "pg".
https://api.sandbase.ai/v1/api/hacker-news/profileGet a Hacker News user's public profile by username - karma, bio, and account details as clean JSON.
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
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.
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.
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | Yes | Hacker News username, e.g. "pg". |
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
}
| Field | Meaning |
|---|---|
found | true when the username exists. A lookup with no match still succeeds and returns found: false. |
data.username | The Hacker News username of the profile. |
data.karma | The karma score of the user. |
data.bio | The text the user wrote in the profile's about field. |
pg.found before you read data, because a missing user returns found: false.Billed at the actual cost of each call, about $0.0015 for the request above. Failed calls are not charged.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
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"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
handlestringobrigatórioHacker News username, e.g. "pg".
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
Nenhuma resposta salva foi publicada. Execute a API no Playground para inspecionar a resposta.
Explorar mais
| API | Preço | Resposta |
|---|---|---|
Hacker News ProfileEsta API Hacker News | A partir de $0.0015 por chamada | JSON |
Hacker News | A partir de $0.0015 por chamada | JSON |
Hacker News | A partir de $0.0015 por chamada | JSON |
Hacker News | A partir de $0.0015 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/hacker-news/profile com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
A partir de $0.0015 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Obrigatórios: handle (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. Hacker News Profile funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do Hacker News separadamente.