Discourse Forum Scraper — Topics, Posts & Search avatar

Discourse Forum Scraper — Topics, Posts & Search

Pricing

from $0.60 / 1,000 topics extracted

Go to Apify Store
Discourse Forum Scraper — Topics, Posts & Search

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

Automation Lab

Maintained by Community

Actor stats

0

Bookmarked

69

Total users

10

Monthly active users

14 days ago

Last modified

Categories

Features

Limited permissionsMulti-tenantServer interface

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 categoryName field, 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?

FieldDescriptionExample
topicIdUnique topic ID137192
titleTopic title"Best practices for GPT-4 system prompts"
slugURL-friendly slug"best-practices-for-gpt-4-system-prompts"
urlDirect link to the topic"https://community.openai.com/t/..."
forumUrlForum the topic belongs to"https://community.openai.com"
categoryIdCategory numeric ID7
categoryNameResolved category name"API"
postsCountNumber of posts24
replyCountDirect reply count18
viewsTotal view count12503
likeCountTotal likes received89
createdAtISO timestamp created"2023-04-03T10:23:49.213Z"
lastPostedAtISO timestamp last reply"2024-01-15T08:44:11.000Z"
tagsList of topic tags["gpt-4", "system-prompt"]
excerptShort text excerpt (see note below)"Has anyone found a good pattern for..."
authorUsernameOriginal poster username"johndev42"
pinnedIs topic pinnedfalse
closedIs topic closedfalse
archivedIs topic archivedfalse
hasAcceptedAnswerHas a solution markedtrue
postsPost array (optional)See below

When includePostContent: true, each topic includes a posts array:

FieldDescription
postIdUnique post ID
postNumberPosition in thread
usernamePoster's username
displayNamePoster's display name
createdAtPost creation timestamp
contentFull HTML post content
contentTextThe same post as plain text
likeCountNumber of likes on this post
replyCountDirect replies to this post
readsHow many users read this post
isAcceptedAnswerIs 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.

PlanPrice 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 Community
  • https://discuss.huggingface.co — HuggingFace forums
  • https://meta.discourse.org — Discourse Meta
  • https://forum.cursor.com — Cursor AI community
  • https://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 like api or the category URL)
  • Tag topics — topics with one tag (tag: a name like gpt-4 or 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

ParameterTypeDefaultDescription
forumUrlstringhttps://community.openai.comThe forum's address; any link on the forum works
scrapeModeenumlatestTopicslatestTopics, topTopics, categoryTopics, tagTopics, searchTopics or topicUrls
categorySlugstring—Category slug or URL for categoryTopics (e.g., api, parent/child)
tagstring—Tag name or URL for tagTopics (e.g., gpt-4)
searchQuerystring—Search keywords for searchTopics
topPeriodenummonthlydaily, weekly, monthly, quarterly, yearly or all for topTopics
topicUrlsarray—Topic links for topicUrls mode
maxTopicsinteger50Maximum number of topics to extract
includePostContentbooleanfalseFetch full post content for each topic
maxPostsPerTopicinteger10First N available posts in conversation order (when includePostContent is true)
maxRequestRetriesinteger3Retry 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 ApifyClient
client = 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."

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.

Explore other automation-lab scrapers for AI/developer community data:

🩺 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

ParameterRequiredDescription
forumUrlyesForum address; any link on the forum works
modenolatest (default), top, category, tag or search
categorywith mode=categoryCategory slug or URL
tagwith mode=tagTag name or URL
qwith mode=searchSearch query
periodnoFor top: daily, weekly, monthly (default), quarterly, yearly, all
limitno1–50 topics (default 30); 1–20 with includePosts=true (default 20)
includePostsnotrue adds each topic's posts
maxPostsPerTopicno1–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

ParameterRequiredDescription
urlyesTopic link, e.g. https://meta.discourse.org/t/discourse-rest-api-documentation/22706
maxPostsno1–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

StatusCodeMeaning
400INVALID_INPUTA missing or malformed parameter
404NOT_FOUND, NO_TOPICSThe forum, category, tag or topic does not exist or is private, or nothing matched
405 / 413METHOD_NOT_ALLOWED, REQUEST_TOO_LARGE, RESPONSE_TOO_LARGEWrong method, or a request/answer too large (use a lower limit or a normal run)
502RATE_LIMITED, UPSTREAM_ERRORThe forum rate-limited or failed the request; retry
503OVERLOADED, SHUTTING_DOWNToo many requests at once, or the server is stopping; retry
504TIMEOUTThe forum did not answer in time; retry

Limits: 45 seconds per request, 6 requests at once per server process.