メインコンテンツへスキップ
GET
/
2
/
news
/
search
ニュースを検索する
curl --request GET \
  --url https://api.x.com/2/news/search \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "rest_id": "2244994945",
      "category": "<string>",
      "cluster_posts_results": [
        {
          "post_id": "1346889436626259968"
        }
      ],
      "contexts": {
        "entities": {
          "events": [
            "<string>"
          ],
          "organizations": [
            "<string>"
          ],
          "people": [
            "<string>"
          ],
          "places": [
            "<string>"
          ],
          "products": [
            "<string>"
          ]
        },
        "finance": {
          "tickers": [
            "<string>"
          ]
        },
        "sports": {
          "teams": [
            "<string>"
          ]
        },
        "topics": [
          "<string>"
        ]
      },
      "disclaimer": "<string>",
      "hook": "<string>",
      "keywords": [
        "<string>"
      ],
      "last_updated_at_ms": "2025-7-14T04:35:55Z",
      "name": "<string>",
      "summary": "<string>"
    }
  ],
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ],
  "meta": {
    "result_count": 123
  }
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

クエリパラメータ

query
string
必須

検索クエリ。

Required string length: 1 - 2048
:

"crypto"

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

返される結果数。

必須範囲: 1 <= x <= 100
max_age_hours
integer<int32>
デフォルト:168

検索対象とするニュース記事の最大経過期間。

必須範囲: 1 <= x <= 720
news.fields
enum<string>[]

取得する News フィールドをカンマ区切りで指定します。 News オブジェクトで使用できるフィールドです。

Minimum array length: 1
利用可能なオプション:
category,
cluster_posts_results,
contexts,
disclaimer,
hook,
id,
keywords,
name,
summary,
updated_at
:
[
"category",
"cluster_posts_results",
"contexts",
"disclaimer",
"hook",
"id",
"keywords",
"name",
"summary",
"updated_at"
]

レスポンス

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

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