> ## Documentation Index
> Fetch the complete documentation index at: https://x-preview-mintlify-5e62557c.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# NewsClient

> X API SDK の news.client Python モジュールのリファレンス。 X API v2 の news エンドポイントを呼び出すためのクライアントクラスとメソッド。

## NewsClient

<Badge color="blue">クラス</Badge>

<Badge color="gray">基底: object</Badge>

news 操作向けのクライアント

## コンストラクター

### `__init__`

#### パラメーター

<ParamField path="path.client" type="Client" />

### `get`

Get news stories by ID
Retrieves news story by its ID.

#### パラメーター

<ParamField path="path.id" type="Any">
  The ID of the news story.
</ParamField>

<ParamField path="path.news_fields" type="List or None" default="None">
  A comma separated list of News fields to display.
</ParamField>

#### 戻り値

`GetResponse` - Response data

### `search`

Search News
次の一覧を取得します: News stories matching the specified search query.

#### パラメーター

<ParamField path="path.query" type="str">
  The search query.
</ParamField>

<ParamField path="path.max_results" type="int or None" default="None">
  The number of results to return.
</ParamField>

<ParamField path="path.max_age_hours" type="int or None" default="None">
  The maximum age of the News story to search for.
</ParamField>

<ParamField path="path.news_fields" type="List or None" default="None">
  A comma separated list of News fields to display.
</ParamField>

#### 戻り値

`SearchResponse` - Response data
