> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CommunityNotesClient

> Methods for X API v2 Community Notes endpoints.

Access **Community Notes** endpoints via `client.CommunityNotes` (`CommunityNotesClient`).

## Methods

| Method | Endpoint | Behavior | Summary |
| :- | :- | :- | :- |
| [`CreateAsync`](#createasync) | `POST /2/notes` | Standard | Create a Community Note |
| [`DeleteAsync`](#deleteasync) | `DELETE /2/notes/{id}` | Standard | Delete a Community Note |
| [`EvaluateAsync`](#evaluateasync) | `POST /2/notes/evaluate` | Standard | Evaluate a Community Note |
| [`SearchEligiblePostsAsync`](#searcheligiblepostsasync) | `GET /2/notes/search/posts_eligible_for_notes` | Paginated | Search for Posts Eligible for Community Notes |
| [`SearchWrittenAsync`](#searchwrittenasync) | `GET /2/notes/search/notes_written` | Paginated | Search for Community Notes Written |

## `CreateAsync`

POST `/2/notes`

**Create a Community Note**

Creates a Community Note on a Post. With test\_mode set to true, the note is only for testing and is not publicly visible.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.CommunityNotes.CreateAsync(
    new CreateCommunityNotesRequest { TestMode = true, PostId = "1895000000000000000" }
);
Console.WriteLine(response);
```

### Parameters

**body** `CreateCommunityNotesRequest` *required*

Request payload.

**Returns:** `Task<CreateCommunityNotesResponse>`

***

## `DeleteAsync`

DELETE `/2/notes/{id}`

**Delete a Community Note**

Deletes a community note.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.CommunityNotes.DeleteAsync("1895000000000000000");
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**Returns:** `Task<DeleteCommunityNotesResponse>`

***

## `EvaluateAsync`

POST `/2/notes/evaluate`

**Evaluate a Community Note**

Evaluates the text of a proposed Community Note on a Post and returns its claim-opinion score.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.CommunityNotes.EvaluateAsync(
    new EvaluateCommunityNotesRequest { PostId = "1895000000000000000", NoteText = "example" }
);
Console.WriteLine(response);
```

### Parameters

**body** `EvaluateCommunityNotesRequest` *required*

Request payload.

**Returns:** `Task<EvaluateCommunityNotesResponse>`

***

## `SearchEligiblePostsAsync`

GET `/2/notes/search/posts_eligible_for_notes` Paginated

**Search for Posts Eligible for Community Notes**

Retrieves Posts that are eligible for Community Notes.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

await foreach (var page in client.CommunityNotes.SearchEligiblePostsPages(true))
{
    Console.WriteLine(page);
}
```

### Parameters

**testMode** `bool` *required*

`test_mode` (query parameter).

**Optional parameters (CommunityNotesClient.SearchEligiblePostsOptions — 9)**

**options.MaxResults** `int`

`max_results` (query parameter).

**options.PaginationToken** `string`

`pagination_token` (query parameter).

**options.PostSelection** `string`

`post_selection` (query parameter).

**options.PostFields** `List\<string\>`

A comma separated list of Post fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**options.MediaFields** `List\<string\>`

A comma separated list of Media fields to display.

**options.PollFields** `List\<string\>`

A comma separated list of Poll fields to display.

**options.PlaceFields** `List\<string\>`

A comma separated list of Place fields to display.

**Returns:** `Task<SearchEligiblePostsResponse>` (use `SearchEligiblePostsPages(...)` for `IAsyncEnumerable` page iteration)

***

## `SearchWrittenAsync`

GET `/2/notes/search/notes_written` Paginated

**Search for Community Notes Written**

Retrieves the Community Notes written by the authenticated user.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

await foreach (var page in client.CommunityNotes.SearchWrittenPages(true))
{
    Console.WriteLine(page);
}
```

### Parameters

**testMode** `bool` *required*

`test_mode` (query parameter).

**Optional parameters (CommunityNotesClient.SearchWrittenOptions — 3)**

**options.MaxResults** `int`

`max_results` (query parameter).

**options.PaginationToken** `string`

`pagination_token` (query parameter).

**options.NoteFields** `List\<string\>`

A comma separated list of Note fields to display.

**Returns:** `Task<SearchCommunityNotesWrittenResponse>` (use `SearchWrittenPages(...)` for `IAsyncEnumerable` page iteration)

***
