# 从类别中获取主题列表

**URL:** https://meta.discourse.org/t/obtaining-a-list-of-topics-from-a-category/159337
**Category:** Support
**Created:** [2020年七月30日 19:15 UTC](https://meta.discourse.org/t/obtaining-a-list-of-topics-from-a-category/159337 "2020-07-30T19:15:11Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Monkey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/monkey/32/188547_2.png) [@Monkey](https://meta.discourse.org/u/Monkey)
#### Post date: [2020年七月30日 22:00 UTC](https://meta.discourse.org/t/obtaining-a-list-of-topics-from-a-category/159337/4 "2020-07-30T22:00:03Z")

</div>

这些链接应该能为您提供更多信息：

> [@Struggling with pagination within search/query.json](https://meta.discourse.org/t/struggling-with-pagination-within-search-query-json/59558/4):
>
> Oops. Getting the links wrong is what made me believe discourse support pagination using page=X in the first place (my own bad conversion from curl to a web browser). Perhaps I should have ask a more general question: If search/query.json has a grouped\_search\_result with more\_posts set true, how do I get to see the additional posts?

该主题中提供的教程：

> [@Reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576):
>
> Discourse is backed by a complete JSON api. Anything you can do on the site you can also do using the JSON api. The API is documented at [docs.discourse.org](https://docs.discourse.org). You can also use the [discourse\_api](https://github.com/discourse/discourse_api) Ruby gem as a client library. However, not every endpoint is documented. To determine how to do something with the JSON API here are some steps you can follow. Example: recategorize a topic. Go to a topic and start editing a category: Open Chrome dev tools, switch to the Network tab, select …

在您列出的网站上按照该教程操作，并在打开网络开发者工具时，您将看到以下内容：

 ![2020-07-30-145601_811x167_scrot](https://global.discourse-cdn.com/meta/original/3X/7/a/7aa9e11dd83f002872b31e4e23ce64511c100103.png)

右键点击它时会出现许多选项， **复制 \> 复制链接地址** （在 Firefox 中）会提供：  
[https://forum.valuepickr.com/c/stock-opportunities/11/l/latest.json?ascending=false&order=default&page=1](https://forum.valuepickr.com/c/stock-opportunities/11/l/latest.json?ascending=false&order=default&page=1)

这是一个针对该类别中帖子的增量 JSON 链接。

---

_[View the full topic](https://meta.discourse.org/t/obtaining-a-list-of-topics-from-a-category/159337)._
