メインコンテンツへスキップ
GET
/
2
/
communities
/
search
コミュニティを検索
curl --request GET \
  --url https://api.x.com/2/communities/search \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "1146654567674912769",
      "name": "<string>",
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ],
  "meta": {
    "next_token": "<string>"
  }
}

承認

Authorization
string
header
必須

The access token received from the authorization server in the OAuth 2.0 flow.

クエリパラメータ

query
string
必須

コミュニティを検索するためのクエリ。

Required string length: 1 - 4096
:

"Love"

max_results
integer<int32>
デフォルト:10

1 回のリクエストで返す検索結果の最大件数。

必須範囲: 10 <= x <= 100
next_token
string

このパラメータは、結果の次の「ページ」を取得するために使用します。指定する値は API が返すレスポンスからそのまま取得し、変更しないでください。 次のトークン。

Minimum string length: 1
pagination_token
string

このパラメータは、結果の次のページを取得するために使用します。このパラメータの値は API のレスポンスからそのまま取得し、変更しないでください。 次のトークン。

Minimum string length: 1
community.fields
enum<string>[]

表示対象の Community フィールドをカンマ区切りで指定するリスト。 Community オブジェクトで使用可能なフィールド。

Minimum array length: 1
利用可能なオプション:
access,
created_at,
description,
id,
join_policy,
member_count,
name
:
[
"access",
"created_at",
"description",
"id",
"join_policy",
"member_count",
"name"
]

レスポンス

リクエストは成功しました。

data
object[]
Minimum array length: 1
errors
object[]
Minimum array length: 1

IETF RFC 7807 (https://tools.ietf.org/html/rfc7807) で定義された HTTP Problem Details オブジェクト。

meta
object