usernamestringobbligatorio
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.
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
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.
Inizia a costruire
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
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"
}'Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
usernamestringobbligatorioReddit username, without the u/ prefix. Example: "spez".
sortstringSort order for the user's comments. Defaults to new (most recent first).
Valori possibili: 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.
Predefinito: 25
cursorstringOpaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it back to fetch the next page.
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
Nessuna risposta salvata è stata pubblicata. Esegui l'API in Playground per ispezionarne la risposta.
Esplora altro
| API | Prezzo | Risposta |
|---|---|---|
Reddit User CommentsQuesta API Reddit | Da $0.0006 per chiamata | JSON |
Reddit | $0.001 per chiamata | JSON |
Reddit | $0.001 per chiamata | JSON |
Reddit | $0.001 per chiamata | JSON |
Reddit | $0.001 per chiamata | JSON |
Reddit | $0.001 per chiamata | JSON |
Domande
Invia una richiesta POST a https://api.sandbase.ai/v1/api/reddit/user-comments con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.
A partire da $0.0006 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Richiesti: username (string). Facoltativi: sort (uno tra new, top, hot, controversial), limit (integer) e cursor (string). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.
Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.
No. Reddit User Comments funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API Reddit.