API para Reddit: Post
Obtenha um único post do Reddit pela URL, incluindo o texto completo, pontuação, número de comentários, proporção de upvotes e subreddit, em JSON normalizado.
Rede de provedores
Provedores ordenados por tráfego
Teste
Faça sua primeira requisição
{
"data": {
"author": "Alex Rivera",
"authorId": "Alex Rivera",
"body": "A short example description of this item.",
"createdUtc": 12.5,
"domain": "example.com",
"editedUtc": 12.5,
"id": "a1b2c3d4",
"image": "https://example.com/image.jpg",
"isArchived": false,
"isLocked": true,
"isNsfw": true,
"numComments": 12500,
"permalink": "https://example.com/page",
"score": 5,
"subreddit": "example",
"title": "Example title",
"upvoteRatio": 12.5,
"url": "https://example.com/page"
},
"found": true,
"reason": "not_found"
}interface RedditPostResponse {
data: {
author: string;
authorId?: string;
body?: string;
createdUtc: number;
domain?: string;
editedUtc?: number;
id: string;
image?: string;
isArchived?: boolean;
isLocked?: boolean;
isNsfw?: boolean;
numComments: number;
permalink: string;
score: number;
subreddit: string;
title: string;
upvoteRatio?: number;
url: string;
} | null;
found: boolean;
reason?: "not_found";
}Referência completa de parâmetros e resposta - todos os campos, tipos e exemplos deste endpoint.
Referência
Requisição, resposta e preço
Última verificação em 2026-09-29 · disponibilidade e latência medidas em 30dcurl -X POST https://api.getanyapi.com/v1/run/reddit.post \
-H "Authorization: Bearer $ANYAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/"}'| Campo | Tipo | Valor de exemplo |
|---|---|---|
| Corpo da requisição | ||
| url | string | "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/"URL completa do post do Reddit no formato /r/<subreddit>/comments/<id>/<slug>/, ex.: "https://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/". O formato curto "reddit.com/comments/<id>" não é aceito. |
| Resposta | ||
| data | object | The post record, or null when nothing was found. |
| data.author | string | Author username, without the u/ prefix. Populated whenever the provider has data for the entity. |
| data.authorId | string | Reddit account ID of the author, without the t2_ prefix. |
| data.body | string | The post's own body text (selftext), as Markdown. Empty for link posts, which carry no body. Populated whenever the provider has data for the entity. |
| data.createdUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| data.domain | string | Domain the post links to, for example "self.IAmA" for a text post. |
| data.editedUtc | number | UTC epoch timestamp in seconds (Unix time) of the last edit. Multiply by 1000 for a JS Date in milliseconds. |
| data.id | string | Reddit post ID (base-36, without the t3_ prefix). Populated whenever the provider has data for the entity. |
| data.image | string | Preview image for the post, when Reddit generated one. Reddit signs this URL and it is time-limited, so fetch it promptly rather than storing it; the query string carries the signature and must be kept intact. Empty when the post has no preview image. |
| data.isArchived | boolean | 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. |
| data.isLocked | boolean | 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. |
| data.isNsfw | boolean | True when the post is marked NSFW (over 18). |
| data.numComments | integer | Total number of comments on the post. |
| data.permalink | string | 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. |
| data.score | integer | Net score (upvotes minus downvotes) at fetch time. |
| data.subreddit | string | Subreddit name, without the r/ prefix. Populated whenever the provider has data for the entity. |
| data.title | string | Post title. Populated whenever the provider has data for the entity. |
| data.upvoteRatio | number | Fraction of votes that are upvotes, between 0 and 1. Zero when the upstream does not report it. |
| data.url | string | The post's destination link (the external URL for link posts, or the thread URL for self posts). Populated whenever the provider has data for the entity. |
| found | boolean | True when the post was found; false when the lookup returned nothing. |
| reason | "not_found" | 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. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost. |
| Preço | ||
| Preço por requisição | USD | US$ 0,0005 |
| Preço /mil req. | USD | US$ 0,50 |
Dúvidas frequentes
Sobre o endpoint Post da API para Reddit
O endpoint Post da AnyAPI para Reddit retorna dados de Reddit em JSON normalizado com uma chamada POST para /v1/run/reddit.post. Obtenha um único post do Reddit pela URL, incluindo o texto completo, pontuação, número de comentários, proporção de upvotes e subreddit, em JSON normalizado. A AnyAPI distribui cada requisição entre 4 fontes, com failover automático quando uma falha. Custa a partir de US$ 0,50 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Nos últimos 30 dias, 100,0% das chamadas ao endpoint Post da API para Reddit feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 0,5 segundos, em 55.345 chamadas medidas.