# Discourse Forum Topics Scraper (`dabooti/discourse-forum-scraper`) Actor

Export topics from any public Discourse forum: title, excerpt or first post, category, tags, views, likes, replies, dates and URL. Latest, new, top, category and tag listings. No login or API key.

- **URL**: https://apify.com/dabooti/discourse-forum-scraper.md
- **Developed by:** [Danial Maqbool](https://apify.com/dabooti) (community)
- **Categories:** Social media, Marketing, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 topics

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Topics Scraper

Export topics from any public Discourse forum, such as meta.discourse.org, community.openai.com, product communities, open-source project forums and support boards. Get the title, excerpt (or the full first post), category, tags, views, likes, replies, dates and topic URL as JSON, CSV or Excel.

It reads the public JSON that every Discourse forum serves next to its pages. No login, API key or proxy needed.

### What you can use it for

- **Customer and product research**: see what users ask, report and request in a product's community.
- **Support monitoring**: track new topics in a support category or with a tag, with reply and solved status.
- **Competitor tracking**: follow the most active topics on a competitor's community each week or month.
- **Datasets**: build a corpus of questions and first posts for analysis, FAQs or AI retrieval.

### What data you get

| Field | Description |
|---|---|
| `forum`, `id`, `url`, `title` | Forum, topic ID, link and title |
| `categoryId`, `categoryName`, `tags` | Category and tags |
| `excerpt` | Short excerpt from the topic list (when the forum provides one) |
| `firstPostText` | Full text of the first post (with **Fetch first post text**) |
| `createdAt`, `lastPostedAt`, `bumpedAt` | Dates (ISO 8601) |
| `postsCount`, `replyCount`, `views`, `likeCount` | Activity counts |
| `pinned`, `closed`, `archived`, `hasAcceptedAnswer` | Topic status, including solved |
| `imageUrl` | Topic image, if any |
| `originalPoster`, `lastPoster` | Public usernames |
| `locale` | Topic language, when the forum tracks it |
| `source`, `sourceValue`, `scrapedAt` | Which listing, category or tag the topic came from |

### How to use it

1. Add one or more **Discourse forum URLs** (the forum's home page).
2. Choose the **Listing**: Latest (by last activity) or Top (with a **Top period** from a day to all time).
3. Optionally limit to **Categories** and/or add **Tags**, set **Created on or after**, and turn on **Fetch first post text**.
4. Click **Start** and export from the **Output** tab.

#### Example input

```json
{
  "forumUrls": ["https://meta.discourse.org", "https://community.openai.com"],
  "listing": "top",
  "topPeriod": "monthly",
  "categories": ["support"],
  "fetchFirstPost": true,
  "maxTopicsPerSource": 100
}
```

#### Example output

One record from a real run:

```json
{
  "forum": "https://meta.discourse.org",
  "source": "latest",
  "sourceValue": "latest",
  "id": 1,
  "title": "New to Discourse? Start here!",
  "url": "https://meta.discourse.org/t/new-to-discourse-start-here/1",
  "categoryId": 67,
  "categoryName": "Announcements",
  "tags": [],
  "excerpt": ":waving_hand: We’re so glad you’re here! This is our official community, where you can connect, ask questions, and share ideas about Discourse, a powerful platform for support, teamwork, and everything community. \nYou’ll",
  "firstPostText": null,
  "createdAt": "2013-02-01T04:52:28.073Z",
  "lastPostedAt": "2013-02-01T04:52:28.397Z",
  "bumpedAt": "2025-09-23T19:13:50.543Z",
  "postsCount": 1,
  "replyCount": 5,
  "views": 121477,
  "likeCount": 449,
  "pinned": true,
  "closed": true,
  "archived": false,
  "hasAcceptedAnswer": false,
  "imageUrl": null,
  "originalPoster": "Discourse",
  "lastPoster": "Discourse",
  "locale": "en",
  "scrapedAt": "2026-11-20T15:23:39.378Z"
}
```

### Pricing

Pay per result: **$1.00 per 1,000 topics** ($0.001 per topic), with or without the first post text. You only pay for topics saved to the dataset. Set "Max cost per run" to cap spending.

### Tips and limits

- Up to 2,000 topics per listing, category or tag, 30 to 50 per page, with short pauses between requests.
- Categories and the Latest or Top choice apply to every forum in the list. A category that does not exist on a forum is skipped and noted in the run summary.
- Tags always use the Latest order. Each forum's robots.txt disallows the per-tag Top pages, so the Actor does not read them.
- Search is not supported: Discourse forums disallow automated access to `/search` in robots.txt.
- **Fetch first post text** costs one extra request per topic, so large runs take longer. The excerpt is free and usually holds the first lines.
- Forums that require login, or private categories, cannot be read. The run summary shows "Not a public Discourse forum" for those.
- The Actor does not export user profiles, emails or private messages, only the public usernames on each topic.

### FAQ

**How do I know a site runs Discourse?** Add `/latest.json` to the forum's address in your browser. If you see JSON with `topic_list`, it works here.

**Can I get every reply in a topic?** Not in this version. It exports topics, with the first post text as an option.

**Where is the run summary?** In the key-value store as `RUN_SUMMARY`, with per-forum and per-source counts and errors.

### Legal note

The Actor reads only what each forum publishes openly and follows the forum's robots.txt rules for the paths it uses. Posts belong to their authors and each forum has its own terms. Use the data in line with them and with privacy laws such as the GDPR, especially if you store usernames.

# Actor input Schema

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

Home page of each public Discourse forum, for example https://meta.discourse.org or https://community.openai.com. Sub-folder installs such as https://example.com/forum work too.

## `listing` (type: `string`):

Which topic list to read: Latest (by last activity) or Top (most active in a period).

## `topPeriod` (type: `string`):

Period for the Top listing.

## `categories` (type: `array`):

Optional. Only these categories, by slug, name, ID or category URL (for example support or https://meta.discourse.org/c/support/6). Applied to every forum in the list.

## `tags` (type: `array`):

Optional. Also export the topics with these tags.

## `fetchFirstPost` (type: `boolean`):

Open each topic and add the full text of its first post (one extra request per topic, slower). The listing excerpt is always included.

## `dateFrom` (type: `string`):

Optional date, YYYY-MM-DD. Topics created earlier are skipped.

## `maxTopicsPerSource` (type: `integer`):

Up to 2,000 per source.

## Actor input object example

```json
{
  "forumUrls": [
    "https://meta.discourse.org"
  ],
  "listing": "latest",
  "topPeriod": "weekly",
  "categories": [],
  "tags": [],
  "fetchFirstPost": false,
  "maxTopicsPerSource": 50
}
```

# Actor output Schema

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

No description

## `resultsFull` (type: `string`):

No description

## `summary` (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": [
        "https://meta.discourse.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dabooti/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": ["https://meta.discourse.org"] }

# Run the Actor and wait for it to finish
run = client.actor("dabooti/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": [
    "https://meta.discourse.org"
  ]
}' |
apify call dabooti/discourse-forum-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dabooti/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/0mOt7XITPTc2kLJEW/builds/6GtnCNeZtgWOWn9Wk/openapi.json
