> For the complete documentation index, see [llms.txt](https://docs.hatsprotocol.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hatsprotocol.xyz/for-developers/v1-sdk/subgraph/getting-started.md).

# Getting Started

### *Install*

yarn:

```bash
yarn add @hatsprotocol/sdk-v1-subgraph
```

npm:

```bash
npm install @hatsprotocol/sdk-v1-subgraph
```

### *HatsSubgraphClient Initialization*

Import and initialize HatsSubgraphClient.

Optionally configure the Subgraph endpoints to use, or use the default ones.&#x20;

```typescript
import { HatsSubgraphClient } from "@hatsprotocol/sdk-v1-subgraph";

const hatsSubgraphClient = new HatsSubgraphClient({
    config
});
```

***Arguments***:

```typescript
{ config?: EndpointsConfig }
```

* `config` - Optional subgraph endpoints configuration. If not provided, then the default, un-gated development endpoints will be used. See the `EndpointsConfig` type [here](/for-developers/v1-sdk/subgraph/types.md#endpointsconfig).
