API de Hacker News

API de Hacker News: Comentarios de una historia

Lista los comentarios de una historia de Hacker News por id: texto, autor y marca de tiempo como JSON limpio.

US$1.50/1k solic., pagas por solicitud, sin suscripción.

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

▲
▲
Lo que devolvió la APIcomments[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"
}
Disponibilidad
100.00%
30d · 261 llamadas
Solicitudes
262
30d · semanal, últimas 12 sem.
Respuesta
0.6s
mediana · 30d

Precios y proveedores

Precios del endpoint Comentarios de una historia de la API de Hacker News: una API, 2 proveedores intercambiables

El proveedor más barato responde primero. Si falla, el siguiente toma el relevo en la misma llamada.

Pagas
US$15.00
US$1.50/1k solic., solo por lo que usas. Sin plan mensual.
Tus primeras 66 solicitudes son gratis con el saldo inicial de US$0.10.

Pruébalo

Obtén Comentarios de una historia de Hacker News en una sola solicitud

Abrir en
Respuesta de ejemplo
Las ejecuciones gratis devuelven solo los primeros 3 resultados. Agrega fondos a una clave para obtener la respuesta completa.

Este ejemplo muestra 10 de 11 campos. Ver todos los 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"
      }
    ]
  }
}

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.

  • idstring

    45389217

    Id de la historia de Hacker News, p. ej. "47340079".

Envías. Un cuerpo JSON pequeño. Los valores que se muestran son ejemplos para reemplazar por los tuyos.

Respuesta

JSON, un valor de ejemplo 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.

Recibes. Campos con nombre y tipo, con el mismo formato sin importar qué fuente responda.

Preguntas frecuentes

Acerca del endpoint Comentarios de una historia de la API de Hacker News

El endpoint Comentarios de una historia de AnyAPI para Hacker News devuelve datos de Hacker News como JSON normalizado con una sola llamada POST a /v1/run/hackernews.story_comments. Lista los comentarios de una historia de Hacker News por id: texto, autor y marca de tiempo como JSON limpio. AnyAPI enruta cada solicitud entre 2 fuentes y recurre automáticamente a otra cuando una falla. Cuesta desde US$1.50 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 Comentarios de una historia de la API de Hacker News a través de AnyAPI tuvo éxito, con un tiempo de respuesta mediano de 0.6 segundos en 261 llamadas medidas.

Cuesta desde US$1.50 por cada 1,000 solicitudes, en dólares estadounidenses, sin suscripción y sin mínimo mensual. Agregas fondos a una billetera en dólares y cada llamada descuenta de ella. Algunas solicitudes fallidas pagadas con la billetera generan cargos de procesamiento que trasladamos al costo, sin margen; la respuesta de error muestra el monto cobrado.

Lista los comentarios de una historia de Hacker News por id: texto, autor y marca de tiempo como JSON limpio. La respuesta es JSON normalizado con el mismo envoltorio que devuelve cada endpoint de AnyAPI, así que procesar un segundo endpoint es solo cambiar la URL.

En los últimos 30 días, el 100.0% de las llamadas al endpoint Comentarios de una historia de la API de Hacker News a través de AnyAPI tuvo éxito, con un tiempo de respuesta mediano de 0.6 segundos en 261 llamadas medidas. Estas son mediciones propias de AnyAPI sobre el tráfico que pasa por el gateway, recalculadas continuamente, no un objetivo de nivel de servicio publicado.

Sí. Una cuenta nueva de AnyAPI empieza con US$0.10 de saldo gratis, sin tarjeta, que alcanza para 66 llamadas a Comentarios de una historia de Hacker News a US$0.0015 cada una.

AnyAPI consulta la siguiente de sus 2 fuentes en la misma solicitud, empezando por la más barata, así que la caída de una fuente no hace fallar tu llamada.

Envía una solicitud POST a https://api.getanyapi.com/v1/run/hackernews.story_comments con tu clave de AnyAPI en un encabezado "Authorization: Bearer" y la entrada como cuerpo JSON. La misma clave y la misma billetera sirven para todos los endpoints de AnyAPI.

No. Agregas dólares a un solo saldo prepagado de AnyAPI y cada solicitud descuenta de él. No hay plan mensual ni mínimo, y el mismo saldo paga todos los endpoints de AnyAPI.

Sí. Instala @getanyapi/sdk desde npm para TypeScript o getanyapi desde pip para Python. Ambos llaman a todos los endpoints de AnyAPI con la misma clave, y también sirve cualquier cliente HTTP.

Sí. Un agente puede conectarse al servidor MCP de AnyAPI en https://api.getanyapi.com/mcp, o crear su propia clave de prueba gratis con un solo POST sin autenticar a https://api.getanyapi.com/agent/signup y llamar a este endpoint por HTTP.