Discourse Forum Scraper — Topics, Posts & Search
Pricing
from $0.60 / 1,000 topics extracted
Discourse Forum Scraper — Topics, Posts & Search
Scrape any public Discourse forum: latest, top, category, tag or search topics, or specific thread URLs, with full posts (HTML and text) included in the per-topic price. No login or API key.
Pricing
from $0.60 / 1,000 topics extracted
Rating
5.0
(1)
Developer
Automation Lab
Maintained by CommunityActor stats
0
Bookmarked
69
Total users
10
Monthly active users
14 days ago
Last modified
Categories
Features
Share
Discourse Forum Scraper
Extract topics, posts, and community discussions from any public Discourse forum — including community.openai.com, discuss.huggingface.co, meta.discourse.org, and 5,000+ other Discourse communities worldwide. No API key required.
🔍 What does it do?
Discourse Forum Scraper connects to Discourse's public JSON API (no authentication required for public forums) and extracts:
- Latest topics — the most recently active discussions, paginated across the entire forum
- Top topics — the most popular topics of the day, week, month, quarter, year or all time
- Category topics — all topics within a category or sub-category (paste the category URL)
- Tag topics — all topics with a tag (paste the tag URL)
- Search results — topics matching a keyword, with the forum's own search syntax (
status:solved,after:2026-01-01, …) - Topic URLs — specific threads you list, from one forum or many
For each topic, you get structured metadata: title, URL, author, view count, like count, post count, category, tags, excerpt, solved status, creation date, and more. Enable Include Post Content to get each thread's posts in conversation order — HTML and plain text, author, likes and accepted answer — at no extra cost per topic.
The actor uses only Discourse's public JSON API endpoints (/latest.json, /top.json, /c/{category}.json, /tag/{tag}.json, /search.json, /t/{id}.json) — no browser, no proxies, minimal cost per result.
👥 Who is it for?
AI/ML researchers who want to monitor community.openai.com or discuss.huggingface.co for emerging topics, model comparisons, and developer pain points — without manually browsing the forum every day.
Product managers tracking competitor mentions, feature requests, and user feedback across developer communities. Discourse forums are where power users discuss product issues openly.
Content marketers and SEO teams identifying high-traffic discussion topics in their niche, repurposing forum Q&As into blog posts, or monitoring what questions get thousands of views.
Data scientists and NLP researchers building training datasets from community discussions, sentiment analysis corpora, or topic clustering studies on domain-specific text.
Community managers bulk-exporting discussions for archiving, migration, compliance audits, or import into internal knowledge bases.
Competitive intelligence analysts monitoring developer forums for product feedback, bug reports, and integration questions targeting specific categories.
💡 Why use it?
Discourse has over 5,000 active public forums across tech, gaming, academia, open-source, and more — but there's no centralized API that lets you query across all of them. This actor gives you a uniform interface to any Discourse forum, producing clean structured JSON you can pipe directly into spreadsheets, databases, or downstream APIs.
Compared to manually browsing Discourse or writing one-off scripts:
- ✅ Works on any Discourse forum — paste any link from it (topic, category or tag page)
- ✅ Handles pagination automatically — get 5,000+ topics with one run
- ✅ Clean JSON output compatible with Google Sheets, Airtable, BigQuery, and more
- ✅ Optional post content extraction in deterministic conversation order, including long threads
- ✅ Category name resolution — readable
categoryNamefield, not just an ID - ✅ No API keys, no authentication setup; rate-limited requests are retried
- ✅ Posts are included in the per-topic price — no separate per-post charge
- ✅ Clear failures: a wrong URL, category, tag or topic stops the run with a plain message and costs nothing
📊 What data does it extract?
| Field | Description | Example |
|---|---|---|
topicId | Unique topic ID | 137192 |
title | Topic title | "Best practices for GPT-4 system prompts" |
slug | URL-friendly slug | "best-practices-for-gpt-4-system-prompts" |
url | Direct link to the topic | "https://community.openai.com/t/..." |
forumUrl | Forum the topic belongs to | "https://community.openai.com" |
categoryId | Category numeric ID | 7 |
categoryName | Resolved category name | "API" |
postsCount | Number of posts | 24 |
replyCount | Direct reply count | 18 |
views | Total view count | 12503 |
likeCount | Total likes received | 89 |
createdAt | ISO timestamp created | "2023-04-03T10:23:49.213Z" |
lastPostedAt | ISO timestamp last reply | "2024-01-15T08:44:11.000Z" |
tags | List of topic tags | ["gpt-4", "system-prompt"] |
excerpt | Short text excerpt (see note below) | "Has anyone found a good pattern for..." |
authorUsername | Original poster username | "johndev42" |
pinned | Is topic pinned | false |
closed | Is topic closed | false |
archived | Is topic archived | false |
hasAcceptedAnswer | Has a solution marked | true |
posts | Post array (optional) | See below |
When includePostContent: true, each topic includes a posts array:
| Field | Description |
|---|---|
postId | Unique post ID |
postNumber | Position in thread |
username | Poster's username |
displayName | Poster's display name |
createdAt | Post creation timestamp |
content | Full HTML post content |
contentText | The same post as plain text |
likeCount | Number of likes on this post |
replyCount | Direct replies to this post |
reads | How many users read this post |
isAcceptedAnswer | Is this the accepted answer? |
Values the forum does not report are null, never a made-up 0 or "". Discourse lists carry an excerpt only for pinned topics, so excerpt comes from the forum when it has one, from the matching text in search mode, or from the opening of the first post when posts are loaded (Include Post Content or Topic URLs).
💰 How much does it cost to scrape Discourse forum topics?
This actor uses pay-per-event (PPE) pricing — you pay only for the data you extract, not for idle time.
| Plan | Price per topic |
|---|---|
| FREE | $0.00115 |
| BRONZE | $0.001 |
| SILVER | $0.00078 |
| GOLD | $0.0006 |
| PLATINUM | $0.0004 |
| DIAMOND | $0.00028 |
Plus a flat $0.005 start fee per run. A run that fails on bad input (wrong URL, category, tag or topic) costs nothing.
From December 6, 2026 the price per topic will be: FREE and BRONZE $0.001, SILVER $0.0009, GOLD, PLATINUM and DIAMOND $0.0008. The start fee stays $0.005.
Cost examples:
- 100 topics: ~$0.11 (FREE tier) / $0.105 (BRONZE)
- 500 topics: ~$0.585 (FREE) / $0.505 (BRONZE)
- 2,000 topics: ~$2.31 (FREE) / $2.005 (BRONZE)
- 5,000 topics with posts: ~$5.78 (FREE) / $5.005 (BRONZE)
Topics-only runs are cheap. Enabling includePostContent adds at least one API request per topic (loaded four at a time). Long threads can require bounded follow-up requests to retrieve the requested first posts, but the price per topic stays the same — posts are not charged separately.
Free plan estimate: Apify Free plan ($0) includes $5/month in usage, which covers ~4,000 topics per month at BRONZE rates.
🚀 How to use it
Step 1: Choose your target forum
Find the base URL of any public Discourse forum. Examples:
https://community.openai.com— OpenAI Developer Communityhttps://discuss.huggingface.co— HuggingFace forumshttps://meta.discourse.org— Discourse Metahttps://forum.cursor.com— Cursor AI communityhttps://community.cloudflare.com— Cloudflare developers
Step 2: Select a scrape mode
- Latest topics — the freshest discussions, sorted by most recent activity
- Top topics — the most popular topics for a period (
topPeriod) - Category topics — topics from one category (
categorySlug: a slug likeapior the category URL) - Tag topics — topics with one tag (
tag: a name likegpt-4or the tag URL) - Search topics — topics matching a keyword (
searchQuery) - Topic URLs — the threads you list in
topicUrls(no forum URL needed)
Step 3: Set limits
Start small with maxTopics: 20 to preview the data. Scale up to 5,000 for bulk exports.
Step 4: Enable post content (optional)
Set includePostContent: true and maxPostsPerTopic: 10 to fetch the first 10 available post bodies in deterministic conversation order. Values up to 100 also work for long public threads. Best for NLP datasets, content archiving, and answer extraction.
Step 5: Run and export
Click Start and wait for results. Export to JSON, CSV, or Excel. Connect to Google Sheets or Airtable directly from the Apify platform.
⚙️ Input parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
forumUrl | string | https://community.openai.com | The forum's address; any link on the forum works |
scrapeMode | enum | latestTopics | latestTopics, topTopics, categoryTopics, tagTopics, searchTopics or topicUrls |
categorySlug | string | — | Category slug or URL for categoryTopics (e.g., api, parent/child) |
tag | string | — | Tag name or URL for tagTopics (e.g., gpt-4) |
searchQuery | string | — | Search keywords for searchTopics |
topPeriod | enum | monthly | daily, weekly, monthly, quarterly, yearly or all for topTopics |
topicUrls | array | — | Topic links for topicUrls mode |
maxTopics | integer | 50 | Maximum number of topics to extract |
includePostContent | boolean | false | Fetch full post content for each topic |
maxPostsPerTopic | integer | 10 | First N available posts in conversation order (when includePostContent is true) |
maxRequestRetries | integer | 3 | Retry attempts for failed HTTP requests |
📤 Output example
{"topicId": 137192,"title": "Cant find and use gpt-4 model (I have the gpt-4 Invitation)","slug": "cant-find-and-use-gpt-4-model-i-have-the-gpt-4-invitation","url": "https://community.openai.com/t/cant-find-and-use-gpt-4-model/137192","categoryId": 7,"categoryName": "API","postsCount": 15,"replyCount": 12,"views": 8432,"likeCount": 23,"createdAt": "2023-04-03T10:23:49.213Z","lastPostedAt": "2023-05-12T14:31:00.000Z","tags": ["gpt-4", "access"],"excerpt": "Hi everyone, I recently received an invitation for GPT-4 access...","authorUsername": "johndev42","pinned": false,"closed": false,"archived": false,"hasAcceptedAnswer": true,"forumUrl": "https://community.openai.com"}
💡 Tips and tricks
Finding the category slug: Navigate to a category page and check the URL. For https://community.openai.com/c/api/7, the slug is api. For subcategories like /c/api/plugins/23, use api/plugins.
Filtering noisy topics: Use searchTopics mode with specific technical keywords to get only relevant discussions. For example, "function calling" returns topics specifically about that feature.
Scraping multiple forums: Run the actor multiple times with different forumUrl values. Use the Apify API to start runs programmatically and merge results.
Pagination behavior: The actor automatically paginates. Set maxTopics: 5000 to get the maximum — Discourse's /latest.json returns ~30 topics per page, so 5,000 topics requires ~167 API calls.
Rate limiting: Discourse allows roughly 200 anonymous requests a minute per IP. Rate-limited (HTTP 429) requests are retried after the wait the forum asks for; raise maxRequestRetries for very large runs with posts.
searchTopics mode — limited fields: Discourse's /search.json endpoint returns slim topic objects without views or likeCount; these are null for search results. excerpt holds the matching text and authorUsername the original poster when the first post matched. For full counts, pass the found topic links to Topic URLs mode.
Private forums: This actor only works with public Discourse forums. A forum that requires a login stops the run with a clear message and no charge.
🔗 Integrations
Workflow: Daily topic monitoring via Google Sheets
Schedule this actor daily, point output to a Google Sheets integration (Apify has a built-in Sheets connector), and track emerging topics over time. Set scrapeMode: latestTopics and maxTopics: 50 for a lightweight daily snapshot.
Workflow: Competitive intelligence pipeline
Run searchTopics mode against competitor brand names across multiple forums. Feed output into an LLM summarizer to extract sentiment and pain points. Export a weekly digest.
Workflow: NLP training dataset creation
Enable includePostContent: true and maxPostsPerTopic: 20 for a specific forum category. Output gives you structured conversation threads with HTML content, which you can clean for fine-tuning or RAG ingestion.
Workflow: Community migration
Export all topics and posts from an old Discourse installation before migration. The structured JSON output makes it easy to transform and re-import into a new forum or knowledge base platform.
Workflow: SEO content research
Run searchTopics mode on niche Discourse forums with target keywords. Topics with high views and likeCount but few answers are prime candidates for content marketing — write the definitive answer and link back.
🔌 API usage
Node.js (Apify client)
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });const run = await client.actor('automation-lab/discourse-scraper').call({forumUrl: 'https://community.openai.com',scrapeMode: 'searchTopics',searchQuery: 'function calling',maxTopics: 100,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(`Scraped ${items.length} topics`);
Python
from apify_client import ApifyClientclient = ApifyClient(token='YOUR_APIFY_TOKEN')run = client.actor('automation-lab/discourse-scraper').call(run_input={'forumUrl': 'https://discuss.huggingface.co','scrapeMode': 'categoryTopics','categorySlug': 'research','maxTopics': 200,'includePostContent': True,'maxPostsPerTopic': 5,})items = list(client.dataset(run['defaultDatasetId']).iterate_items())print(f'Scraped {len(items)} topics with full post content')
cURL
curl -X POST "https://api.apify.com/v2/acts/automation-lab~discourse-scraper/runs?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"forumUrl": "https://community.openai.com","scrapeMode": "latestTopics","maxTopics": 50}'
🤖 MCP (AI assistant integration)
Use this scraper directly inside Claude Code, Claude Desktop, Cursor, or any MCP-compatible AI assistant.
Claude Code (terminal)
$claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/discourse-scraper"
Claude Desktop / Cursor / VS Code
Add to your MCP config file:
{"mcpServers": {"apify": {"type": "http","url": "https://mcp.apify.com?tools=automation-lab/discourse-scraper","headers": {"Authorization": "Bearer YOUR_APIFY_TOKEN"}}}}
Example prompts for AI assistants
Once connected, try these prompts in your AI assistant:
- "Scrape the latest 50 topics from community.openai.com and show me the ones with over 1,000 views."
- "Search discuss.huggingface.co for topics about 'fine-tuning Llama' and give me a summary of the top discussions."
- "Get the most recent topics from the 'api' category on community.openai.com and find any that mention authentication errors."
- "Export all topics from a Discourse forum to a CSV for analysis."
⚖️ Legality — Is it Legal to Scrape Discourse Forums?
This actor only accesses public Discourse forums — the same content visible to any anonymous visitor. It uses Discourse's documented public JSON API, which is explicitly designed for programmatic access. No login, no authentication bypass, and no private data is accessed.
The data extracted is publicly visible on the web. Always review the specific forum's Terms of Service before scraping at large scale. For commercial data re-use or republication, consult the forum's terms.
This actor does not scrape private messages, user email addresses, IP addresses, or any non-public data.
❓ FAQ
Q: Which Discourse forums does this work with? A: Any public Discourse forum — the software powers thousands of communities including Rust, Ruby, Docker, Wikipedia, and major AI/ML communities. If you can browse topics without logging in, this actor can scrape it.
Q: Does it require an API key? A: No. Public Discourse forums expose a JSON API to anonymous visitors. Just provide the forum URL and run.
Q: Why is categoryName empty?
A: The forum hides that category from anonymous visitors, so its name can't be resolved; categoryId is still filled.
Q: Can I scrape a forum that requires login to view topics? A: No — this actor doesn't support authentication. It only works with publicly accessible Discourse forums.
Q: The run finished but I got fewer topics than expected. Why?
A: The forum may have fewer public topics than your maxTopics limit, or the category you specified has fewer topics. For searchTopics mode, the search results are naturally limited by relevance — try a broader search query.
Q: Can I scrape specific threads? A: Yes. Choose Topic URLs mode and paste the links; turn on Include Post Content for the posts. Links from different forums can be mixed.
Q: Can I get topics from subcategories?
A: Yes. For nested categories, use the full path in categorySlug. For example, if the URL is /c/parent/child/12, use parent/child as the slug.
🔗 Related scrapers
Explore other automation-lab scrapers for AI/developer community data:
- AI Jobs Scraper — AI/ML job listings from aijobs.net
- AIcrowd Scraper — AI competition listings from AIcrowd
- DevPost Scraper — hackathon and project listings
- AI Tools Directory Scraper — AI tool listings
🩺 Diagnostics and privacy
When a run fails, the Actor sends sanitized diagnostic input, the exception and the Actor, build and run IDs to our private GlitchTip service so we can repair it. Secret fields and URL query strings are removed, and reports are kept for 30 days. Forum content you scrape stays in your own Apify dataset.
Server API
This Actor is also a Server Actor: copy the server URL from the Server tab and send authenticated HTTP requests (header Authorization: Bearer YOUR_APIFY_TOKEN). Answers come back in seconds, without starting a run. Normal runs keep the full input, up to 5,000 topics and the dataset.
Every answer is { "ok": true, "count": n, "results": [ …topic rows… ] } with the same fields as the dataset, or { "ok": false, "error": { "code", "message", "retryable" } }. Each returned topic is charged one Topic extracted event at your plan's price; there is no start fee, and errors and empty answers are free.
GET /topics — list topics
| Parameter | Required | Description |
|---|---|---|
forumUrl | yes | Forum address; any link on the forum works |
mode | no | latest (default), top, category, tag or search |
category | with mode=category | Category slug or URL |
tag | with mode=tag | Tag name or URL |
q | with mode=search | Search query |
period | no | For top: daily, weekly, monthly (default), quarterly, yearly, all |
limit | no | 1–50 topics (default 30); 1–20 with includePosts=true (default 20) |
includePosts | no | true adds each topic's posts |
maxPostsPerTopic | no | 1–20 posts per topic (default 10) |
curl -H "Authorization: Bearer YOUR_APIFY_TOKEN" \"SERVER_URL/topics?forumUrl=https://community.openai.com&mode=top&period=weekly&limit=10"
GET /topic — one thread with posts
| Parameter | Required | Description |
|---|---|---|
url | yes | Topic link, e.g. https://meta.discourse.org/t/discourse-rest-api-documentation/22706 |
maxPosts | no | 1–100 posts in conversation order (default 20) |
curl -H "Authorization: Bearer YOUR_APIFY_TOKEN" \"SERVER_URL/topic?url=https://meta.discourse.org/t/discourse-rest-api-documentation/22706&maxPosts=5"
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | INVALID_INPUT | A missing or malformed parameter |
| 404 | NOT_FOUND, NO_TOPICS | The forum, category, tag or topic does not exist or is private, or nothing matched |
| 405 / 413 | METHOD_NOT_ALLOWED, REQUEST_TOO_LARGE, RESPONSE_TOO_LARGE | Wrong method, or a request/answer too large (use a lower limit or a normal run) |
| 502 | RATE_LIMITED, UPSTREAM_ERROR | The forum rate-limited or failed the request; retry |
| 503 | OVERLOADED, SHUTTING_DOWN | Too many requests at once, or the server is stopping; retry |
| 504 | TIMEOUT | The forum did not answer in time; retry |
Limits: 45 seconds per request, 6 requests at once per server process.