usernamestringrequerido
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.
Su salida aparecerá aquí
Complete las entradas y luego haga clic en Ejecutar.
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.
Empiece a construir
Endpoint de la API de la plataforma con autenticación unificada y seguimiento 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"
}'Configure su clave de API de SandBase en el entorno de su servidor. Las solicitudes usan autenticación Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserve su clave en el servidor. No la exponga en código del navegador.
usernamestringrequeridoReddit username, without the u/ prefix. Example: "spez".
sortstringSort order for the user's comments. Defaults to new (most recent first).
Valores posibles: 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.
Valor predeterminado: 25
cursorstringOpaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it back to fetch the next page.
Respuesta de ejemplo guardada para esta API; no se realiza ninguna solicitud en vivo al verla.
No se ha publicado ninguna respuesta guardada. Ejecute la API en Playground para inspeccionar su respuesta.
Explorar más
| API | Precio | Respuesta |
|---|---|---|
Reddit User CommentsEsta API Reddit | Desde $0.0006 por llamada | JSON |
Reddit | $0.001 por llamada | JSON |
Reddit | $0.001 por llamada | JSON |
Reddit | $0.001 por llamada | JSON |
Reddit | $0.001 por llamada | JSON |
Reddit | $0.001 por llamada | JSON |
Preguntas
Envía una solicitud POST a https://api.sandbase.ai/v1/api/reddit/user-comments con tu clave API de SandBase en el encabezado Authorization (Bearer) y los parámetros como un cuerpo JSON. También puedes probarlo en el Playground de esta página sin escribir código.
Desde $0.0006 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.
Requeridos: username (string). Opcionales: sort (una de new, top, hot, controversial), limit (integer) y cursor (string). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.
Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.
No. Reddit User Comments funciona a través de SandBase, así que una sola clave API de SandBase cubre este endpoint y todas las demás APIs y modelos del catálogo. No necesitas solicitar acceso a la API de Reddit por separado.