API de Reddit: Publicaciones de un subreddit
Publicaciones del listado de un subreddit (hot, new o top), con ventanas de tiempo. Pagina con el cursor after.
US$0.38/1k solic., pagas por solicitud, sin suscripción.
r/MechanicalKeyboards
r/MechanicalKeyboards·u/soldernoob· Jun 12, 2024
My first custom build is finally done
{"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 campos más}
Precios y proveedores
Precios del endpoint Publicaciones de un subreddit de la API de Reddit: una API, 3 proveedores intercambiables
El proveedor más barato responde primero. Si falla, el siguiente toma el relevo en la misma llamada.
Pruébalo
Obtén Publicaciones de un subreddit de Reddit en una sola solicitud
Este ejemplo muestra 13 de 20 campos. Ver todos los campos
{
"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"
}
}Referencia completa de parámetros y respuesta: cada campo, tipo y ejemplo de este endpoint.
Referencia
Una solicitud, un formato de respuesta.
Cada campo que envías y cada campo que recibes, cada uno con un ejemplo real.
Verificado por última vez el 2026-11-14 · disponibilidad y latencia medidas en 30d
Cuerpo de la solicitud
JSON, enviado por POST a este endpoint.
- subredditstring
MechanicalKeyboards
Nombre del subreddit sin el r/ inicial (p. ej. "golang").
- afterstring
Alias de paginación heredado. Prefiere `cursor`; omite ambos campos para la primera página.
- cursorstring
Cursor de paginación opaco del `nextCursor` de una respuesta anterior; omítelo para la primera página.
- 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
Opcional; si lo omites, el enrutamiento no cambia y atiende la fuente más barata. Indica los campos de salida que esta solicitud debe poder devolver, por ejemplo `isArchived` o `selftext`, y solo la atenderá una fuente que los devuelva todos. Los campos que no indiques se siguen devolviendo siempre que la fuente que atiende los tenga. Esto puede subir tu precio: cuando la fuente más barata no puede devolver un campo indicado, atiende una fuente más cara, y se te cotiza y cobra su precio. Un campo indicado puede faltar igualmente en una publicación que realmente no lo tenga. Indicar una combinación que ninguna fuente devuelve junta se rechaza como entrada no válida, sin cargo. Al recorrer varias páginas, solo se aplica a la primera; las páginas siguientes se quedan con la fuente elegida para esa página, al precio que se cotizó.
- sortenum
hot
Orden del listado.
- timeframeenum
Ventana de tiempo, aplicada cuando sort es "top" (p. ej. "year" para las publicaciones top del año). Se ignora para hot/new. Omítela para usar por defecto el día actual en top.
Respuesta
JSON, un valor de ejemplo por campo.
- 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.
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.
- isArchivedbooleanse puede exigir
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.
- isLockedbooleanse puede exigir
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.
- selftextstringse puede exigir
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.
- 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.
¿Vendes esta API? Consulta el esquema completo que debe devolver tu endpoint.
Preguntas frecuentes
Acerca del endpoint Publicaciones de un subreddit de la API de Reddit
El endpoint Publicaciones de un subreddit de AnyAPI para Reddit devuelve datos de Reddit como JSON normalizado con una sola llamada POST a /v1/run/reddit.subreddit_posts. Publicaciones del listado de un subreddit (hot, new o top), con ventanas de tiempo. Pagina con el cursor after. AnyAPI enruta cada solicitud entre 3 fuentes y recurre automáticamente a otra cuando una falla. Cuesta desde US$0.38 por cada 1,000 solicitudes, en dólares estadounidenses, sin suscripción y sin mínimo mensual. En los últimos 30 días, el 100.0% de las llamadas al endpoint Publicaciones de un subreddit de la API de Reddit a través de AnyAPI tuvo éxito, con un tiempo de respuesta mediano de 2.0 segundos en 100.133 llamadas medidas.