# Discourse 有没有允许文章阅读的 API？

**URL:** https://meta.discourse.org/t/does-discourse-have-api-that-allows-articles-consumption/319904
**Category:** Development
**Tags:** rest-api
**Created:** [2024年八月2日 21:42 UTC](https://meta.discourse.org/t/does-discourse-have-api-that-allows-articles-consumption/319904 "2024-08-02T21:42:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![oga](https://avatars.discourse-cdn.com/v4/letter/o/f19dbf/32.png) [@oga](https://meta.discourse.org/u/oga)
#### Post date: [2024年八月2日 21:42 UTC](https://meta.discourse.org/t/does-discourse-have-api-that-allows-articles-consumption/319904/1 "2024-08-02T21:42:24Z")

</div>

您好，  
我在 Discourse 中看到了 API 文档。所以我的问题是：  
一个没有运行 Discourse 的网站可以获取我们的论坛文章吗？  
也就是说，我们在 Discourse 实例 [xyz.com](http://xyz.com) 上发布了一篇文章。[xyz.com](http://xyz.com) 没有运行 Discourse，它希望重新发布这篇文章，而不是复制粘贴。  
我们向他们提供一个 API 密钥，允许他们获取我们发布的内容——更像是一个内容分发系统。这可能吗？如果可能，该如何实现？

谢谢

---

<div class="post-metadata">

### Author: ![pangbo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pangbo/32/538562_2.png) [@pangbo](https://meta.discourse.org/u/pangbo)
#### Post date: [2024年八月2日 22:42 UTC](https://meta.discourse.org/t/does-discourse-have-api-that-allows-articles-consumption/319904/2 "2024-08-02T22:42:03Z")

</div>

我认为 webhook 是一个更好的选择。您可以配置 Discourse 实例，以便在每次创建新帖子时向 `xyz.com` 发送 HTTP 请求。

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [2024年八月2日 23:17 UTC](https://meta.discourse.org/t/does-discourse-have-api-that-allows-articles-consumption/319904/3 "2024-08-02T23:17:32Z")

</div>

Discourse 支持 RSS

> [@Finding Discourse RSS feeds](https://meta.discourse.org/t/finding-discourse-rss-feeds/264134?u=heliosurge):
>
> bookmark A reference list of all the RSS feeds available in Discourse. person_raising_hand Required user level: All users Here’s a list of most of the available RSS feeds in Discourse. [RSS](https://en.wikipedia.org/wiki/RSS) is a standardised, computer-readable format for content that allows it to be shared between sites and platforms easily. information_source RSS links that contain an ID (categories, topics, badges, etc.) are defined by their ID. The links won’t break if the slug part of the URL changes, but the slug…

---

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [2024年八月3日 06:34 UTC](https://meta.discourse.org/t/does-discourse-have-api-that-allows-articles-consumption/319904/4 "2024-08-03T06:34:03Z")

</div>

另一种方法是[在主题 URL 末尾添加 `.json`](https://meta.discourse.org/t/does-discourse-have-api-that-allows-articles-consumption/319904.json)。渲染后的 HTML 以及其他有用数据都在其中。
