# Zhihu Pin Comments API

> Returns comments for a Zhihu pin, including author details, like counts, and reply counts. Supports sorting by score or newest timestamp.

Source: https://www.sandbase.ai/apis/zhihu/web/pin-comments
API reference: https://www.sandbase.ai/apis/zhihu/web/pin-comments/docs

## Facts

- Provider: Zhihu
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/zhihu/web/pin-comments`
- Price: $0.0015 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, zhihu
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/zhihu/web/pin-comments` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `pin_id` | string | yes |  |
| `limit` | string | no |  |
| `offset` | string | no |  |
| `order_by` | string | no | score, ts |

## FAQ

### How do I use the Zhihu Pin Comments API?

Send a POST request to https://api.sandbase.ai/v1/api/zhihu/web/pin-comments with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Zhihu Pin Comments API cost?

$0.0015 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the Zhihu Pin Comments API accept?

Required: pin_id (string). Optional: limit (string), offset (string) and order_by (one of score, ts). The Parameters table and the Playground on this page list every field.

### What does the Zhihu Pin Comments API return?

A JSON response returned in the same HTTP request (synchronous). The README on this page includes a sample response.

### Do I need a Zhihu developer account or API key?

No. Zhihu Pin Comments runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Zhihu API access separately.

## README

### Zhihu Pin Comments API

Retrieve user comments and engagement metrics for a specific Zhihu pin by passing `pin_id`.

#### Use cases

- Display discussion threads and feedback under Zhihu pins.
- Track sentiment and user engagement on specific pin posts.
- Sort community responses by popularity score or newest timestamp.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/pin-comments" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pin_id": "2050290260991534603"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `pin_id` | string | Yes | Pin ID |
| `limit` | string | No | Number of comments per page |
| `offset` | string | No | Offset, take the cursor from the response for paging |
| `order_by` | string | No | Sort, score=default, ts=newest |

#### Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

```json
{
  "data": [
    {
      "child_comment_count": 0,
      "comment_type": 0,
      "content": "看过吴恩达老师的课，挺不错的",
      "created_time": 1781864418,
      "dislike_count": 0,
      "id": "11511126051",
      "level_tag": 2,
      "like_count": 1,
      "member_id": 58471982,
      "reply_comment_id": "0",
      "author": {
        "id": "bee34cad7542c3006331794fb0e69bf6",
        "name": "AI通俗演绎",
        "type": "people",
        "url": "https://www.zhihu.com/api/v4/comment_v5/people/bee34cad7542c3006331794fb0e69bf6",
        "user_type": "people"
      }
    }
  ]
}
```

#### Notes

- Set `order_by` to 'score' for default ranking or 'ts' for newest comments.
- Use `offset` cursor values from previous responses for pagination.
- Specify `limit` to control the number of comments returned per page.

#### Related APIs

- [Zhihu AI Search Stream](/model/zhihu/web/ai-search-stream): Returns streaming AI search results from Zhihu based on a query prompt.
- [Zhihu Answer Details](/model/zhihu/web/answer-detail): Retrieves detailed information for a specific Zhihu answer using its numeric ID, including answer text, timestamps, and share links.
- [Zhihu Article Search](/model/zhihu/web/article-search-v3): Search Zhihu articles and answers by keyword and get titles, excerpts, authors, vote and comment counts, with sorting, content type and time filters plus offse…
