# How to reliably & programmatically get the latest version number of Discourse?

**URL:** https://meta.discourse.org/t/how-to-reliably-programmatically-get-the-latest-version-number-of-discourse/388336
**Category:** Development
**Created:** [November 13, 2025, 2:23am UTC](https://meta.discourse.org/t/how-to-reliably-programmatically-get-the-latest-version-number-of-discourse/388336 "2025-11-13T02:23:56Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [November 14, 2025, 9:25pm UTC](https://meta.discourse.org/t/how-to-reliably-programmatically-get-the-latest-version-number-of-discourse/388336/8 "2025-11-14T21:25:17Z")

</div>

You can use the version check that’s in the [Discourse code](https://github.com/discourse/discourse/blob/main/lib/discourse_hub.rb#L6-L15).

`https://api.discourse.org/api/version_check?installed_version=X`

where X is a known version on the branch that you want to get information about.

If you just want to get the latest 5 beta version numbers, simply use an old version like  
`https://api.discourse.org/api/version_check?installed_version=3.1.0.beta1`

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/a/9/fa9d39cd73a7cb47f46ac15685b0651829f886a2.png)

If you want the latest stable, omit the installed\_version parameter  
`https://api.discourse.org/api/version_check`

Alternatively, retrieve [https://github.com/discourse/discourse/blob/main/lib/version.rb](https://github.com/discourse/discourse/blob/main/lib/version.rb) and look for the `STRING =` line.

`STRING = "3.6.0.beta3-latest"`

(For beta use `https://github.com/discourse/discourse/blob/beta/lib/version.rb`, for stable use `https://github.com/discourse/discourse/blob/stable/lib/version.rb`)

---

_[View the full topic](https://meta.discourse.org/t/how-to-reliably-programmatically-get-the-latest-version-number-of-discourse/388336)._
