# 如何从 /users 页面获取所有用户的 JSON？

**URL:** <https://meta.discourse.org/t/how-to-fetch-all-users-json-from-users-page/30396>\
**Category:** Support\
**Created:** [2015年六月24日 03:37 UTC](https://meta.discourse.org/t/how-to-fetch-all-users-json-from-users-page/30396 "2015-06-24T03:37:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)\
**Post date:** [2015年六月24日 03:37 UTC](https://meta.discourse.org/t/how-to-fetch-all-users-json-from-users-page/30396/1 "2015-06-24T03:37:43Z")

</div>

I’m trying this:

```
curl http://forum.kozovod.com/users.json

```

But nothing is returned.  
Is there a way to get the users JSON from a page like this:

> **[Козоводство в Украине, России, СНГ: форум, хозяйства, рынок](https://forum.kozovod.com/users?order=days_visited&period=monthly)**
>
> Козий рынок, база знаний; зааненские, англонубийские, карликовые породы; уход, разведение, селекция, фермы как бизнес, сыры, сбыт молочки, консультация ветеринара

.. with ordering and period parameters available.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2015年六月24日 03:42 UTC](https://meta.discourse.org/t/how-to-fetch-all-users-json-from-users-page/30396/2 "2015-06-24T03:42:39Z")

</div>

There is a howto topic on reverse engineering the API using the F12 key in your browser, I suggest referring to that. All data you see on screen in Discourse, is always retrieved via JSON.

---

<div class="post-metadata">

**Author:** ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)\
**Post date:** [2015年六月24日 17:27 UTC](https://meta.discourse.org/t/how-to-fetch-all-users-json-from-users-page/30396/3 "2015-06-24T17:27:54Z")

</div>

Would exporting the users in the admin section not work for you?

---

<div class="post-metadata">

**Author:** ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)\
**Post date:** [2015年六月25日 03:47 UTC](https://meta.discourse.org/t/how-to-fetch-all-users-json-from-users-page/30396/4 "2015-06-25T03:47:19Z")

</div>

> [@eviltrout](#):
>
> Would exporting the users in the admin section not work for you?

In my particular case, I’d like to show “TOP X” users with various ordering dynamically on my blog pages. The blog is a website complementing the forum. For example:

- Top 10 visitors this week
- Top 10 most liked contributors this month

---

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [2015年六月25日 05:39 UTC](https://meta.discourse.org/t/how-to-fetch-all-users-json-from-users-page/30396/5 "2015-06-25T05:39:38Z")

</div>

In that case, the developer console network tab is the way to go. Click until it’s sorted the way you want it displayed, and look at the parameters for the last request.

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2024年六月8日 12:46 UTC](https://meta.discourse.org/t/how-to-fetch-all-users-json-from-users-page/30396/6 "2024-06-08T12:46:07Z")

</div>

此主题已在 3272 天后自动关闭。不再允许回复。
