





















March 4, 2026, 10:02pm 21
Thank you so much! Yes I’ll do this! I’m specifically looking for pageviews (logged in users, anonymous users, crawlers) but I can’t find it in the API documentation. Any pointers?
supermathie (Michael Brown) March 4, 2026, 10:24pm 22
Some of the admin-specific calls aren’t in the API docs
I would open the network tab, go to the admin page, view the report with the data you want to retrieve, and then check the network tab to see what the browser loaded.
Which is really a summary of Reverse engineer the Discourse API
pfaffman (Jay Pfaffman) March 5, 2026, 1:04am 23
What I would do is use the data explorer plugin to get whatever you want and then you can pull that down with the API. Run Data Explorer queries with the Discourse API
supermathie (Michael Brown) March 5, 2026, 1:20am 24
Absolutely; if you want data differing from what’s already on offer in the admin panel, DE is the way to go.
It also gives the guarantee those queries won’t return different data after an update, BUT also the underlying structures may change and you may need to maintain the query.
Tradeoffs either way.
remidm (Rémi Delaporte-Mathurin) March 5, 2026, 1:35pm 25
Thank you both! I got away with the “reverse engineer" method + API key! Thank you so much!
MaukWM (MaukWM) April 19, 2026, 11:38am 26
A bit late to this conversation (well, the extension of it :p), but I also wanted to pull data from a discourse forum and didn’t want the hassle of setting up an API key, if you (or anyone) wants a simple wrapper to pull posts from any discourse forum you can check it our here
Released on PyPi so easy to install with pip/uv, handles rate limiting for you and is typed with Pydantic (makes for a better DX imo). Usage:
from discourse_reader import DiscourseClient
client = DiscourseClient("https://meta.discourse.org")
# Browse categories
for cat in client.categories():
print(f"{cat.name}: {cat.topic_count} topics")
# Get a topic with all its posts
topic = client.topics.get(12345)
print(topic.title)
print(topic.opening_post.cooked) # the original post (HTML)
print(topic.accepted_answer) # accepted answer or None
for reply in topic.posts.replies():
print(reply.username, reply.cooked)
Not as extensive as pydiscoursebut that’s intentional since it works without an API key, it also definitely won’t offer better or faster data than the data explorer plugin but I think it’s nice if you just wanna quickly pull a batch of threads of simple site statistics ![]()
Moin April 19, 2026, 12:04pm 27
I get the impression that this approach violates the terms of service for this forum and the default terms of service for Discourse forums.
You may not automate access to the forum, or monitor the forum, such as with a web crawler, browser plug-in or add-on, or other computer program that is not a web browser. You may crawl the forum to index it for a publicly available search engine, if you run one.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。