/v1/categories
All categories with topic counts
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/discourse-api/v1/categories" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/discourse-api/v1/categories", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/discourse-api/v1/categories");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/discourse-api/v1/categories",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"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-building",
"color": "12A89D",
"post_count": 11071,
"description": "For discussions about launching, building, growing and managing a thriving community.",
"topic_count": 1044
},
{
"id": 124,
"name": "General",
"slug": "general",
"color": "25AAE2",
"post_count": 2145,
"description": "For open discussions among the community that don’t belong somewhere else",
"topic_count": 255
},
{
"id": 213,
"name": "Nested Replies Testing",
"slug": "nested-replies-testing",
"color": "00ff34",
"post_count": 150,
"description": "Category used to test the very experimental plugin GitHub - discourse/discourse-nested-replies · GitHub",
"topic_count": 5
},
{
"id": 207,
"name": "News and Events",
"slug": "news-and-events",
"color": "00AEEF",
"post_count": 1,
"description": "Stay informed about Discourse – the product, the company, and the community.",
"topic_count": 1
},
{
"id": 10,
"name": "Documentation",
"slug": "documentation",
"color": "ED207B",
…