API para Hacker News

API para Hacker News: Comentários do post

Liste os comentários de um post do Hacker News pelo ID: texto, autor e data e hora em JSON limpo.

US$ 1,50/mil req., pague por requisição, sem assinatura.

Hacker News
news.ycombinator.com/item?id=45389217
Hacker News

▲

gwern_reader Sep 27, 2025 | next [-]

The interesting bit here is not Rust itself, it is that they went from a 40 minute cold build to under 3 minutes by caching at the crate graph level instead of the file level. That is a build system design decision, not a language one.

reply

▲
▲
O que a API retornoucomments[0]
{
"id": "45389802",
"parentId": "45389217",
"author": "gwern_reader",
"text": "The interesting bit here is not Rust itself, it is that they went from a 40 minute cold build to under 3 minutes by caching at the crate graph level instead of the file level. That is a build system design decision, not a language one.",
"createdUtc": 1758981900,
"postId": "45389217",
"permalink": "https://news.ycombinator.com/item?id=45389802"
}
Disponibilidade
100,00%
30d · 261 chamadas
Requisições
262
30d · semanal, últimas 12 sem.
Resposta
0,6s
mediana · 30d

Preços e provedores

Preços do endpoint Comentários do post da API para Hacker News: uma API, 2 provedores intercambiáveis

O provedor mais barato atende primeiro. Se ele falhar, o próximo assume na mesma chamada.

Você paga
US$ 15,00
US$ 1,50/mil req., só pelo que você usar. Sem plano mensal.
Suas primeiras 66 requisições são grátis com o saldo inicial de US$ 0,10.

Teste

Obtenha Comentários do post do Hacker News em uma só 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.

Este exemplo mostra 10 de 11 campos. Ver todos os campos

{
  "found": true,
  "data": {
    "comments": [
      {
        "id": "45389802",
        "parentId": "45389217",
        "author": "gwern_reader",
        "text": "The interesting bit here is not Rust itself, it is that they went from a 40 minute cold build to under 3 minutes by caching at the crate graph level instead of the file level. That is a build system design decision, not a language one.",
        "createdUtc": 1758981900,
        "postId": "45389217",
        "permalink": "https://news.ycombinator.com/item?id=45389802"
      },
      {
        "id": "45389944",
        "parentId": "45389802",
        "author": "tuple_of_one",
        "text": "Bazel does crate level caching too if you use rules_rust, curious why they rolled their own instead.",
        "createdUtc": 1758983160,
        "postId": "45389217",
        "permalink": "https://news.ycombinator.com/item?id=45389944"
      },
      {
        "id": "45390110",
        "parentId": "45389217",
        "author": "kvasir_dev",
        "text": "Author here. We looked at Bazel first, the migration cost for our existing Go and TypeScript services was the blocker, not the caching model.",
        "createdUtc": 1758984720,
        "postId": "45389217",
        "permalink": "https://news.ycombinator.com/item?id=45390110"
      }
    ]
  }
}

Referência completa de parâmetros e resposta - todos os campos, tipos e exemplos deste endpoint.

Referência

Uma requisição, um formato de resposta.

Cada campo que você envia e cada campo que você recebe, cada um com um exemplo real.

Última verificação em 2026-11-14 · disponibilidade e latência medidas em 30d

Corpo da requisição

JSON, enviado via POST para este endpoint.

  • idstring

    45389217

    O ID do post no Hacker News, por exemplo "47340079".

Você envia. Um corpo JSON pequeno. Os valores mostrados são exemplos para você trocar pelos seus.

Resposta

JSON, um valor de exemplo por campo.

each commentdata.comments[]

Comments on the story. Populated whenever the provider has data for the entity.

  • authorstring

    gwern_reader

    Commenting user's username. Populated whenever the provider has data for the entity.

  • createdUtcnumber

    1758981900

    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

    45389802

    Hacker News comment id. Populated whenever the provider has data for the entity.

  • parentIdstring

    45389217

    Id of the parent item (story or comment) this reply belongs to.

  • permalinkstring

    https://news.ycombinator.com/item?id=45389802

    Permalink to the item on news.ycombinator.com.

  • postIdstring

    45389217

    Hacker News item ID of the story the comment belongs to.

  • textstring

    The interesting bit here is not Rust itself, it is that they went from a 40 minute cold build to under 3 minutes by caching at the crate graph level instead of the file level. That is a build system design decision, not a language one.

    Comment body text.

top level
  • foundboolean

    true

    True when the story id resolved and comments were returned.

  • 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.

Você recebe. Campos nomeados e tipados, no mesmo formato, seja qual for a fonte que responder.

Dúvidas frequentes

Sobre o endpoint Comentários do post da API para Hacker News

O endpoint Comentários do post da AnyAPI para Hacker News retorna dados de Hacker News em JSON normalizado com uma chamada POST para /v1/run/hackernews.story_comments. Liste os comentários de um post do Hacker News pelo ID: texto, autor e data e hora em JSON limpo. A AnyAPI distribui cada requisição entre 2 fontes, com failover automático quando uma falha. Custa a partir de US$ 1,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 Comentários do post da API para Hacker News feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 0,6 segundos, em 261 chamadas medidas.

Custa a partir de US$ 1,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.

Liste os comentários de um post do Hacker News pelo ID: texto, autor e data e hora em JSON limpo. 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 Comentários do post da API para Hacker News feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 0,6 segundos, em 261 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.

Sim. Uma conta nova da AnyAPI começa com US$ 0,10 de saldo grátis, sem cartão, o que cobre 66 chamadas de Comentários do post do Hacker News a US$ 0,0015 cada.

A AnyAPI consulta a próxima das suas 2 fontes na mesma requisição, começando pela mais barata, então a queda de uma fonte não derruba sua chamada.

Envie uma requisição POST para https://api.getanyapi.com/v1/run/hackernews.story_comments com sua chave da AnyAPI em um cabeçalho "Authorization: Bearer" e a entrada como corpo JSON. A mesma chave e a mesma carteira funcionam em todos os endpoints da AnyAPI.

Não. Você adiciona dólares a um único saldo pré-pago da AnyAPI e cada requisição desconta dele. Não há plano mensal nem mínimo, e o mesmo saldo paga todos os endpoints da AnyAPI.

Sim. Instale @getanyapi/sdk pelo npm para TypeScript ou getanyapi pelo pip para Python. Os dois chamam todos os endpoints da AnyAPI com a mesma chave, e qualquer cliente HTTP também funciona.

Sim. Um agente pode se conectar ao servidor MCP da AnyAPI em https://api.getanyapi.com/mcp, ou criar a própria chave de teste grátis com um único POST sem autenticação para https://api.getanyapi.com/agent/signup e chamar este endpoint por HTTP.