# Kaggle discussion topic and comments API

Get Kaggle Discussion Details via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as id, output, and retrieve structured data including topic identifier, topic title, initial topic message, comment text, and nested comment replies to inspect discussions, and prepare source-linked summaries, ready for production pipelines and AI agent automation.

Documentation: https://openany.si/kaggle/kaggle-discussion-topic-and-comments-api/834687e6-b6b6-43e6-a3fb-3900673a357c/
API ID: 834687e6-b6b6-43e6-a3fb-3900673a357c
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/kaggle/v1/discussion
Page update time: 2026-12-03T02:43:52.818Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:43:52.465Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## Kaggle Discussion Details API

id identifies a discussion topic. sort controls comment ordering and defaults to hot; no page or cursor parameter is exposed.

## What You Can Build

- **Inspect discussions**: Keep first\_message separate from replies.
- **Prepare source-linked summaries**: Retain topic and author references.

## Returned Data

| Field | Meaning |
| --- | --- |
| `id` | Topic identifier |
| `title` | Topic title |
| `first_message` | Initial topic message |
| `comments[].text` | Comment text |
| `comments[].replies` | Nested comment replies |
| `comment_count` | Reported comment count |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Kaggle discussion topic and comments API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Topic id, or a kaggle.com discussion link."
        },
        "sort": {
          "type": "string",
          "description": "Comment order (default hot).",
          "enum": [
            "hot",
            "top",
            "new",
            "old"
          ]
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON exports are not exposed.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "Native CSV/NDJSON record selector; it has no effect on this JSON-only product."
        }
      },
      "required": [
        "id"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "author": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "tier": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "username": {
          "type": "string"
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "comment_count": {
      "type": "integer"
    },
    "comment_sort": {
      "type": "string"
    },
    "comments": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "author": {
                "type": "object",
                "properties": {
                  "avatar": {
                    "type": "string"
                  },
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "tier": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "username": {
                    "type": "null"
                  }
                }
              },
              "edited_at": {
                "type": "null"
              },
              "html": {
                "type": "string"
              },
              "id": {
                "type": "integer"
              },
              "medal": {
                "type": "null"
              },
              "pinned": {
                "type": "null"
              },
              "posted_at": {
                "type": "string"
              },
              "replies": {
                "type": "array",
                "items": {}
              },
              "text": {
                "type": "string"
              },
              "votes": {
                "type": "integer"
              }
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "credits_used": {
      "type": "integer"
    },
    "first_message": {
      "type": "null"
    },
    "forum": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "parent": {
          "type": "string"
        }
      }
    },
    "id": {
      "type": "integer"
    },
    "messages": {
      "type": "integer"
    },
    "posted_at": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "votes": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Official example · Official documentation response · Supplier-tr
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/kaggle/v1/discussion?id=315696&output=json' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "author": {
    "id": 3452640,
    "name": "Nilay Chauhan",
    "tier": "STAFF",
    "url": "https://www.kaggle.com/nilaychauhan",
    "username": "nilaychauhan"
  },
  "cached": false,
  "comment_count": 1949,
  "comment_sort": "hot",
  "comments": [
    {
      "author": {
        "avatar": "https://storage.googleapis.com/kaggle-avatars/thumbnails/32628272-kg.jpg?t=2026-10-08-13-13-52",
        "id": 32628272,
        "name": "Osama Mohammed",
        "tier": "CONTRIBUTOR",
        "url": "https://www.kaggle.com/osamamohammad1101",
        "username": null
      },
      "edited_at": null,
      "html": "<p>Thanks for this clear introduction to JAX and FLAX!</p>",
      "id": 3535224,
      "medal": null,
      "pinned": null,
      "posted_at": "2026-10-08T13:50:27.040Z",
      "replies": [],
      "text": "Thanks for this clear introduction to JAX and FLAX!",
      "votes": 1
    },
    {
      "author": {
        "avatar": "https://storage.googleapis.com/kaggle-avatars/thumbnails/default-thumb.png",
        "id": 28319268,
        "name": "MANRAJ SINGH KHEHRA",
        "tier": "CONTRIBUTOR",
        "url": "https://www.kaggle.com/manrajsinghkhehra",
        "username": null
      },
      "edited_at": null,
      "html": "<p>If you're new to JAX/FLAX, I’d recommend starting with the Digit Recognizer example first since it’s easier to understand before moving t…",
      "id": 3460964,
      "medal": null,
      "pinned": null,
      "posted_at": "2026-05-19T13:18:19.667Z",
      "replies": [],
      "text": "If you're new to JAX/FLAX, I’d recommend starting with the Digit Recognizer example first since it’s easier to understand before moving to l…",
      "votes": 4
    },
    "… 1947 more"
  ],
  "credits_used": 1,
  "first_message": null,
  "forum": {
    "id": 208,
    "name": "Getting Started",
    "parent": "Getting Started"
  },
  "id": 315696,
  "messages": 1985,
  "posted_at": "2022-03-29T11:29:57.926309Z",
  "title": "Getting Started with JAX/FLAX",
  "url": "https://www.kaggle.com/discussions/getting-started/315696",
  "votes": 1485
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### What identifier should I use?
A topic ID or Kaggle discussion URL.

### What is the default comment sorting?
hot.

### Can I paginate with a cursor?
No page or cursor parameter is exposed by this operation.

### Are reply threads separate from the first message?
Yes. Read comments and their replies while retaining the topic first_message.

### Does this post a comment?
No. It is a read-only lookup.

### Can I request CSV or NDJSON?
This OpenAny implementation serves JSON only. Omit output or use output=json.

## Available implementations
- apish: https://openany.si/kaggle/kaggle-discussion-topic-and-comments-api/834687e6-b6b6-43e6-a3fb-3900673a357c/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
