> ## 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.

# GeneralClient

> Methods for X API v2 General endpoints.

Access **General** endpoints via `client.General` (`GeneralClient`).

## Methods

| Method | Endpoint | Behavior | Summary |
| :- | :- | :- | :- |
| [`GetOpenApiSpecAsync`](#getopenapispecasync) | `GET /2/openapi.json` | Standard | Get OpenAPI Spec |

## `GetOpenApiSpecAsync`

GET `/2/openapi.json`

**Get OpenAPI Spec**

Retrieves the full OpenAPI Specification in JSON format. (See [https://github.com/OAI/OpenAPI-Specification/blob/master/README.md](https://github.com/OAI/OpenAPI-Specification/blob/master/README.md))

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

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

var response = await client.General.GetOpenApiSpecAsync();
Console.WriteLine(response);
```

**Returns:** `Task<Dictionary<string, JsonElement>>`

***
