API para Reddit

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.

POST/v1/run/reddit.post
Disponibilidade
99,95%
30d · 55.345 chamadas
Requisições
55.345
30d · semanal, últimas 12 sem.
Resposta
0,5s
mediana · 30d

Teste

Faça sua primeira requisição

Abrir em
Obter chave grátis
Resposta de exemplo
Execuções grátis retornam só os primeiros 3 resultados. Recarregue uma chave para receber a resposta completa.
{
  "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 da resposta
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 30d
POST /v1/run/reddit.post
curl -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/"}'
CampoTipoValor de exemplo
Corpo da requisição
urlstring"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
dataobjectThe post record, or null when nothing was found.
data.authorstringAuthor username, without the u/ prefix. Populated whenever the provider has data for the entity.
data.authorIdstringReddit account ID of the author, without the t2_ prefix.
data.bodystringThe 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.createdUtcnumberUTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds.
data.domainstringDomain the post links to, for example "self.IAmA" for a text post.
data.editedUtcnumberUTC epoch timestamp in seconds (Unix time) of the last edit. Multiply by 1000 for a JS Date in milliseconds.
data.idstringReddit post ID (base-36, without the t3_ prefix). Populated whenever the provider has data for the entity.
data.imagestringPreview 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.isArchivedbooleanTrue 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.isLockedbooleanTrue 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.isNsfwbooleanTrue when the post is marked NSFW (over 18).
data.numCommentsintegerTotal number of comments on the post.
data.permalinkstringCanonical 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.scoreintegerNet score (upvotes minus downvotes) at fetch time.
data.subredditstringSubreddit name, without the r/ prefix. Populated whenever the provider has data for the entity.
data.titlestringPost title. Populated whenever the provider has data for the entity.
data.upvoteRationumberFraction of votes that are upvotes, between 0 and 1. Zero when the upstream does not report it.
data.urlstringThe 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.
foundbooleanTrue 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çãoUSDUS$ 0,0005
Preço /mil req.USDUS$ 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.

Custa a partir de US$ 0,50 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Você recarrega uma carteira em dólares e cada chamada desconta dela. Algumas requisições pagas pela carteira que falham geram cobranças de processamento, que repassamos pelo custo, sem margem; a resposta de erro mostra o valor cobrado.

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 resposta é JSON normalizado, com o mesmo envelope que todo endpoint da AnyAPI retorna, então processar um segundo endpoint é só trocar a URL, e nada mais.

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. Estas são medições da própria AnyAPI sobre o tráfego que passa pelo gateway, recalculadas continuamente, e não uma meta de nível de serviço publicada.