# Access to stats via API?

**URL:** https://meta.discourse.org/t/access-to-stats-via-api/62418
**Category:** Support
**Created:** [May 10, 2017, 12:49pm UTC](https://meta.discourse.org/t/access-to-stats-via-api/62418 "2017-05-10T12:49:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![niemeyer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/niemeyer/32/120325_2.png) [@niemeyer](https://meta.discourse.org/u/niemeyer)
#### Post date: [May 10, 2017, 12:49pm UTC](https://meta.discourse.org/t/access-to-stats-via-api/62418/1 "2017-05-10T12:49:00Z")

</div>

Is there any way to access the site statistics via the API? We’re trying to put some of these metrics inside a larger graph, and it would be great to be able to do that via the proper API instead of screen-scraping the dashboard or something else similarly hackish.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 10, 2017, 12:50pm UTC](https://meta.discourse.org/t/access-to-stats-via-api/62418/2 "2017-05-10T12:50:57Z")

</div>

I think that with the data manager plugin you can download statistics via the api.

Edit: it’s [data explorer](https://meta.discourse.org/t/32566?silent=true) plugin.

---

<div class="post-metadata">

### Author: ![niemeyer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/niemeyer/32/120325_2.png) [@niemeyer](https://meta.discourse.org/u/niemeyer)
#### Post date: [May 10, 2017, 12:56pm UTC](https://meta.discourse.org/t/access-to-stats-via-api/62418/3 "2017-05-10T12:56:16Z")

</div>

Thanks for the hint, I’ll have a look at it.

We also just found out that /admin/dashboard.json should offer what we need for that purpose.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 10, 2017, 12:57pm UTC](https://meta.discourse.org/t/access-to-stats-via-api/62418/4 "2017-05-10T12:57:46Z")

</div>

Yes, and there are endpoints like `https://meta.discourse.org/admin/reports/page_view_total_reqs` for individual stats.

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [February 9, 2018, 11:26pm UTC](https://meta.discourse.org/t/access-to-stats-via-api/62418/5 "2018-02-09T23:26:43Z")

</div>

This endpoint is good, but not seeing any others being exposed, or at least Docs doesn’t reveal them.

Does anyone know if any others are exposed? I am thinking a lot of us, or at least some of us, have organizations which keep a data warehouse with stats and being able to access reports via the API would be helpful for them.

Edit: any of the reports from the Dashboard can be viewed in json format by just appending `.json` to the URL, i.e. `/admin/reports/visits.json` - and that’s helpful. However there isn’t a way that I have found to allow you to set the timeframe for the data.

Edit2: and it looks like you can get some customised timeframes ala `/admin/reports/visits.json?category_id=all&end_date=2018-02-08&start_date=2018-01-01` but you do have to adjust the timeframe in the report first to then get the fields you can update

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 15, 2020, 11:08am UTC](https://meta.discourse.org/t/access-to-stats-via-api/62418/6 "2020-05-15T11:08:29Z")

</div>


