afterstring
Pagination cursor from a previous response's nextCursor. Omit for the first page.
https://api.sandbase.ai/v1/api/reddit/trending-postsGet currently trending Reddit posts across all subreddits with stable cursor pagination.
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
Returns a list of Reddit posts that are currently trending across all subreddits. Each post includes its title, subreddit, author, score, comment count, and link. The only inputs are an optional page size (limit) and an optional cursor (after).
score and numComments across calls.domain values to see which sites and image hosts get shared most.curl -X POST "https://api.sandbase.ai/v1/api/reddit/trending-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"limit": 25}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
after | string | No | Pagination cursor from a previous response's nextCursor. Omit for the first page. |
limit | integer | No | Maximum number of trending posts to return (1-100, default 25). |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"nextCursor": "t3_1xmlmgw",
"posts": [
{
"author": "Negative_1by12_aura",
"authorId": "2eyayz4qcy",
"createdUtc": 1793676776,
"domain": "i.redd.it",
"id": "1xmids8",
"isArchived": false,
"isLocked": false,
"nsfw": false,
"numComments": 801,
"permalink": "/r/interesting/comments/1xmids8/hiv_is_no_longer_a_terminal_disease/",
"score": 21475,
"selftext": ""
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
data.posts[].id | Post ID without a prefix. Use it to look up the post in other APIs. |
data.posts[].title | Title of the post. |
data.posts[].subreddit | Name of the subreddit where the post was made. |
data.posts[].author / data.posts[].authorId | Username and ID of the post author. |
data.posts[].score / data.posts[].numComments | Post score and number of comments. |
data.posts[].upvoteRatio | Share of votes that are upvotes, as a decimal between 0 and 1 (for example 0.94). |
data.posts[].createdUtc | Creation time of the post as a Unix timestamp in seconds. |
data.posts[].permalink / data.posts[].url | permalink is the Reddit path of the post. url is the link the post points to, such as an image. |
data.posts[].isArchived / data.posts[].isLocked / data.posts[].nsfw | Boolean flags for archived posts, locked posts, and posts marked NSFW. |
data.nextCursor | Cursor for the next page. Pass it as after in the next request. |
after. For the next page, send the value of data.nextCursor as after.limit accepts 1 to 100 and defaults to 25.selftext is empty for link and image posts, so text only appears for text posts.Billed at the actual cost of each call, about $0.0003 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/trending-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 25
}'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.
afterstringPagination cursor from a previous response's nextCursor. Omit for the first page.
limitintegerMaximum number of trending posts to return (1-100, default 25).
Predefinito: 25
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 Trending PostsQuesta API Reddit | Da $0.0003 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/trending-posts 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.0003 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Nessun parametro richiesto. Facoltativi: after (string) e limit (integer). 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 Trending Posts 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.