Overview
GET/search/discussionssearch

Search discussions — topics by title, posts by body (via content.markdown)

List discussions.

Auth: bearerAuth — calls run as the authenticated user.

Parameters
  • qquerystring
  • typequery · optional"topics" | "posts"

    Restrict to one collection; omit to search both.

  • pagequery · optionalinteger
  • pageSizequery · optionalinteger
Responses
200

Matching topics and posts (ranked), with per-collection paging

  • topicsSearchDiscussionTopicResult[]
  • postsSearchDiscussionPostResult[]
  • pageinteger
  • pageSizeinteger
  • topicsHasMoreboolean
  • postsHasMoreboolean
Example
{
  "topics": [
    {
      "id": "string",
      "title": "string",
      "categoryId": "string",
      "replyCount": 0,
      "lastActivityAt": "string",
      "createdAt": "string"
    }
  ],
  "posts": [
    {
      "id": "string",
      "topicId": "string",
      "postNumber": 0,
      "bodyDocumentId": "string",
      "createdAt": "string",
      "rank": 0
    }
  ],
  "page": 0,
  "pageSize": 0,
  "topicsHasMore": true,
  "postsHasMore": true
}
400

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
401

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
Code examples
cURL
curl -X GET "https://api.agenticdeveloperhub.com/search/discussions" \
  -H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/search/discussions", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN"
  },
});
const data = await res.json();