# Discourse API
> A live window into Discourse's own official community forum (meta.discourse.org), the flagship instance of the most widely used modern forum platform, as an API. Pull the latest topics with their reply, view and like counts; the top topics of a day, week, month or year; the category list with topic counts; or a user's profile (trust level, join date). The traditional threaded-forum experience delivered as clean JSON for social, news-aggregation and community-dashboard apps. Live data, no key. Distinct from link-aggregators and microblogs — this is forum software.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/discourse-api/..."
```

## Pricing
- **Free** (Free) — 500 calls/Mo, 5 req/s
- **Starter** ($8/Mo) — 13,000 calls/Mo, 15 req/s
- **Pro** ($20/Mo) — 62,000 calls/Mo, 30 req/s
- **Business** ($48/Mo) — 310,000 calls/Mo, 50 req/s

## Endpoints

### Topics

#### `GET /v1/latest` — Latest topics

**Parameters:**
- `limit` (query, optional, string) — Max 1-100 Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discourse-api/v1/latest?limit=30"
```

**Response:**
```json
{
    "data": {
        "feed": "latest",
        "count": 30,
        "topics": [
            {
                "id": 1,
                "url": "https://meta.discourse.org/t/new-to-discourse-start-here/1",
                "slug": "new-to-discourse-start-here",
                "tags": [],
                "likes": 431,
                "posts": 1,
                "title": "New to Discourse? Start here!",
                "views": 115837,
                "closed": true,
                "pinned": true,
                "replies": 0,
                "created_at": "2013-02-01T04:52:28.073Z",
                "category_id": 67,
                "last_posted_at": "2013-02-01T04:52:28.397Z"
            },
            {
                "id": 404728,
                "url": "https://meta.discourse.org/t/introducing-the-unified-new-view-for-the-topic-list/404728",
                "slug": "introducing-the-unified-new-view-for-the-topic-list",
                "tags": [],
                "likes": 0,
                "posts": 1,
                "title": "Introducing the unified new view for the topic list",
                "views": 1,
                "closed": false,
                "pinned": false,
                "replies": 0,
                "created_at": "2026-06-09T02:56:43.294Z",
                "category_id": 67,
                "last_posted_at": "2026-06-09T02:56:43.294Z"
            },
            {
                "id": 402812,
                "url": "https://meta.discourse.org/t/introdu
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/top` — Top topics by period

**Parameters:**
- `period` (query, optional, string) — daily | weekly | monthly | quarterly | yearly | all Example: `weekly`
- `limit` (query, optional, string) — Max 1-100 Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discourse-api/v1/top?period=weekly&limit=30"
```

**Response:**
```json
{
    "data": {
        "feed": "top",
        "count": 30,
        "period": "weekly",
        "topics": [
            {
                "id": 404427,
                "url": "https://meta.discourse.org/t/is-anyone-experiencing-an-odd-spam-user-attack-any-way-to-block/404427",
                "slug": "is-anyone-experiencing-an-odd-spam-user-attack-any-way-to-block",
                "tags": [],
                "likes": 38,
                "posts": 15,
                "title": "Is anyone experiencing an odd spam user attack? Any way to block?",
                "views": 287,
                "closed": false,
                "pinned": false,
                "replies": 14,
                "created_at": "2026-06-03T13:59:07.092Z",
                "category_id": 6,
                "last_posted_at": "2026-06-07T16:36:28.163Z"
            },
            {
                "id": 403635,
                "url": "https://meta.discourse.org/t/introducing-a-new-post-type-composer-actions-dropdown/403635",
                "slug": "introducing-a-new-post-type-composer-actions-dropdown",
                "tags": [],
                "likes": 21,
                "posts": 3,
                "title": "Introducing a new \"Post Type\" Composer actions dropdown",
                "views": 209,
                "closed": false,
                "pinned": false,
                "replies": 2,
                "created_at": "2026-06-01T20:07:07.770Z",
                "category_id": 67,
                "last_pos
…(truncated, see openapi.json for full schema)
```

### Forum

#### `GET /v1/categories` — All categories

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discourse-api/v1/categories"
```

**Response:**
```json
{
    "data": {
        "count": 11,
        "categories": [
            {
                "id": 6,
                "name": "Support",
                "slug": "support",
                "color": "ce96c9",
                "post_count": 132315,
                "description": "Ask the community for help with anything related to Discourse.To help others help you, share as much detail as you can about the issue and what is occurring, including what you have tried so far from searching, reading the documentation or asking our AI bot.",
                "topic_count": 20304
            },
            {
                "id": 7,
                "name": "Development",
                "slug": "dev",
                "color": "292929",
                "post_count": 25995,
                "description": "The category for all things Discourse Development. Building a customization for yourself or the community? Then this is the category for you! Learn more…",
                "topic_count": 4363
            },
            {
                "id": 14,
                "name": "Marketplace",
                "slug": "marketplace",
                "color": "8c6220",
                "post_count": 6759,
                "description": "A hub for all Discourse-related commerce: jobs, gigs, plugins, themes, hosting, and more.",
                "topic_count": 1326
            },
            {
                "id": 65,
                "name": "Community Building",
                "slug": "community-build
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/user` — User profile

**Parameters:**
- `username` (query, required, string) — Username Example: `codinghorror`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discourse-api/v1/user?username=codinghorror"
```

**Response:**
```json
{
    "data": {
        "user": {
            "name": "Jeff Atwood",
            "admin": true,
            "title": "co-founder",
            "avatar": "https://meta.discourse.org/user_avatar/meta.discourse.org/codinghorror/120/110067_2.png",
            "username": "codinghorror",
            "moderator": false,
            "created_at": "2013-02-05T04:44:25.476Z",
            "profile_url": "https://meta.discourse.org/u/codinghorror",
            "trust_level": 2,
            "last_seen_at": "2026-06-08T06:59:49.649Z"
        }
    },
    "meta": {
        "timestamp": "2026-06-09T03:03:23.769Z",
        "request_id": "cfc89d91-b82f-4c7b-b3ff-4ba2b816e9ec"
    },
    "status": "ok",
    "message": "User retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discourse-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "source": "meta.discourse.org public JSON (live)",
        "periods": [
            "daily",
            "weekly",
            "monthly",
            "quarterly",
            "yearly",
            "all"
        ],
        "service": "discourse-api",
        "instance": "meta.discourse.org",
        "endpoints": {
            "GET /v1/top": "Top topics by period (period=daily|weekly|monthly|quarterly|yearly|all, limit).",
            "GET /v1/meta": "This document.",
            "GET /v1/user": "User profile (username=, e.g. codinghorror).",
            "GET /v1/latest": "Latest topics (limit).",
            "GET /v1/categories": "All categories with topic counts."
        },
        "categories": 11,
        "description": "Live feed of Discourse's official community forum (meta.discourse.org), flagship of the most-used modern forum platform: latest topics with reply/view/like counts, top topics by period, the category list, and user profiles (trust level, join date). Live, no key. Distinct from link-aggregators and microblogs — this is forum software."
    },
    "meta": {
        "timestamp": "2026-06-09T03:03:24.034Z",
        "request_id": "7c9b8d67-af96-45e5-a2b4-7cda1575fd94"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/discourse-api
OpenAPI spec: https://www.oanor.com/api/discourse-api/openapi.json
