# Discourse Forum Scraper | Topics, Replies, Views & Tags (`muzafferkadir/discourse-forum-scraper`) Actor

Scrape topics from any Discourse forum: title, replies, views, likes, tags, and dates. Latest, top, or search. Public .json endpoints, no API key.

- **URL**: https://apify.com/muzafferkadir/discourse-forum-scraper.md
- **Developed by:** [Muzaffer Kadir YILMAZ](https://apify.com/muzafferkadir) (community)
- **Categories:** Social media, Developer tools, Open source
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 topics

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Discourse Forum Scraper

Scrape topics from **any Discourse-powered forum** — **latest, top, or search** — with **title, replies, views, likes, tags, and dates**. Discourse powers communities like OpenAI, GitLab, Docker, Figma, and thousands of dev and product forums. Built on the public **`.json` endpoints**: no API key or setup needed.

Point it at one or many forums, pick a mode, and get a clean, structured feed you can export to CSV, Excel, or JSON — great for community monitoring and trend research.

### Features

- **Works on any Discourse site** — just paste the forum's base URL. The Actor appends `.json` to its public endpoints.
- **Three modes** — the live **Latest** feed, **Top** topics by period, or full-text **Search**.
- **Rich topic data** — posts, replies, views, likes, tags, category, pinned/closed flags, and dates.
- **Community monitoring** — schedule it on a forum or a search term and track discussions over time.

### Use cases

- **Community & product monitoring** — track what your users discuss on your Discourse forum.
- **Competitive research** — watch topics and engagement across other product communities.
- **Support triage** — pull the newest topics and spot rising questions.
- **Datasets** — build forum text datasets for analysis or LLM pipelines.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `forumUrls` | array | Base URLs of Discourse forums, e.g. `https://meta.discourse.org`. |
| `mode` | enum | `latest`, `top`, or `search`. |
| `searchQuery` | string | Keyword to search for. Used when `mode` is `search`. |
| `period` | enum | `daily`, `weekly`, `monthly`, `yearly`, `all`. Used when `mode` is `top`. |
| `maxItems` | integer | Max topics per forum. Default 100. |

#### Example

```json
{
  "forumUrls": [{ "url": "https://meta.discourse.org" }],
  "mode": "latest",
  "maxItems": 100
}
```

### Output

```json
{
  "site": "meta.discourse.org",
  "topicId": 12345,
  "title": "How to configure a category default view",
  "slug": "how-to-configure-a-category-default-view",
  "categoryId": 56,
  "tags": ["howto", "categories"],
  "postsCount": 8,
  "replyCount": 7,
  "views": 420,
  "likeCount": 15,
  "pinned": false,
  "closed": false,
  "createdAt": "2026-02-01T10:00:00.000Z",
  "lastPostedAt": "2026-02-03T18:22:00.000Z",
  "url": "https://meta.discourse.org/t/how-to-configure-a-category-default-view/12345",
  "scrapedAt": "2026-08-11T19:00:00.000Z"
}
```

Download the dataset as **JSON, CSV, Excel, or XML**, or pull it via the Apify API.

### Pricing

Pay-per-event: **$0.01 per run start** (per GB of run memory) plus **$0.50 per 1,000 topics**. You only pay for topics actually returned. See the **Pricing** tab for current rates.

### FAQ

**Do I need an API key?**
No. This Actor reads the public Discourse `.json` endpoints — no key, no auth.

**How do I know if a site uses Discourse?**
If `{site}/latest.json` returns JSON, it's Discourse. Non-Discourse sites are skipped with a warning (the run still succeeds).

**Can I scrape multiple forums at once?**
Yes — add several base URLs to `forumUrls`.

**How does Top work?**
Set `mode` to `top` and pick a `period` (daily, weekly, monthly, yearly, or all).

### Disclaimer

This is an **unofficial** Actor. It is not affiliated with or endorsed by Discourse or any forum it scrapes. It uses public `.json` endpoints and returns publicly available content. You are responsible for how you use the data.

# Actor input Schema

## `forumUrls` (type: `array`):

Base URLs of Discourse-powered forums, e.g. https://meta.discourse.org or https://forum.gitlab.com. Any Discourse site works.

## `mode` (type: `string`):

What to scrape: Latest topics, Top topics for a period, or Search results for a query.

## `searchQuery` (type: `string`):

Keyword to search for. Used only when Mode is Search.

## `period` (type: `string`):

Used when Mode is Top. Time window for the top topics ranking.

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

Max topics per forum. Stops paginating once this many topics have been collected for a forum.

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

Optional. Leave empty for most runs.

## Actor input object example

```json
{
  "forumUrls": [
    {
      "url": "https://meta.discourse.org"
    }
  ],
  "mode": "latest",
  "period": "weekly",
  "maxItems": 100
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "forumUrls": [
        {
            "url": "https://meta.discourse.org"
        }
    ],
    "mode": "latest",
    "period": "weekly",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("muzafferkadir/discourse-forum-scraper").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 = {
    "forumUrls": [{ "url": "https://meta.discourse.org" }],
    "mode": "latest",
    "period": "weekly",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("muzafferkadir/discourse-forum-scraper").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 '{
  "forumUrls": [
    {
      "url": "https://meta.discourse.org"
    }
  ],
  "mode": "latest",
  "period": "weekly",
  "maxItems": 100
}' |
apify call muzafferkadir/discourse-forum-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muzafferkadir/discourse-forum-scraper"
        }
    }
}
```

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/EWjDXOweUFEuYc0NL/builds/1cgNqstRVbU60yUPX/openapi.json
