usernamestringobrigatório
Reddit username, without the u/ prefix. Example: "spez".
https://api.sandbase.ai/v1/api/reddit/user-commentsList a Reddit user's comments by username, sorted by new, top, hot, or controversial, with the parent post title and subreddit on every item and cursor pagination. Comment text may be truncated to a roughly 300-character preview, and this endpoint carries no per-comment permalink; use reddit.post_comments for full comment bodies and comment URLs on a given post.
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
Returns a page of a Reddit user's comments, each with a text preview, score, timestamp, and the parent post's title and subreddit. It needs a Reddit username without the u/ prefix.
sort to top.curl -X POST "https://api.sandbase.ai/v1/api/reddit/user-comments" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username": "spez"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Reddit username, without the u/ prefix. Example: "spez". |
cursor | string | No | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it back to fetch the next page. |
limit | integer | No | Page size to ask for (up to 100, default 25). Some sources honor it; others always return their whole page of about 25 comments. A page is never trimmed after the call, so pass nextCursor back as cursor to continue exact |
sort | string | No | Sort order for the user's comments. Defaults to new (most recent first). |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"comments": [
{
"author": "spez",
"bodyPreview": "Pretty simple. For people who are already coming to Reddit every week, we have t…",
"createdUtc": 1793324526,
"id": "19ruo33ofgh8i",
"postId": "1xiupuc",
"postTitle": "Reddit Announces Q3’26 Earnings (plus AMA!)",
"score": -9,
"subreddit": "RDDT"
}
],
"nextCursor": "cur_uHC_PYNAJi9Hh4rl4wAw2w"
},
"found": true
}
| Field | Meaning |
|---|---|
data.comments[].id | Identifier of the comment. |
data.comments[].bodyPreview | Start of the comment text. It can be cut short and ends with an ellipsis when truncated. |
data.comments[].createdUtc | Time the comment was posted, as a Unix timestamp. |
data.comments[].score | Comment score. It can be negative. |
data.comments[].postId / data.comments[].postTitle | ID and title of the post the comment was made on. |
data.comments[].subreddit | Subreddit of the parent post. It can be an empty string. |
data.comments[].author | Username of the comment author. |
data.nextCursor | Cursor for the next page. Pass it back as cursor. |
found | true when the user lookup returned data. |
data.nextCursor as cursor to fetch the next page. Keep the same username and sort.postId to get full comment bodies and comment URLs.subreddit can be empty on some items, so do not rely on it being set.Billed at the actual cost of each call, about $0.0006 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/reddit/user-comments" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 25,
"username": "spez"
}'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.
usernamestringobrigatórioReddit username, without the u/ prefix. Example: "spez".
sortstringSort order for the user's comments. Defaults to new (most recent first).
Valores possíveis: new, top, hot, controversial
limitintegerPage size to ask for (up to 100, default 25). Some sources honor it; others always return their whole page of about 25 comments. A page is never trimmed after the call, so pass nextCursor back as cursor to continue exactly where this response ended.
Padrão: 25
cursorstringOpaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it back to fetch the next page.
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 |
|---|---|---|
Reddit User CommentsEsta API Reddit | A partir de $0.0006 por chamada | JSON |
Reddit | $0.001 por chamada | JSON |
Reddit | $0.001 por chamada | JSON |
Reddit | $0.001 por chamada | JSON |
Reddit | $0.001 por chamada | JSON |
Reddit | $0.001 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/reddit/user-comments 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.0006 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Obrigatórios: username (string). Opcionais: sort (um de new, top, hot, controversial), limit (integer) e cursor (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. Reddit User Comments 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 Reddit separadamente.