get
/channels/{channel_id}/threads/searchSearch threads
Returns threads of the channel that match the search. Requires the read message history permission. While the search index of the guild is being built, responds with 202 and a body that says when to retry.
search_threads
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| channel_id* | path | SnowflakeType | The ID of the channel |
| name | query | string | Text to look for in thread names (max 100 characters) |
| slop | query | string | Accepted for compatibility and ignored (max 100, default 2) |
| tag | query | array | Tag IDs to filter by (max 20) |
| tag_setting | query | ForumTagSettingSchema | How posts are filtered when searching by several tags |
| archived | query | string | Whether to return only archived or only active threads (default both) |
| sort_by | query | ThreadSearchSortBySchema | The sorting algorithm to use |
| sort_order | query | ThreadSearchSortOrderSchema | The direction to sort |
| limit | query | string | Max number of threads to return (1-25, default 25) |
| offset | query | string | Number of threads to skip (max 9975) |
| max_id | query | SnowflakeType | Get threads before this thread ID |
| min_id | query | SnowflakeType | Get threads after this thread ID |
Responses
200
Success
json
{
"anyOf": [
{
"$ref": "#/components/schemas/ThreadSearchResponse"
},
{
"$ref": "#/components/schemas/SearchIndexNotReadyResponse"
}
],
"x-fluxer-experiment": "channel_threads"
}202
Accepted
json
{
"type": "object",
"properties": {
"code": {
"type": "string",
"const": "SEARCH_INDEX_NOT_READY",
"description": "Machine-readable code of the response"
},
"message": {
"type": "string",
"description": "Human-readable description of the response"
},
"documents_indexed": {
"description": "Always 0 while the index is being built",
"$ref": "#/components/schemas/Int32Type"
},
"retry_after": {
"type": "number",
"description": "Seconds to wait before retrying the search"
}
},
"required": [
"code",
"message",
"documents_indexed",
"retry_after"
],
"additionalProperties": false,
"x-fluxer-experiment": "channel_threads"
}400
Bad Request - The request was malformed or contained invalid data
json
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Machine-readable error code"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"description": "Field-specific validation errors",
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Field path that failed validation"
},
"code": {
"description": "Machine-readable validation error code",
"type": "string"
},
"message": {
"type": "string",
"description": "Human-readable validation error message"
}
},
"required": [
"path",
"message"
],
"additionalProperties": false
}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}401
Unauthorized - Authentication is required or the token is invalid
json
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Machine-readable error code"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"description": "Field-specific validation errors",
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Field path that failed validation"
},
"code": {
"description": "Machine-readable validation error code",
"type": "string"
},
"message": {
"type": "string",
"description": "Human-readable validation error message"
}
},
"required": [
"path",
"message"
],
"additionalProperties": false
}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}403
Forbidden - You do not have permission to perform this action
json
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Machine-readable error code"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"description": "Field-specific validation errors",
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Field path that failed validation"
},
"code": {
"description": "Machine-readable validation error code",
"type": "string"
},
"message": {
"type": "string",
"description": "Human-readable validation error message"
}
},
"required": [
"path",
"message"
],
"additionalProperties": false
}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}429
Too Many Requests - You are being rate limited
json
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Machine-readable error code"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"description": "Field-specific validation errors",
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Field path that failed validation"
},
"code": {
"description": "Machine-readable validation error code",
"type": "string"
},
"message": {
"type": "string",
"description": "Human-readable validation error message"
}
},
"required": [
"path",
"message"
],
"additionalProperties": false
}
},
"retry_after": {
"type": "number",
"description": "Seconds to wait before retrying"
},
"global": {
"type": "boolean",
"description": "Whether this is a global rate limit"
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}500
Internal Server Error - An unexpected error occurred
json
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Machine-readable error code"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"description": "Field-specific validation errors",
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Field path that failed validation"
},
"code": {
"description": "Machine-readable validation error code",
"type": "string"
},
"message": {
"type": "string",
"description": "Human-readable validation error message"
}
},
"required": [
"path",
"message"
],
"additionalProperties": false
}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}