# Dcard Topics & Trends — Public Posts & Analytics (`bakos_bence/dcard-topics-trends`) Actor

Export public Dcard topics with public counts, sampled latest and trending posts, and observed engagement aggregates. No login. Unofficial; not affiliated with Dcard.

- **URL**: https://apify.com/bakos_bence/dcard-topics-trends.md
- **Developed by:** [Bakos Bence](https://apify.com/bakos_bence) (community)
- **Categories:** Social media, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.49 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What is Dcard Topics & Trends?

Monitor public Dcard topics without an account. Each dataset row represents one topic and combines its public topic metadata with small latest and trending post samples.

The Actor reads logged-out SSR, Next.js hydration, and visible HTML. It does not collect profiles, author names, schools, departments, post bodies, or other personal fields.

[Documentation](https://bakosbence.com/web-data-collection/dcard-topics-trends/)

### What you get

| Field | Meaning |
| --- | --- |
| `topicName` | Public topic label |
| `topicUrl` | Canonical public topic URL |
| `followerCount` | Public follower count, when Dcard exposes it |
| `postCount` | Public topic post count, when exposed |
| `latestPosts` | Sampled latest posts with URL, title, date, and public engagement |
| `trendingPosts` | Sampled popular/trending posts with the same fields |
| `observedPostCount` | Unique posts actually present in the two samples |
| `observedEngagementCount` | Sum of exposed likes, comments, and shares across observed posts |
| `observedAverageEngagement` | Average over posts whose engagement was exposed |
| `observedMaxEngagement` | Highest exposed sampled-post engagement |

Poll summaries appear inside a sampled post only when Dcard exposes an actual poll object. Missing counts remain `null`; the Actor does not estimate them.

### How do I monitor public Dcard topics?

1. Click **Try for free**.
2. Keep the prefilled public `省錢` topic for a quick preview, or paste known topic URLs.
3. Choose the topic limit and sample size.
4. The quick default returns topic-level counts without a post crawl. Raise the sample size to collect trending posts, and enable latest sampling when needed.
5. Click **Start**, then open the dataset.

Sample input:

```json
{
  "topicUrls": ["https://www.dcard.tw/topics/%E7%9C%81%E9%8C%A2"],
  "maxItems": 1,
  "samplePostsPerTopic": 0,
  "includeLatest": false,
  "includeTrending": true
}
```

For known topics:

```json
{
  "topicUrls": [
    "https://www.dcard.tw/topics/AI",
    "https://www.dcard.tw/topics/%E6%97%85%E9%81%8A"
  ],
  "maxItems": 2,
  "samplePostsPerTopic": 10,
  "includeLatest": true,
  "includeTrending": true
}
```

### Illustrative output

```json
{
  "topicName": "AI",
  "topicUrl": "https://www.dcard.tw/topics/AI",
  "followerCount": 12345,
  "postCount": 987,
  "latestPosts": [
    {
      "id": 260002,
      "url": "https://www.dcard.tw/f/3c/p/260002",
      "title": "AI 工具實測",
      "forumAlias": "3c",
      "createdAt": "2026-10-02T00:00:00.000Z",
      "likeCount": 12,
      "commentCount": 4,
      "shareCount": null,
      "engagementCount": 16
    }
  ],
  "trendingPosts": [],
  "observedPostCount": 1,
  "observedEngagementPostCount": 1,
  "observedLikeCount": 12,
  "observedCommentCount": 4,
  "observedEngagementCount": 16,
  "observedAverageEngagement": 16.0,
  "observedMaxEngagement": 16
}
```

### How are the metrics calculated?

Aggregates use only unique posts returned in `latestPosts` and `trendingPosts`. A post present in both lists is counted once. Engagement is the sum of whichever public like, comment, and share counts Dcard exposed for that post. The Actor does not extrapolate from the sample to the whole topic.

### Export and API

Download finished datasets as JSON, CSV, Excel, XML, or RSS from the dataset **Export** menu.

Run through the API:

```bash
curl -X POST "https://api.apify.com/v2/acts/bakos_bence~dcard-topics-trends/runs?token=YOUR_TOKEN&waitForFinish=120" \
  -H "Content-Type: application/json" \
  -d '{"topicUrls":["https://www.dcard.tw/topics/%E7%9C%81%E9%8C%A2"],"maxItems":1,"samplePostsPerTopic":0,"includeLatest":false,"includeTrending":true}'
```

Read the resulting `defaultDatasetId`, then fetch:

```text
https://api.apify.com/v2/datasets/DATASET_ID/items?format=json&clean=true&token=YOUR_TOKEN
```

The default dataset also connects to Google Sheets, Excel, Zapier, Make, n8n, Power BI, Tableau, Qlik, webhooks, and MCP clients through Apify integrations.

### Reliability and limits

- Apify UNBLOCKER is forced because Dcard challenges datacenter traffic.
- A slow or blocked default request is hedged on one fresh proxy session, keeping both attempts inside one bounded timeout window.
- Runs fail instead of succeeding with an empty dataset.
- Resume state prevents already-saved topic rows from being charged again.
- Public page structure can change; unavailable public fields remain `null`.

This Actor uses public logged-out pages only and is not affiliated with Dcard.

# Actor input Schema

## `topicUrls` (type: `array`):

Public Dcard topic URLs such as <code>https://www.dcard.tw/topics/AI</code>. The default is the public 省錢 topic.

## `maxItems` (type: `integer`):

Maximum topic rows saved to the dataset.

## `samplePostsPerTopic` (type: `integer`):

Maximum latest posts and maximum trending posts retained per topic. The quick default is 0 and returns topic-level public counts; increase it to sample posts. Aggregates use only posts actually observed.

## `includeLatest` (type: `boolean`):

Fetch the public latest tab for each topic.

## `includeTrending` (type: `boolean`):

Return public popular/trending posts. The Actor reuses posts already exposed by the topic page when available.

## `startUrls` (type: `array`):

Legacy API alias for Specific topic URLs.

## `resultsLimit` (type: `integer`):

Legacy API alias for How many topics.

## `proxyConfiguration` (type: `object`):

Managed by the Actor; leave default. Apify Proxy group <b>UNBLOCKER</b> is required and forced in code, so user changes are ignored.

## Actor input object example

```json
{
  "topicUrls": [
    "https://www.dcard.tw/topics/%E7%9C%81%E9%8C%A2"
  ],
  "maxItems": 1,
  "samplePostsPerTopic": 0,
  "includeLatest": false,
  "includeTrending": true,
  "resultsLimit": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ]
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Default dataset items.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "topicUrls": [
        "https://www.dcard.tw/topics/%E7%9C%81%E9%8C%A2"
    ],
    "maxItems": 1,
    "samplePostsPerTopic": 0,
    "includeLatest": false,
    "includeTrending": true,
    "resultsLimit": 1,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "UNBLOCKER"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bakos_bence/dcard-topics-trends").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "topicUrls": ["https://www.dcard.tw/topics/%E7%9C%81%E9%8C%A2"],
    "maxItems": 1,
    "samplePostsPerTopic": 0,
    "includeLatest": False,
    "includeTrending": True,
    "resultsLimit": 1,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["UNBLOCKER"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bakos_bence/dcard-topics-trends").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "topicUrls": [
    "https://www.dcard.tw/topics/%E7%9C%81%E9%8C%A2"
  ],
  "maxItems": 1,
  "samplePostsPerTopic": 0,
  "includeLatest": false,
  "includeTrending": true,
  "resultsLimit": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ]
  }
}' |
apify call bakos_bence/dcard-topics-trends --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bakos_bence/dcard-topics-trends"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/B9ETlknRiFEDoM9xr/builds/66RS3ccoELWn05y3x/openapi.json
