API di Reddit

Reddit Post del subreddit API

Post dall'elenco di un subreddit (hot, new o top), con finestre temporali. Pagina con il cursore after.

0,36 USD/1k richieste, paghi a richiesta, nessun abbonamento.

r/MechanicalKeyboards
reddit.com/r/MechanicalKeyboards/
redditLog InSign Up

r/MechanicalKeyboards

Create PostJoin
HotNewTopRising
5,412

r/MechanicalKeyboards·u/soldernoob· Jun 12, 2024

My first custom build is finally done

218 CommentsShareSave
CommentsShareSave
CommentsShareSave
Cosa ha restituito l'APIposts[0]
{
"id": "t3_1def567",
"title": "My first custom build is finally done",
"author": "soldernoob",
"score": 5412,
"numComments": 218,
"url": "https://www.reddit.com/r/MechanicalKeyboards/comments/1def567/",
"permalink": "/r/MechanicalKeyboards/comments/1def567/",
"createdUtc": 1718180000,
... 7 campi in più
}
Disponibilità
99,98%
30d · 143.664 chiamate
Richieste
144.694
30 g · settimanale, ultime 12 sett.
Risposta
1,6s
mediana · 30d

Prezzi e provider

Prezzi dell'API Reddit Post del subreddit: una sola API, 4 provider intercambiabili

Serve per primo il provider più economico. Se fallisce, subentra il successivo nella stessa chiamata.

Paghi
3,60 USD
0,36 USD/1k richieste, solo per ciò che usi. Nessun piano mensile.
Le tue prime 277 richieste sono gratuite con il saldo iniziale di 0,10 USD.

Provalo

Ottieni Reddit Post del subreddit in una sola richiesta

requireFieldsarray
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `isArchived`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a post that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted.
Apri in
Risposta di esempio
Le esecuzioni gratuite restituiscono solo i primi 3 risultati. Ricarica una chiave per ottenere la risposta completa.

Questo esempio mostra 13 campi su 20. Vedi tutti i campi

{
  "found": true,
  "data": {
    "posts": [
      {
        "id": "t3_1def567",
        "title": "My first custom build is finally done",
        "author": "soldernoob",
        "score": 5412,
        "numComments": 218,
        "url": "https://www.reddit.com/r/MechanicalKeyboards/comments/1def567/",
        "permalink": "/r/MechanicalKeyboards/comments/1def567/",
        "createdUtc": 1718180000,
        "subreddit": "MechanicalKeyboards"
      }
    ],
    "nextCursor": "t3_1def567"
  }
}

Riferimento completo di parametri e risposta - ogni campo, tipo ed esempio per questo endpoint.

Riferimento

Una richiesta, una sola forma di risposta.

Ogni campo che invii e ogni campo che ricevi, ciascuno con un esempio reale.

Ultima verifica 2026-11-21 · disponibilità e latenza misurate su 30d

Corpo della richiesta

