# Discourse on Onekey > 18 endpoints for Discourse (18 stable, 0 beta), 1 to 5 credits each. Category: Messaging & communities. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/discourse Reference (Markdown): https://onekey.dev/docs/api/discourse.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 18 mapped Discourse endpoints return each: - `engagement.likes` (integer): 13 - `content.createdAt` (ISO 8601 date): 12 - `content.id` (string): 11 - `entity.name` (string): 11 - `content.slug` (string): 10 - `engagement.comments` (integer): 10 - `engagement.views` (integer): 9 - `content.title` (string): 8 - `author.username` (string): 7 - `content.updatedAt` (ISO 8601 date): 7 - `content.text` (string): 6 - `author.displayName` (string): 5 - `author.id` (string): 3 - `entity.id` (string): 3 - `entity.description` (string): 2 - `entity.slug` (string): 1 - plus 12 platform-specific fields under `ext.` ## Endpoints ### discourse.about About page data of a Discourse forum. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/discourse/about` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - Fields returned: `entity.name`, `content.text`, `ext.topics`, `ext.posts`, `ext.users`, `ext.contactUrl` - Reference: https://onekey.dev/docs/api/discourse/about.md ### discourse.badges Badges of a Discourse forum. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/badges` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - Fields returned: `entity.id`, `entity.name`, `entity.description`, `ext.granted` - Reference: https://onekey.dev/docs/api/discourse/badges.md ### discourse.categories Categories of a Discourse forum. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/categories` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - Fields returned: `entity.id`, `entity.name`, `entity.slug`, `entity.description`, `ext.topics`, `ext.posts` - Reference: https://onekey.dev/docs/api/discourse/categories.md ### discourse.category_topics Topics in a Discourse category. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/category_topics?id=2` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - `id` (string, required): Category id - Fields returned: `content.id`, `content.title`, `content.slug`, `content.createdAt`, `content.updatedAt`, `engagement.likes`, `engagement.comments`, `engagement.views`, `entity.name`, `ext.posts`, `ext.categoryId` - Reference: https://onekey.dev/docs/api/discourse/category_topics.md ### discourse.directory User directory of a Discourse forum (most likes received). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/directory` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - Fields returned: `author.id`, `author.username`, `author.displayName`, `engagement.likes`, `ext.likesGiven`, `ext.posts`, `ext.topics` - Reference: https://onekey.dev/docs/api/discourse/directory.md ### discourse.latest Latest topics of a Discourse forum. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/latest` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - Fields returned: `content.id`, `content.title`, `content.slug`, `content.createdAt`, `content.updatedAt`, `engagement.likes`, `engagement.comments`, `engagement.views`, `entity.name`, `ext.posts`, `ext.categoryId` - Reference: https://onekey.dev/docs/api/discourse/latest.md ### discourse.latest_posts Latest posts across a Discourse forum. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/latest_posts` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - Fields returned: `content.id`, `author.username`, `author.displayName`, `content.text`, `content.createdAt`, `engagement.comments`, `engagement.likes`, `content.slug`, `ext.topicId`, `ext.postNumber` - Reference: https://onekey.dev/docs/api/discourse/latest_posts.md ### discourse.search_posts Search posts on a Discourse forum. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/search_posts?q=plugin` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - `q` (string, required): Search query - Fields returned: `content.id`, `author.username`, `author.displayName`, `content.text`, `content.createdAt`, `engagement.likes`, `ext.topicId`, `ext.postNumber` - Reference: https://onekey.dev/docs/api/discourse/search_posts.md ### discourse.search_topics Search topics on a Discourse forum. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/search_topics?q=plugin` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - `q` (string, required): Search query - Fields returned: `content.id`, `content.title`, `content.slug`, `content.createdAt`, `content.updatedAt`, `engagement.likes`, `engagement.comments`, `engagement.views`, `entity.name`, `ext.posts`, `ext.categoryId` - Reference: https://onekey.dev/docs/api/discourse/search_topics.md ### discourse.tag_topics Topics with a Discourse tag. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/tag_topics?tag=translation` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - `tag` (string, required): Tag name, e.g. plugin - Fields returned: `content.id`, `content.title`, `content.slug`, `content.createdAt`, `content.updatedAt`, `engagement.likes`, `engagement.comments`, `engagement.views`, `entity.name`, `ext.posts`, `ext.categoryId` - Reference: https://onekey.dev/docs/api/discourse/tag_topics.md ### discourse.tags Tags of a Discourse forum. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/tags` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - Fields returned: `entity.id`, `entity.name`, `ext.topics` - Reference: https://onekey.dev/docs/api/discourse/tags.md ### discourse.top Top topics of a Discourse forum (past week). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/top` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - Fields returned: `content.id`, `content.title`, `content.slug`, `content.createdAt`, `content.updatedAt`, `engagement.likes`, `engagement.comments`, `engagement.views`, `entity.name`, `ext.posts`, `ext.categoryId` - Reference: https://onekey.dev/docs/api/discourse/top.md ### discourse.top_all Top topics of a Discourse forum (all time). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/top_all` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - Fields returned: `content.id`, `content.title`, `content.slug`, `content.createdAt`, `content.updatedAt`, `engagement.likes`, `engagement.comments`, `engagement.views`, `entity.name`, `ext.posts`, `ext.categoryId` - Reference: https://onekey.dev/docs/api/discourse/top_all.md ### discourse.topic A Discourse topic. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/discourse/topic?id=1` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - `id` (string, required): Topic id - Fields returned: `content.id`, `content.title`, `content.slug`, `content.createdAt`, `engagement.likes`, `engagement.comments`, `engagement.views`, `author.username`, `content.text`, `ext.posts`, `ext.categoryId` - Reference: https://onekey.dev/docs/api/discourse/topic.md ### discourse.topic_posts Posts (replies) of a Discourse topic. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/topic_posts?id=1` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - `id` (string, required): Topic id - Fields returned: `content.id`, `author.username`, `author.displayName`, `content.text`, `content.createdAt`, `engagement.comments`, `engagement.likes`, `content.slug`, `ext.topicId`, `ext.postNumber` - Reference: https://onekey.dev/docs/api/discourse/topic_posts.md ### discourse.user A Discourse user's profile. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/discourse/user?username=codinghorror` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - `username` (string, required): Forum username, e.g. codinghorror - Fields returned: `author.id`, `author.username`, `author.displayName`, `content.text`, `content.createdAt`, `engagement.views`, `ext.title`, `ext.badges` - Reference: https://onekey.dev/docs/api/discourse/user.md ### discourse.user_summary Activity totals of a Discourse user. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/discourse/user_summary?username=codinghorror` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - `username` (string, required): Forum username, e.g. codinghorror - Fields returned: `engagement.likes`, `author.username`, `author.id`, `ext.likesGiven`, `ext.topics`, `ext.posts`, `ext.daysVisited` - Reference: https://onekey.dev/docs/api/discourse/user_summary.md ### discourse.user_topics Topics created by a Discourse user. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/discourse/user_topics?username=codinghorror` with header `x-api-key: YOUR_API_KEY` - Parameters: - `instance` (string, optional): Known Discourse forum (allowlisted), default meta.discourse.org - `username` (string, required): Forum username, e.g. codinghorror - Fields returned: `content.id`, `content.title`, `content.slug`, `content.createdAt`, `content.updatedAt`, `engagement.likes`, `engagement.comments`, `engagement.views`, `entity.name`, `ext.posts`, `ext.categoryId` - Reference: https://onekey.dev/docs/api/discourse/user_topics.md ## Sample request ```bash curl "https://api.onekey.dev/v1/discourse/about" \ -H "x-api-key: YOUR_API_KEY" ```