Find an API

Search public APIs with auth details & Postman guides

← All APIs

Discourse API Documentation

discourse · Social

Social No Auth Free & Open social

This page contains the documentation on how to use Discourse through API calls. > Note: For any endpoints not listed you can follow the [reverse engineer the Discourse API](https://meta.discourse.org/t/-/20576) guide to figure out how to use an API endpoint. ### Request Content-Type The Content-Type for POST and PUT requests can be set to `application/x-www-form-urlencoded`, `multipart/form-data`, or `application/json`. ### Endpoint Names and Response Content-Type Most API endpoints provide

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET Retrieves a list of categories

Retrieves a list of categories

https://api.apis.guru/v2/specs/discourse.local/latest/categories.json?include_subcategories=true

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/discourse.local/latest/categories.json?include_subcategories=true"
import requests
params = {
    "include_subcategories": "true"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/discourse.local/latest/categories.json",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/discourse.local/latest/categories.json');
url.searchParams.set('include_subcategories', 'true');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/discourse.local/latest/categories.json")
	q := baseURL.Query()
	q.Set("include_subcategories", "true")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/discourse.local/latest/categories.json")
uri.query = URI.encode_www_form({
  "include_subcategories" => "true"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/discourse.local/latest/categories.json?" . http_build_query([
    "include_subcategories" => "true"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Get a public list of users

Get a public list of users

https://api.apis.guru/v2/specs/discourse.local/latest/directory_items.json?asc=true&page=1&order=likes_received&period=daily

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/discourse.local/latest/directory_items.json?asc=true&page=1&order=likes_received&period=daily"
import requests
params = {
    "asc": "true",
    "page": "1",
    "order": "likes_received",
    "period": "daily"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/discourse.local/latest/directory_items.json",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/discourse.local/latest/directory_items.json');
url.searchParams.set('asc', 'true');
url.searchParams.set('page', '1');
url.searchParams.set('order', 'likes_received');
url.searchParams.set('period', 'daily');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/discourse.local/latest/directory_items.json")
	q := baseURL.Query()
	q.Set("asc", "true")
	q.Set("page", "1")
	q.Set("order", "likes_received")
	q.Set("period", "daily")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/discourse.local/latest/directory_items.json")
uri.query = URI.encode_www_form({
  "asc" => "true",
  "page" => "1",
  "order" => "likes_received",
  "period" => "daily"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/discourse.local/latest/directory_items.json?" . http_build_query([
    "asc" => "true",
    "page" => "1",
    "order" => "likes_received",
    "period" => "daily"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Get the latest topics

Get the latest topics

https://api.apis.guru/v2/specs/discourse.local/latest/latest.json?order=asc&ascending=example

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
Api-Key YOUR_API_KEY
Api-Username example
curl -X GET "https://api.apis.guru/v2/specs/discourse.local/latest/latest.json?order=asc&ascending=example" \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Api-Username: example"
import requests
params = {
    "order": "asc",
    "ascending": "example"
}
headers = {
    "Api-Key": "YOUR_API_KEY",
    "Api-Username": "example"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/discourse.local/latest/latest.json",
    params=params,
    headers=headers,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/discourse.local/latest/latest.json');
url.searchParams.set('order', 'asc');
url.searchParams.set('ascending', 'example');

const response = await fetch(url, {
  headers: {
    'Api-Key': 'YOUR_API_KEY',
    'Api-Username': 'example'
  },
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/discourse.local/latest/latest.json")
	q := baseURL.Query()
	q.Set("order", "asc")
	q.Set("ascending", "example")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)
	req.Header.Set("Api-Key", "YOUR_API_KEY")
	req.Header.Set("Api-Username", "example")

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/discourse.local/latest/latest.json")
uri.query = URI.encode_www_form({
  "order" => "asc",
  "ascending" => "example"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)
req["Api-Key"] = "YOUR_API_KEY"
req["Api-Username"] = "example"

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/discourse.local/latest/latest.json?" . http_build_query([
    "order" => "asc",
    "ascending" => "example"
]);
$opts = ["http" => [
    "method" => "GET",
    "header" => implode("\r\n", [
        "Api-Key: YOUR_API_KEY",
        "Api-Username: example"
    ]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. See official documentation for authentication and setup.

What can you build with Discourse API Documentation?

Discourse API Documentation is a Social API. Developers commonly use social APIs for:

  • adding social login (Sign in with Google/Twitter)
  • fetching user-generated content for analysis
  • scheduling and publishing social posts
  • tracking mentions and engagement metrics
  • building community dashboards

No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Discourse API Documentation is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide · Learn about API keys · What is REST?

Open documentation ↗