JSON, inviato a questo endpoint.

  • subredditstring

    MechanicalKeyboards

    Nome del subreddit senza r/ iniziale (es. "golang").

  • afterstring

    Alias di paginazione legacy. Preferisci `cursor`; omettili entrambi per la prima pagina.

  • cursorstring

    Cursore di paginazione opaco dal `nextCursor` di una risposta precedente; omettilo per la prima pagina.

  • limitinteger

    Page size to ask for (up to 100). Some sources honor it; others always return their whole page of about 25 posts. A page is never trimmed after the call, so pass nextCursor back as cursor to continue exactly where this response ended.

  • requireFieldsarray

    Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `isArchived`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a post that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted.

  • sortenum

    hot

    Ordine di ordinamento delle inserzioni.

  • timeframeenum

    Finestra di tempo, applicata quando sort è "top" (es. "year" per i post migliori dell'anno). Ignorata per hot/new. Omettila per usare per top il giorno corrente.

Tu invii. Un piccolo corpo JSON. I valori mostrati sono esempi da sostituire con i tuoi.

Risposta

JSON, un valore di esempio per campo.

datadata
  • nextCursorstring

    t3_1def567

    Cursor for the next page of results; pass it back as the `cursor` input to fetch the following page. Null when there are no more results.

each postdata.posts[]

Populated whenever the provider has data for the entity.

  • authorstring

    soldernoob

    Author username, without the u/ prefix. Populated whenever the provider has data for the entity.

  • authorIdstring

    Reddit account ID of the author, without the t2_ prefix.

  • createdUtcnumber

    1718180000

    UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. Populated whenever the provider has data for the entity.

  • idstring

    t3_1def567

    Reddit post ID (base-36, without the t3_ prefix). Populated whenever the provider has data for the entity.

  • isArchivedbooleanpuò richiedere

    True when Reddit has archived the thread, which blocks new comments and votes. Archiving is a per-community setting, so an old thread is not necessarily archived. Absent when the source that served this request does not report it, which means unknown rather than false.

  • isLockedbooleanpuò richiedere

    True when a moderator has locked the thread, which blocks new comments. Absent when the source that served this request does not report it, which means unknown rather than false.

  • nsfwboolean

    Whether the post is marked not-safe-for-work.

  • numCommentsinteger

    218

    Total number of comments on the post.

  • permalinkstring

    /r/MechanicalKeyboards/comments/1def567/

    Canonical reddit.com thread path for the post (e.g. "/r/golang/comments/abc123/..."). Differs from url, which is the destination link. Empty if the upstream omits it. Populated whenever the provider has data for the entity.

  • scoreinteger

    5412

    Net score (upvotes minus downvotes) at fetch time.

  • selftextstring

    Body text of a self post, as Markdown. Empty on a link post, which has no body.

  • subredditstring

    MechanicalKeyboards

    Subreddit name, without the r/ prefix. Populated whenever the provider has data for the entity.

  • titlestring

    My first custom build is finally done

    Post title. Populated whenever the provider has data for the entity.

  • upvoteRationumber

    Share of votes on the post that are upvotes, between 0 and 1.

  • urlstring

    https://www.reddit.com/r/MechanicalKeyboards/comments/1def567/

    The post's destination link: the external URL for a link post, the media URL for an image, gallery or video post, or the thread URL for a text post. A text post that also carries an image may give either its thread URL or the image URL. Populated whenever the provider has data for the entity.

top level
  • foundboolean

    true

  • reason"not_found" | "banned" | "private"

    Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. `banned`: the platform has banned the community. `private`: the community is private, so only its approved members can see it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.

Tu ricevi. Campi con nome e tipo nella stessa struttura, qualunque fonte risponda.

Vendi questa API? Consulta lo schema completo che il tuo endpoint deve restituire.

FAQ

Sull'API Reddit Post del subreddit

L'API Reddit Post del subreddit di AnyAPI restituisce dati Reddit come JSON normalizzato da una sola chiamata POST a /v1/run/reddit.subreddit_posts. Post dall'elenco di un subreddit (hot, new o top), con finestre temporali. Pagina con il cursore after. AnyAPI instrada ogni richiesta su 4 fonti e passa automaticamente a un'altra quando una fallisce. Costa da 0,36 USD ogni 1.000 richieste, in dollari statunitensi, senza abbonamento e senza minimo mensile. Negli ultimi 30 giorni, il 100,0% delle chiamate Reddit Post del subreddit tramite AnyAPI è riuscito, con un tempo di risposta mediano di 1,6 secondi su 143.664 chiamate misurate.

Costa da 0,36 USD ogni 1.000 richieste, in dollari statunitensi, senza abbonamento e senza minimo mensile. Ricarichi un portafoglio in USD e ogni chiamata lo scala. Alcune richieste fallite finanziate dal portafoglio comportano costi di elaborazione che trasferiamo al costo, senza ricarico; la risposta di errore mostra l'importo addebitato.

Post dall'elenco di un subreddit (hot, new o top), con finestre temporali. Pagina con il cursore after. La risposta è JSON normalizzato con la stessa busta che restituisce ogni endpoint AnyAPI, quindi analizzare un secondo endpoint significa cambiare l'URL e nient'altro.

Negli ultimi 30 giorni, il 100,0% delle chiamate Reddit Post del subreddit tramite AnyAPI è riuscito, con un tempo di risposta mediano di 1,6 secondi su 143.664 chiamate misurate. Sono misurazioni di AnyAPI sul traffico che passa dal gateway, ricalcolate di continuo, non un obiettivo di livello di servizio pubblicato.

Sì. Un nuovo account AnyAPI parte con 0,10 USD di saldo gratuito e senza bisogno di carta, che copre 277 chiamate Reddit Post del subreddit a 0,00036 USD ciascuna.

AnyAPI interroga la successiva delle sue 4 fonti nella stessa richiesta, partendo dalla più economica, quindi una fonte che cade non fa fallire la tua chiamata.

Invia una richiesta POST a https://api.getanyapi.com/v1/run/reddit.subreddit_posts con la tua chiave AnyAPI in un header "Authorization: Bearer" e l'input come corpo JSON. La stessa chiave e lo stesso portafoglio funzionano su ogni endpoint AnyAPI.

No. Aggiungi dollari statunitensi a un unico saldo prepagato AnyAPI e ogni richiesta lo scala. Non c'è un piano mensile né un minimo, e lo stesso saldo paga ogni endpoint AnyAPI.

Sì. Installa @getanyapi/sdk da npm per TypeScript o getanyapi da pip per Python. Entrambi chiamano ogni endpoint AnyAPI con la stessa chiave, e funziona anche qualsiasi client HTTP.

Sì. Un agente può collegarsi al server MCP di AnyAPI su https://api.getanyapi.com/mcp, oppure creare da solo la propria chiave di prova gratuita con un POST non autenticato a https://api.getanyapi.com/agent/signup e chiamare questo endpoint via HTTP.